Package sonia.scm.group
Class Group
java.lang.Object
sonia.scm.BasicPropertiesAware
sonia.scm.group.Group
- All Implemented Interfaces:
com.github.sdorra.ssp.PermissionObject,Serializable,Cloneable,AuditLogEntity,LastModifiedAware,ModelObject,PropertiesAware,ReducedModelObject,TypedObject,Validateable
@IndexedType(permission="group:list")
@StaticPermissions(value="group",
globalPermissions={"create","list","autocomplete"},
custom=true,
customGlobal=true)
public class Group
extends BasicPropertiesAware
implements ModelObject, com.github.sdorra.ssp.PermissionObject, ReducedModelObject, AuditLogEntity
Organizes users into a group for easier permissions management.
TODO for 2.0: Use a set instead of a list for members
- See Also:
-
Field Summary
Fields inherited from class sonia.scm.BasicPropertiesAware
properties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidclear()clone()voidcopyProperties(Group group) Copies all properties of this group to the given one.booleanGet the entity name which is used for the audit loggetId()Returns the unique name of this group.Returns a timestamp of the last modified date.getName()Returns the unique name of this group.getType()Returns the type of this group.inthashCode()Returns a hash code value for thisGroup.booleanbooleanbooleanisValid()Returns true if the object is valid.booleanvoidsetCreationDate(Long creationDate) voidsetDescription(String description) voidsetExternal(boolean external) voidsetLastModified(Long lastModified) voidsetMembers(List<String> members) voidvoidtoString()Methods inherited from class sonia.scm.BasicPropertiesAware
getProperties, getProperty, removeProperty, setProperties, setProperty
-
Constructor Details
-
Group
public Group()This constructor is required by JAXB. -
Group
-
Group
-
Group
-
-
Method Details
-
add
-
clear
public void clear() -
clone
-
copyProperties
Copies all properties of this group to the given one.- Parameters:
group- to copies all properties of this one
-
equals
- Overrides:
equalsin classBasicPropertiesAware
-
hashCode
public int hashCode()Returns a hash code value for thisGroup.- Overrides:
hashCodein classBasicPropertiesAware
-
remove
-
toString
-
getCreationDate
- Specified by:
getCreationDatein interfaceModelObject
-
getDescription
-
getId
Returns the unique name of this group. This method is an alias for thegetName()method.- Specified by:
getIdin interfaceModelObject- Specified by:
getIdin interfacecom.github.sdorra.ssp.PermissionObject- Specified by:
getIdin interfaceReducedModelObject
-
getDisplayName
- Specified by:
getDisplayNamein interfaceReducedModelObject
-
getLastModified
Description copied from interface:LastModifiedAwareReturns a timestamp of the last modified date.- Specified by:
getLastModifiedin interfaceLastModifiedAware
-
getMembers
-
getName
Returns the unique name of this group. -
getType
Returns the type of this group. The default type is xml.- Specified by:
getTypein interfaceTypedObject
-
isExternal
public boolean isExternal() -
isMember
-
isValid
public boolean isValid()Description copied from interface:ValidateableReturns true if the object is valid.- Specified by:
isValidin interfaceValidateable
-
setCreationDate
- Specified by:
setCreationDatein interfaceModelObject
-
setDescription
-
setLastModified
- Specified by:
setLastModifiedin interfaceModelObject
-
setMembers
-
setName
-
setType
-
setExternal
public void setExternal(boolean external) -
getEntityName
Get the entity name which is used for the audit log- Specified by:
getEntityNamein interfaceAuditLogEntity- Since:
- 2.43.0
-