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 TypeMethodDescriptionboolean
void
clear()
clone()
void
copyProperties
(Group group) Copies all properties of this group to the given one.boolean
Get 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.int
hashCode()
Returns a hash code value for thisGroup
.boolean
boolean
boolean
isValid()
Returns true if the object is valid.boolean
void
setCreationDate
(Long creationDate) void
setDescription
(String description) void
setExternal
(boolean external) void
setLastModified
(Long lastModified) void
setMembers
(List<String> members) void
void
toString()
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:
equals
in classBasicPropertiesAware
-
hashCode
public int hashCode()Returns a hash code value for thisGroup
.- Overrides:
hashCode
in classBasicPropertiesAware
-
remove
-
toString
-
getCreationDate
- Specified by:
getCreationDate
in interfaceModelObject
-
getDescription
-
getId
Returns the unique name of this group. This method is an alias for thegetName()
method.- Specified by:
getId
in interfaceModelObject
- Specified by:
getId
in interfacecom.github.sdorra.ssp.PermissionObject
- Specified by:
getId
in interfaceReducedModelObject
-
getDisplayName
- Specified by:
getDisplayName
in interfaceReducedModelObject
-
getLastModified
Description copied from interface:LastModifiedAware
Returns a timestamp of the last modified date.- Specified by:
getLastModified
in interfaceLastModifiedAware
-
getMembers
-
getName
Returns the unique name of this group. -
getType
Returns the type of this group. The default type is xml.- Specified by:
getType
in interfaceTypedObject
-
isExternal
public boolean isExternal() -
isMember
-
isValid
public boolean isValid()Description copied from interface:Validateable
Returns true if the object is valid.- Specified by:
isValid
in interfaceValidateable
-
setCreationDate
- Specified by:
setCreationDate
in interfaceModelObject
-
setDescription
-
setLastModified
- Specified by:
setLastModified
in interfaceModelObject
-
setMembers
-
setName
-
setType
-
setExternal
public void setExternal(boolean external) -
getEntityName
Get the entity name which is used for the audit log- Specified by:
getEntityName
in interfaceAuditLogEntity
- Since:
- 2.43.0
-