Class CmsPermissionSetCustom

  • All Implemented Interfaces:
    java.io.Serializable

    public class CmsPermissionSetCustom
    extends CmsPermissionSet
    A custom permission set that can be modified during runtime and contains both allowed and denied permissions as bitsets.

    Since:
    6.0.0
    See Also:
    Serialized Form
    • Constructor Detail

      • CmsPermissionSetCustom

        public CmsPermissionSetCustom​(CmsPermissionSet permissions)
        Constructor to create a permission set with preset allowed and denied permissions from another permission set.

        The permissions are read from a string representation of permissions in the format {{+|-}{r|w|v|c|d}}*.

        Parameters:
        permissions - the set of allowed and denied permissions
      • CmsPermissionSetCustom

        public CmsPermissionSetCustom​(int allowedPermissions)
        Constructor to create a permission set with preset allowed permissions.

        Parameters:
        allowedPermissions - bitset of allowed permissions
      • CmsPermissionSetCustom

        public CmsPermissionSetCustom​(int allowedPermissions,
                                      int deniedPermissions)
        Constructor to create a permission set with preset allowed and denied permissions.

        Parameters:
        allowedPermissions - the set of permissions to allow
        deniedPermissions - the set of permissions to deny
      • CmsPermissionSetCustom

        public CmsPermissionSetCustom​(java.lang.String permissionString)
        Constructor to create a permission set with preset allowed and denied permissions from a String.

        The permissions are read from a string representation of permissions in the format {{+|-}{r|w|v|c|d}}*.

        Parameters:
        permissionString - the string representation of allowed and denied permissions
    • Method Detail

      • addPermissions

        public void addPermissions​(CmsPermissionSet permissionSet)
        Sets permissions from another permission set additionally both as allowed and denied permissions.

        Parameters:
        permissionSet - the set of permissions to set additionally.
      • clone

        public java.lang.Object clone()
        Returns a clone of this Objects instance.

        Overrides:
        clone in class java.lang.Object
        Returns:
        a clone of this instance
      • denyPermissions

        public void denyPermissions​(int permissions)
        Sets permissions additionally as denied permissions.

        Parameters:
        permissions - bitset of permissions to deny
      • grantPermissions

        public void grantPermissions​(int permissions)
        Sets permissions additionally as allowed permissions.

        Parameters:
        permissions - bitset of permissions to allow
      • setPermissions

        public void setPermissions​(CmsPermissionSet permissionSet)
        Set permissions from another permission set both as allowed and denied permissions.

        Permissions formerly set are overwritten.

        Parameters:
        permissionSet - the set of permissions
      • setPermissions

        public void setPermissions​(int allowedPermissions,
                                   int deniedPermissions)
        Sets permissions as allowed and denied permissions in the permission set.

        Permissions formerly set are overwritten.

        Parameters:
        allowedPermissions - bitset of permissions to allow
        deniedPermissions - bitset of permissions to deny