Class UserSelfCheckCondition

  • All Implemented Interfaces:
    Condition, Cloneable

    public class UserSelfCheckCondition
    extends Object
    implements Condition
    The class UserSelfCheckCondition checks if User is accessing his object in the datastore. Additionally it checks if the attributes being accessed allowed by the configuration.
    • Constructor Detail

      • UserSelfCheckCondition

        public UserSelfCheckCondition()
        No argument constructor
    • Method Detail

      • getPropertyNames

        public List getPropertyNames()
        Returns a set of property names for the condition.
        Specified by:
        getPropertyNames in interface Condition
        Returns:
        set of property names
      • getPropertySyntax

        public Syntax getPropertySyntax​(String property)
        Returns the syntax for a property name
        Specified by:
        getPropertySyntax in interface Condition
        Parameters:
        property - String representing property name
        Returns:
        Syntax for the property name
        See Also:
        Syntax
      • getDisplayName

        public String getDisplayName​(String property,
                                     Locale locale)
                              throws PolicyException
        Gets the display name for the property name. The locale variable could be used by the plugin to customize the display name for the given locale. The locale variable could be null, in which case the plugin must use the default locale.
        Specified by:
        getDisplayName in interface Condition
        Parameters:
        property - property name.
        locale - locale for which the property name must be customized.
        Returns:
        display name for the property name.
        Throws:
        PolicyException - if unable to get display name
      • getValidValues

        public Set getValidValues​(String property)
                           throws PolicyException
        Returns a set of valid values given the property name. This method is called if the property Syntax is either the SINGLE_CHOICE or MULTIPLE_CHOICE.
        Specified by:
        getValidValues in interface Condition
        Parameters:
        property - String representing property name
        Returns:
        Set of valid values for the property.
        Throws:
        PolicyException - if unable to get the Syntax.
      • setProperties

        public void setProperties​(Map properties)
                           throws PolicyException
        Sets the properties of the condition. Evaluation of ConditionDecision is influenced by these properties.
        Specified by:
        setProperties in interface Condition
        Parameters:
        properties - of the condition that governs whether a policy applies. The only defined property is attributes
        Throws:
        PolicyException - for any abnormal condition
        See Also:
        ConditionDecision
      • getProperties

        public Map getProperties()
        Gets the properties of the condition.
        Specified by:
        getProperties in interface Condition
        Returns:
        map view of properties that govern the evaluation of the condition decision
        See Also:
        setProperties(Map)
      • getConditionDecision

        public ConditionDecision getConditionDecision​(SSOToken token,
                                                      Map env)
                                               throws PolicyException,
                                                      SSOException
        Gets the decision computed by this condition object.
        Specified by:
        getConditionDecision in interface Condition
        Parameters:
        token - single sign on token of the user
        env - request specific environment map of key/value pairs.
        Returns:
        the condition decision. The condition decision encapsulates whether a policy applies for the request. Policy framework continues evaluating a policy only if it applies to the request as indicated by the CondtionDecision. Otherwise, further evaluation of the policy is skipped.
        Throws:
        SSOException - if the token is invalid
        PolicyException - if the decision could not be computed
        See Also:
        ConditionDecision
      • clone

        public Object clone()
        Returns a copy of this object.
        Specified by:
        clone in interface Condition
        Overrides:
        clone in class Object
        Returns:
        a copy of this object