Class AccessRightObject


  • public class AccessRightObject
    extends Object
    Represents the attribute access rights associated with a user or role.
    • Constructor Detail

      • AccessRightObject

        public AccessRightObject()
        Default constructor
      • AccessRightObject

        public AccessRightObject​(Collection readableAttributeNames,
                                 Collection writableAttributeNames)
        This constructor establishes collections of readable attribute names and writeable attribute names.
        Parameters:
        readableAttributeNames - Collection of readable attribute names
        writableAttributeNames - Collection of writable attribute names
    • Method Detail

      • grantReadPermission

        public void grantReadPermission​(Collection attributeNames)
        Grant read permission to attributes.
        Parameters:
        attributeNames - A collection of attribute names to which read permission will be granted.
      • grantWritePermission

        public void grantWritePermission​(Collection attributeNames)
        Grant write permission to attributes.
        Parameters:
        attributeNames - A collection of attribute names to which write permission will be granted.
      • revokeReadPermission

        public void revokeReadPermission​(Collection attributeNames)
        Revoke read permission on attributes.
        Parameters:
        attributeNames - A collection of attribute names on which read permission will be revoked.
      • revokeWritePermission

        public void revokeWritePermission​(Collection attributeNames)
        Revoke write permission on attributes.
        Parameters:
        attributeNames - A collection of attribute names on which write permission will be revoked.
      • getReadableAttributeNames

        public Collection getReadableAttributeNames()
        Get all the readable attribute names.
        Returns:
        Collection of all the readable attribute names
      • getWritableAttributeNames

        public Collection getWritableAttributeNames()
        Get all the writable attribute names.
        Returns:
        Collection of all the writable attribute names
      • isReadable

        public boolean isReadable​(String attributeName)
        Check if an attribute is readable.
        Parameters:
        attributeName - The attribute to be checked
        Returns:
        boolean; true if this attribute is readable, false otherwise
      • isWritable

        public boolean isWritable​(String attributeName)
        Check if an attribute is writable.
        Parameters:
        attributeName - The attribute to be checked.
        Returns:
        boolean; true if this attribute is writable, false otherwise