com.sun.identity.policy
Class ConditionTypeManager

java.lang.Object
  extended by com.sun.identity.policy.ConditionTypeManager

public class ConditionTypeManager
extends Object

The class ConditionTypeManager provides methods to get a list of configured Condition objects, and to obtain a factory object for it.


Method Summary
 Condition getCondition(String conditionType)
          Returns an instance of the Condition given the condition type name.
 String getConditionTypeName(Condition condition)
          Returns the type of the Condition implementation.
 Set getConditionTypeNames()
          Returns a Set of all valid condition type names defined by the policy service.
 String getDisplayName(String conditionType)
          Gets the display name for the condition type
 String getI18NKey(String conditionType)
          Returns the I18N key to be used to localize the display name for the condition type name.
protected  String getI18NPropertiesFileName(String conditionType)
          Returns the I18N properties file name that should be used to localize display names for the given condition type.
 Set getSelectedConditionTypeNames()
          Returns a Set of valid condition type names configured for the organization.
 String getViewBeanURL(Condition condition)
          Gets the view bean URL given the Condition
 

Method Detail

getConditionTypeNames

public Set getConditionTypeNames()
                          throws SSOException,
                                 PolicyException
Returns a Set of all valid condition type names defined by the policy service. Examples are AuthLevelCondition, IPCondition.

Returns:
a Set of all valid condition type names defined by the policy service.
Throws:
SSOException - if the SSOToken used to create the PolicyManager has become invalid
PolicyException - for any other abnormal condition

getSelectedConditionTypeNames

public Set getSelectedConditionTypeNames()
                                  throws SSOException,
                                         PolicyException
Returns a Set of valid condition type names configured for the organization. Examples are AuthLevelCondition, IPCondition.

Returns:
a Set of valid condition type names configured for the organization.
Throws:
SSOException - if the SSOToken used to create the PolicyManager has become invalid
PolicyException - for any other abnormal condition

getConditionTypeName

public String getConditionTypeName(Condition condition)
Returns the type of the Condition implementation. For example TimeCondition, DayTimeCondition, IPCondition.

Parameters:
condition - condition object for which this method will return its associated type
Returns:
type of the condition, e.g. AuthLevelConditon, IPCondition. Returns null if not present.

getI18NPropertiesFileName

protected String getI18NPropertiesFileName(String conditionType)
Returns the I18N properties file name that should be used to localize display names for the given condition type.

Parameters:
conditionType - condition type name
Returns:
String representing i18n properties file name

getI18NKey

public String getI18NKey(String conditionType)
Returns the I18N key to be used to localize the display name for the condition type name.

Parameters:
conditionType - condition type name
Returns:
String representing i18n key to obtain the display name

getDisplayName

public String getDisplayName(String conditionType)
Gets the display name for the condition type

Parameters:
conditionType - condition type
Returns:
display name for the condition type

getCondition

public Condition getCondition(String conditionType)
                       throws NameNotFoundException,
                              PolicyException
Returns an instance of the Condition given the condition type name.

Parameters:
conditionType - condition type name.
Returns:
an instance of the Condition given the condition type name.
Throws:
NameNotFoundException - if the Condition for the conditionType name is not found
PolicyException - for any other abnormal condition

getViewBeanURL

public String getViewBeanURL(Condition condition)
Gets the view bean URL given the Condition

Parameters:
condition - condition for which to get the view bean URL
Returns:
view bean URL defined for the condition plugin in the policy service PluginSchema.