Class 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:
  • Constructor Details

  • Method Details

    • add

      public boolean add(String member)
    • clear

      public void clear()
    • clone

      public Group clone()
      Overrides:
      clone in class Object
    • copyProperties

      public void copyProperties(Group group)
      Copies all properties of this group to the given one.
      Parameters:
      group - to copies all properties of this one
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class BasicPropertiesAware
    • hashCode

      public int hashCode()
      Returns a hash code value for this Group.
      Overrides:
      hashCode in class BasicPropertiesAware
    • remove

      public boolean remove(String member)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getCreationDate

      public Long getCreationDate()
      Specified by:
      getCreationDate in interface ModelObject
    • getDescription

      public String getDescription()
    • getId

      public String getId()
      Returns the unique name of this group. This method is an alias for the getName() method.
      Specified by:
      getId in interface ModelObject
      Specified by:
      getId in interface com.github.sdorra.ssp.PermissionObject
      Specified by:
      getId in interface ReducedModelObject
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface ReducedModelObject
    • getLastModified

      public Long getLastModified()
      Description copied from interface: LastModifiedAware
      Returns a timestamp of the last modified date.
      Specified by:
      getLastModified in interface LastModifiedAware
    • getMembers

      public List<String> getMembers()
    • getName

      public String getName()
      Returns the unique name of this group.
    • getType

      public String getType()
      Returns the type of this group. The default type is xml.
      Specified by:
      getType in interface TypedObject
    • isExternal

      public boolean isExternal()
    • isMember

      public boolean isMember(String member)
    • isValid

      public boolean isValid()
      Description copied from interface: Validateable
      Returns true if the object is valid.
      Specified by:
      isValid in interface Validateable
    • setCreationDate

      public void setCreationDate(Long creationDate)
      Specified by:
      setCreationDate in interface ModelObject
    • setDescription

      public void setDescription(String description)
    • setLastModified

      public void setLastModified(Long lastModified)
      Specified by:
      setLastModified in interface ModelObject
    • setMembers

      public void setMembers(List<String> members)
    • setName

      public void setName(String name)
    • setType

      public void setType(String type)
    • setExternal

      public void setExternal(boolean external)
    • getEntityName

      public String getEntityName()
      Get the entity name which is used for the audit log
      Specified by:
      getEntityName in interface AuditLogEntity
      Since:
      2.43.0