Class OrgReferral

    • Field Detail

      • DEBUG

        protected static final Debug DEBUG
      • _configurationMap

        protected Map _configurationMap
      • _orgName

        protected String _orgName
      • cachedPolicyEvaluators

        protected Cache cachedPolicyEvaluators
    • Constructor Detail

      • OrgReferral

        public OrgReferral()
        No argument constructor
    • Method Detail

      • initialize

        public void initialize​(Map configurationMap)
        Initializes the referral with a map of Configuration parameters
        Specified by:
        initialize in interface Referral
        Parameters:
        configurationMap - a map containing configuration information. Each key of the map is a configuration parameter. Each value of the key would be a set of values for the parameter. The map is cloned and a reference to the clone is stored in the referral
      • setValues

        public void setValues​(Set values)
                       throws InvalidNameException
        Sets the values of this referral.
        Specified by:
        setValues in interface Referral
        Parameters:
        values - a set of values for this referral Each element of the set has to be a String
        Throws:
        InvalidNameException - if any value passed in the values is invalid
      • getValues

        public Set getValues()
        Gets the values of this referral
        Specified by:
        getValues in interface Referral
        Returns:
        the values of this referral Each element of the set would be a String
      • getDisplayNameForValue

        public String getDisplayNameForValue​(String value,
                                             Locale locale)
                                      throws NameNotFoundException
        Returns the display name for the value for the given locale. For all the valid values obtained through the methods getValidValues this method must be called by GUI and CLI to get the corresponding display 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 (most probabily en_US). This method returns only the display name and should not be used for the method setValues. Alternatively, if the plugin does not have to localize the value, it can just return the value as is.
        Specified by:
        getDisplayNameForValue in interface Referral
        Parameters:
        value - one of the valid value for the plugin
        locale - locale for which the display name must be customized
        Returns:
        the display name for the value for the given locale.
        Throws:
        NameNotFoundException - if the given value is not one of the valid values for the plugin
      • getReferralTypeName

        public abstract String getReferralTypeName()
        Gets the name of the ReferralType
        Specified by:
        getReferralTypeName in interface Referral
        Returns:
        name of the ReferralType representing this referral
      • getPolicyDecision

        public PolicyDecision getPolicyDecision​(SSOToken token,
                                                String resourceType,
                                                String resourceName,
                                                Set actionNames,
                                                Map envParameters)
                                         throws SSOException,
                                                PolicyException
        Gets policy evaluation results
        Specified by:
        getPolicyDecision in interface Referral
        Parameters:
        token - SSOToken
        resourceType - resource type
        resourceName - name of the resource
        actionNames - a set of action names
        envParameters - a map of enivronment parameters. Each key is an environment parameter name. Each value is a set of values for the parameter.
        Returns:
        policy decision
        Throws:
        SSOException
        PolicyException
      • getResourceNames

        public Set getResourceNames​(SSOToken token,
                                    String serviceTypeName,
                                    String resourceName)
                             throws PolicyException,
                                    SSOException
        Gets resource names that are exact matches, sub resources or wild card matches of argument resource name. To determine whether to include a resource name of a resource, argument resource name and policy resource name are compared treating wild characters in the policy resource name as wild. If the comparsion resulted in EXACT_MATCH, WILD_CARD_MACTH or SUB_RESOURCE_MACTH, the resource result would be included.
        Specified by:
        getResourceNames in interface Referral
        Parameters:
        token - sso token
        serviceTypeName - service type name
        resourceName - resource name
        Returns:
        names of sub resources for the given resourceName. The return value also includes the resourceName.
        Throws:
        PolicyException - if unable to get the Set of resource names.
        SSOException - is the token is invalid.
        See Also:
        ResourceMatch.EXACT_MATCH, ResourceMatch.SUB_RESOURCE_MATCH, ResourceMatch.WILDCARD_MATCH