Class PrivilegeSubject

  • All Implemented Interfaces:
    Subject, Cloneable

    public class PrivilegeSubject
    extends Object
    implements Subject, Cloneable
    A generic subject mapper that maps entitlement subjects to OpenAM subjects.
    • Constructor Detail

      • PrivilegeSubject

        public PrivilegeSubject()
        Default Constructor
    • Method Detail

      • initialize

        public void initialize​(Map configParams)
        Initialize the subject. No properties are required for this subject.
        Specified by:
        initialize in interface Subject
        Parameters:
        configParams - configuration information
      • getValueSyntax

        public Syntax getValueSyntax​(SSOToken token)
        Return the syntax for displaying the property value.
        Specified by:
        getValueSyntax in interface Subject
        Parameters:
        token - SSO token
        Returns:
        syntax for displaying the property value.
        See Also:
        Syntax
      • getValidValues

        public ValidValues getValidValues​(SSOToken token)
        Returns an empty list as possible values.
        Specified by:
        getValidValues in interface Subject
        Parameters:
        token - the SSOToken
        Returns:
        ValidValues object with empty list.
      • getValidValues

        public ValidValues getValidValues​(SSOToken token,
                                          String pattern)
        Returns an empty list as possible values.
        Specified by:
        getValidValues in interface Subject
        Parameters:
        token - the SSOToken
        pattern - the pattern to match in valid values. Ignored for this subject
        Returns:
        ValidValues object with empty list.
      • getDisplayNameForValue

        public String getDisplayNameForValue​(String value,
                                             Locale locale)
        Returns the display name for property value.
        Specified by:
        getDisplayNameForValue in interface Subject
        Parameters:
        value - Property value.
        locale - Locale.
        Returns:
        the display name for property value.
      • getValues

        public Set getValues()
        Returns values
        Specified by:
        getValues in interface Subject
        Returns:
        values.
      • setValues

        public void setValues​(Set values)
        Set values.
        Specified by:
        setValues in interface Subject
        Parameters:
        values - Values.
      • isMember

        public boolean isMember​(SSOToken token)
                         throws SSOException
        Description copied from interface: Subject
        Determines if the user belongs to this instance of the Subject object. For example, a Role implementation would return true if the user belongs the specified role; false otherwise.
        Specified by:
        isMember in interface Subject
        Parameters:
        token - single-sign-on token of the user
        Returns:
        true if the user is member of the given subject; false otherwise.
        Throws:
        SSOException - if SSO token is not valid
      • equals

        public boolean equals​(Object o)
        Indicates whether some other object is "equal to" this one.
        Overrides:
        equals in class Object
        Parameters:
        o - another object that will be compared with this one
        Returns:
        true if equal; false otherwise.
      • clone

        public Object clone()
        Creates and returns a copy of this object.
        Specified by:
        clone in interface Subject
        Overrides:
        clone in class Object
        Returns:
        a copy of this object
      • hashCode

        public int hashCode()
        Return a hash code for this AuthenticatedUsers.
        Overrides:
        hashCode in class Object
        Returns:
        a hash code for this AuthenticatedUsers object.