Class Permission

java.lang.Object
mc.core.model.cc.Permission
All Implemented Interfaces:
Serializable, IBaseEntity, ICoreEntity

@Entity public class Permission extends Object implements IBaseEntity
Entity representing the assignment of a Right to a ComplexEntity for a Principal, serving as access control information for the ComplexEntity. The ComplexEntity must implement IRightManaged. Principal can either be User or a UserGroup, meaning that all Users of this UserGroup have this Right on the entity. For locale dependent Rights the locale must be given, for locale independent Rights the undefined locale is stored.
HrcEntities: If the Right is inherited from a parent set flag inherited to true and set the ComplexEntity that is the ancestor carrying the original Right as inheritedFrom.
Rights inclusion: Rights can include other Rights, for example includes the Right EDIT the Right READ in the same locale. Rights inclusion is coded in RightTypes. The application takes care only to store the highest including Right in the database to avoid redundant data.
See Also:
  • Constructor Details

    • Permission

      public Permission()
  • Method Details

    • getId

      public long getId()
      Specified by:
      getId in interface IBaseEntity
    • setId

      public void setId(long id)
      Specified by:
      setId in interface IBaseEntity
    • getPrincipal

      public Principal getPrincipal()
    • setPrincipal

      public void setPrincipal(Principal principal)
    • getObject

      public ComplexEntity getObject()
      Returns:
      the ComplexEntity for which the Permission is
    • setObject

      public void setObject(ComplexEntity object)
    • getInherited

      public boolean getInherited()
    • setInherited

      public void setInherited(boolean inherited)
    • getInheritedFrom

      public ComplexEntity getInheritedFrom()
    • setInheritedFrom

      public void setInheritedFrom(ComplexEntity inheritedFrom)
    • getRight

      public Right getRight()
    • setRight

      public void setRight(Right right)
    • getLocale

      public Locale getLocale()
    • setLocale

      public void setLocale(Locale locale)
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object