Class MethodPermission

  • All Implemented Interfaces:
    Serializable

    public class MethodPermission
    extends Descriptor
    Represents a method permission. A method permission can be associated to a role, be unchecked or excluded.
    Version:
    Author:
    Jerome Dochez
    See Also:
    Serialized Form
    • Constructor Detail

      • MethodPermission

        public MethodPermission​(Role role)
        construct a new MethodPermission based on a security role
        Parameters:
        role - the security role associated to the method permission
    • Method Detail

      • getUncheckedMethodPermission

        public static MethodPermission getUncheckedMethodPermission()
        Returns:
        an unchecked method permission. Methods associated with such a method permission can be invoked by anyone
      • getExcludedMethodPermission

        public static MethodPermission getExcludedMethodPermission()
        Returns:
        an ecluded method permission. Methods associated with such a method permission cannot be invoked by anyone.
      • isRoleBased

        public boolean isRoleBased()
        Returns:
        true if the method permission is based on a security role
      • isUnchecked

        public boolean isUnchecked()
        Returns:
        true if the method permission is unchecked
      • isExcluded

        public boolean isExcluded()
        Returns:
        true if the method permission is excluded
      • getRole

        public Role getRole()
        Returns:
        the security role associated with this method permission when applicable (role based method permission)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object