Class ResourceEnvIPCondition

  • All Implemented Interfaces:
    Condition, Cloneable

    @Deprecated
    public class ResourceEnvIPCondition
    extends Object
    implements Condition
    Deprecated.
    Use instead.
    The class ResourceEnvIPCondition is a plugin implementation of Condition interface. This condition object provides the policy framework with the condition decision and advices based on the client's environment or resource such as IP address, DNS host name, location, etc. For the first drop, we are only supporting IP address.
    • Constructor Detail

      • ResourceEnvIPCondition

        public ResourceEnvIPCondition()
        Deprecated.
        No argument constructor
    • Method Detail

      • getPropertyNames

        public List getPropertyNames()
        Deprecated.
        Returns a list of property names for ResourceEnvIPCondition.
        Specified by:
        getPropertyNames in interface Condition
        Returns:
        List of property names
      • getPropertySyntax

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

        public String getDisplayName​(String property,
                                     Locale locale)
                              throws PolicyException
        Deprecated.
        Returns 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 - String property name
        locale - Locale for which the property name must be customized
        Returns:
        display name for the property name
        Throws:
        PolicyException
      • getValidValues

        public Set getValidValues​(String property)
                           throws PolicyException
        Deprecated.
        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 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
        Deprecated.
        Sets the properties of ResourceEnvIPCondition. Evaluation of ConditionDecision is influenced by these properties.
        Specified by:
        setProperties in interface Condition
        Parameters:
        properties - the properties of the condition that governs whether a policy applies. The properties should define value for the key ENV_CONDITION_VALUE. The value should be a Set with multiple elements. Each element should be a String. Please note that properties is not cloned by the method.
        Throws:
        PolicyException - if properties is null or does not contain value for the key ENV_CONDITION_VALUE or the value of the key is not a Set with one String element that is parsable as an integer.
        See Also:
        ConditionDecision
      • getConditionDecision

        public ConditionDecision getConditionDecision​(SSOToken token,
                                                      Map env)
                                               throws PolicyException,
                                                      SSOException
        Deprecated.
        Returns the decision computed by ResourceEnvIPCondition 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 ResourceEnvIPCondition looks for values of key REQUEST_IP in the env map. If REQUEST_IP could not be determined from env, it is obtained from single sign on token of the user.
        Returns:
        the condition decision. The condition decision encapsulates whether a policy applies for the request and advice messages generated by the condition. Policy framework continues evaluating a policy only if it applies to the request as indicated by the ConditionDecision. Otherwise, further evaluation of the policy is skipped. However, the advice messages encapsulated in the ConditionDecision are aggregated and passed up, encapsulated in the policy decision.
        Throws:
        PolicyException - if the condition has not been initialized with a successful call to setProperties(Map) and/or the value of key REQUEST_IP is not a String.
        SSOException - if the token is invalid
        See Also:
        setProperties(Map), Condition.REQUEST_IP, ConditionDecision
      • clone

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