Interface SubjectPrivilegeGrant

    • Method Detail

      • getAllowedPrivileges

        SecurityPrivilege[] getAllowedPrivileges()
        Get the value for AllowedPrivilege. (Privileges which the session user can set on this grant.)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getAllPrivileges

        SecurityPrivilege[] getAllPrivileges()
        Get the value for AllPrivilege. (All privileges that are technically possible with this grant.)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getAllRanks

        SecurityRank[] getAllRanks()
        Get the value for AllRank. (All ranks that are technically possible with this grant.)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getAllGrantLevels

        GrantLevel[] getAllGrantLevels()
        Get the value for AllGrantLevel. (All grant level technically possible for the current objectdefinition.)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getGrantedRank

        SecurityRank getGrantedRank()
        Get the value for GrantedRank. (The rank represented by the set of granted privileges.)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getGrantableRank

        SecurityRank getGrantableRank()
        Get the value for GrantableRank. (The rank represented by the set of grantable privileges.)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setGrantedRank

        void setGrantedRank​(SecurityRank newGrantedRank)
        Set the value for GrantedRank. (The rank represented by the set of granted privileges.) This value is optional.
        Parameters:
        newGrantedRank - the new value for GrantedRank.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setGrantableRank

        void setGrantableRank​(SecurityRank newGrantableRank)
        Set the value for GrantableRank. (The rank represented by the set of grantable privileges.) This value is optional.
        Parameters:
        newGrantableRank - the new value for GrantableRank.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • isPrivilegeGrantable

        boolean isPrivilegeGrantable​(SecurityPrivilege name)
        Query whether an administration privilege is granted in this grant.
        Parameters:
        name - The name of the privilege to get for this grant.
        Returns:
        Whether the named privilege is granted or not as part of this grant.
      • isPrivilegeGranted

        boolean isPrivilegeGranted​(SecurityPrivilege name)
        Query whether a privilege is granted in this grant.
        Parameters:
        name - The name of the privilege to get for this grant.
        Returns:
        Whether the named privilege is granted or not as part of this grant.
      • setPrivilegeGrantable

        void setPrivilegeGrantable​(SecurityPrivilege privilege,
                                   boolean grantable)
        Set whether an administration privilege is granted or not on this grant.
        Parameters:
        privilege - The privilege to set.
        grantable - Whether the privilege should be grantable or not on this grant.
      • setPrivilegeGranted

        void setPrivilegeGranted​(SecurityPrivilege privilege,
                                 boolean grant)
        Set whether a privilege is granted or not on this grant.
        Parameters:
        privilege - The name of the privilege to set.
        grant - Whether the named privilege should be granted or not on this grant.
      • setPrivilegeGrantable

        void setPrivilegeGrantable​(String privilegeName,
                                   boolean grantable)
                            throws IllegalArgumentException
        Set whether an administration privilege is granted or not on this grant.
        Parameters:
        privilegeName - The name of the privilege to set.
        grantable - Whether the named privilege should be grantable or not on this grant.
        Throws:
        IllegalArgumentException
      • setPrivilegeGranted

        void setPrivilegeGranted​(String privilegeName,
                                 boolean grant)
                          throws IllegalArgumentException
        Set whether a privilege is granted or not on this grant.
        Parameters:
        privilegeName - The privilege to set.
        grant - Whether the privilege should be granted or not on this grant.
        Throws:
        IllegalArgumentException
      • setObjectDefinition

        void setObjectDefinition​(ObjectDefinition newObjectDefinition)
        Set the value for ObjectDefinition. This value is mandatory.
        Parameters:
        newObjectDefinition - is the object to set ObjectDefinition to. The type of object that the grant applies to. If this is null, then the object cannot be persisted.