Class CmsPermissionBean


  • public class CmsPermissionBean
    extends java.lang.Object
    Bean for permissions which have changed.

    • Constructor Detail

      • CmsPermissionBean

        public CmsPermissionBean​(java.lang.String principalType,
                                 java.lang.String principalName)
        Constructor for delete permission.

        Parameters:
        principalType - principal type
        principalName - principal name
      • CmsPermissionBean

        public CmsPermissionBean​(java.lang.String principalType,
                                 java.lang.String principalName,
                                 int allowed,
                                 int denied,
                                 int flags)
        Constructor for new or edited permission.

        Parameters:
        principalType - principal type
        principalName - principal name
        allowed - int
        denied - int
        flags - int
      • CmsPermissionBean

        public CmsPermissionBean​(java.lang.String principalType,
                                 java.lang.String principalName,
                                 java.lang.String permissionString)
        Constructor with permission string.

        Parameters:
        principalType - type
        principalName - name
        permissionString - permission string
    • Method Detail

      • getBeanForPrincipal

        public static CmsPermissionBean getBeanForPrincipal​(java.util.Set<CmsPermissionBean> beans,
                                                            java.lang.String principalName)
        Gets the bean for principal from list of beans.

        Parameters:
        beans - to look principal up
        principalName - name of principal to get bean of
        Returns:
        CmsPermissionBean
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • getAllowed

        public int getAllowed()
        Gets the allowed flag.

        Returns:
        int
      • getDenied

        public int getDenied()
        Gets the denied flag.

        Returns:
        int
      • getFlags

        public int getFlags()
        Gets the flag.

        Returns:
        int
      • getPermissionString

        public java.lang.String getPermissionString()
        Returns the permission string.

        Returns:
        the permission string or null if not set
      • getPrincipalName

        public java.lang.String getPrincipalName()
        Gets the principal name.

        Returns:
        the name of the principal
      • getPrincipalType

        public java.lang.String getPrincipalType()
        Gets the type of the principal.

        Returns:
        String
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • isDeleted

        public boolean isDeleted()
        Returns whether the permission should be removed.

        Returns:
        true-> permission will be removed
      • isRealPrinciple

        public boolean isRealPrinciple()
        Checks if principal is real.

        Returns:
        true if principal is real
      • setFlags

        public void setFlags​(int flags)
        Sets the flag of the ACE.

        Parameters:
        flags - to be set