Package com.sun.identity.sm
Class AttributeSchemaImpl
- java.lang.Object
-
- com.sun.identity.sm.AttributeSchemaImpl
-
- Direct Known Subclasses:
ActionSchema
public class AttributeSchemaImpl extends Object
The classAttributeSchemaImplprovides methods to access the schema of a configuration parameter.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAttributeSchemaImpl(Node node)Constructor used by ServiceSchema to instantiate AttributeSchema objects.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAny()Method to get service specific attributes.NodegetAttributeSchemaNode()StringgetChoiceValueI18NKey(String cValue)Returns the I18N key for the given choice value.String[]getChoiceValues()Returns the possible choice values for the attribute if the attribute type is eitherSINGLE_CHOICEorMULTIPLE_CHOICE.String[]getChoiceValues(Map envParams)Returns the possible choice values for the attribute if the attribute type is eitherSINGLE_CHOICEorMULTIPLE_CHOICE.protected MapgetChoiceValuesMap()Returns the choice values as a Map.protected MapgetChoiceValuesMap(Map envParams)Returns the choice values as a Map.protected SetgetChoiceValuesSet()Returns the choice values as a set.protected SetgetChoiceValuesSet(Map envParams)Returns the choice values as a set.StringgetCosQualifier()Returns the value of the cosQualifier for this attribute.Set<String>getDefaultValues()Returns the default values of the attribute.SetgetDefaultValues(Map envParams)Returns the default values of the attribute.StringgetEndRange()Returns the end range if the attribute syntax is eitherNUMBER_RANGEorDECIMAL_RANGE.SetgetExampleValues()Returns the example values of the attribute.StringgetFalseValue()Returns the string value for BooleanFalseValue.StringgetFalseValueI18NKey()Returns the I18N Key for BooleanFalseValue.StringgetI18NKey()Returns the I18N key to describe the configuration attribute.AttributeSchema.ListOrdergetListOrder()Returns the list order of the attribute, ornullif the list order is not defined.intgetMaxValue()Returns the maximum number of values for the attribute if the attribute is of typeMULTIPLE_CHOICE.intgetMinValue()Returns the minimum number of values for the attribute if the attribute is of typeMULTIPLE_CHOICE.StringgetName()Retunrs the name of the attribute.IntegergetOrder()Returns the order of this attribute.StringgetPropertiesViewBeanURL()Returns URL of the view bean for the attribute.StringgetResourceName()Returns the name of the attribute for CREST representation.StringgetStartRange()Returns the start range if the attribute syntax is eitherNUMBER_RANGEorDECIMAL_RANGE.AttributeSchema.SyntaxgetSyntax()Returns the syntax of the attribute.StringgetTrueValue()Returns the string value for BooleanTrueValue.StringgetTrueValueI18NKey()Retruns the I18N Key for BooleanTrueValue.AttributeSchema.TypegetType()Returns the type of the attribute.AttributeSchema.UITypegetUIType()Returns the UI type of the attribute; or null if UI type is not defined.StringgetValidator()Method to get the validator name for using to validate this service attributeprotected static SetgetValues(Node node)booleanisOptional()Checks if the attribute is an optional attribute.booleanisResourceNameAllowed()Checks if the attribute allows to have resource name.booleanisSearchable()Returnstrueif the attribute is searchable;falseotherwisebooleanisServiceIdentifier()Chekcs if the attribute is a service identifier (i.e., in the case of LDAP it would be the COS Specifier attribute).booleanisStatusAttribute()Checkds if the attribute is a service's status attribute.StringtoString()String represenation of the AttributeSchema
-
-
-
Constructor Detail
-
AttributeSchemaImpl
protected AttributeSchemaImpl(Node node)
Constructor used by ServiceSchema to instantiate AttributeSchema objects.
-
-
Method Detail
-
getName
public String getName()
Retunrs the name of the attribute.
-
getResourceName
public String getResourceName()
Returns the name of the attribute for CREST representation.
-
getType
public AttributeSchema.Type getType()
Returns the type of the attribute.
-
getUIType
public AttributeSchema.UIType getUIType()
Returns the UI type of the attribute; or null if UI type is not defined.
-
getListOrder
public AttributeSchema.ListOrder getListOrder()
Returns the list order of the attribute, ornullif the list order is not defined.
-
getSyntax
public AttributeSchema.Syntax getSyntax()
Returns the syntax of the attribute.
-
getI18NKey
public String getI18NKey()
Returns the I18N key to describe the configuration attribute.
-
getOrder
public Integer getOrder()
Returns the order of this attribute.- Returns:
- the order of this attribute, null if not defined
-
getCosQualifier
public String getCosQualifier()
Returns the value of the cosQualifier for this attribute. Either default, overrid, operational or merge-cos.- Returns:
- the value of the cosQualifier for this attribute.
-
getDefaultValues
public Set getDefaultValues(Map envParams)
Returns the default values of the attribute.- Parameters:
envParams- Map of environment parameter to a set of values- Returns:
- default values for the attribute
-
getExampleValues
public Set getExampleValues()
Returns the example values of the attribute.
-
getChoiceValues
public String[] getChoiceValues()
Returns the possible choice values for the attribute if the attribute type is eitherSINGLE_CHOICEorMULTIPLE_CHOICE.- Returns:
- choice values for the attribute
-
getChoiceValues
public String[] getChoiceValues(Map envParams)
Returns the possible choice values for the attribute if the attribute type is eitherSINGLE_CHOICEorMULTIPLE_CHOICE.- Parameters:
envParams- Map of environment parameter to a set of values- Returns:
- choice values for the attribute
-
getChoiceValuesMap
protected Map getChoiceValuesMap()
Returns the choice values as a Map.- Returns:
- choice values for the attribute and its i18n key
-
getChoiceValuesSet
protected Set getChoiceValuesSet()
Returns the choice values as a set.- Returns:
- choice values for the attribute
-
getChoiceValuesMap
protected Map getChoiceValuesMap(Map envParams)
Returns the choice values as a Map.- Parameters:
envParams- Map of environment parameter to a set of values- Returns:
- choice values for the attribute
-
getChoiceValuesSet
protected Set getChoiceValuesSet(Map envParams)
Returns the choice values as a set.- Parameters:
envParams- Map of environment parameter to a set of values- Returns:
- choice values for the attribute
-
getChoiceValueI18NKey
public String getChoiceValueI18NKey(String cValue)
Returns the I18N key for the given choice value.- Returns:
- the I18N key for the given choice value
-
getStartRange
public String getStartRange()
Returns the start range if the attribute syntax is eitherNUMBER_RANGEorDECIMAL_RANGE.
-
getEndRange
public String getEndRange()
Returns the end range if the attribute syntax is eitherNUMBER_RANGEorDECIMAL_RANGE.
-
getValidator
public String getValidator()
Method to get the validator name for using to validate this service attribute- Returns:
- the validator name
-
getMinValue
public int getMinValue()
Returns the minimum number of values for the attribute if the attribute is of typeMULTIPLE_CHOICE.
-
getMaxValue
public int getMaxValue()
Returns the maximum number of values for the attribute if the attribute is of typeMULTIPLE_CHOICE.
-
getTrueValue
public String getTrueValue()
Returns the string value for BooleanTrueValue.
-
getTrueValueI18NKey
public String getTrueValueI18NKey()
Retruns the I18N Key for BooleanTrueValue.
-
getFalseValue
public String getFalseValue()
Returns the string value for BooleanFalseValue.
-
getFalseValueI18NKey
public String getFalseValueI18NKey()
Returns the I18N Key for BooleanFalseValue.
-
isOptional
public boolean isOptional()
Checks if the attribute is an optional attribute.
-
isServiceIdentifier
public boolean isServiceIdentifier()
Chekcs if the attribute is a service identifier (i.e., in the case of LDAP it would be the COS Specifier attribute).
-
isResourceNameAllowed
public boolean isResourceNameAllowed()
Checks if the attribute allows to have resource name.
-
isStatusAttribute
public boolean isStatusAttribute()
Checkds if the attribute is a service's status attribute.
-
getAny
public String getAny()
Method to get service specific attributes. It return the value of the "any" attribute, if set in the XML schema for the service
-
getPropertiesViewBeanURL
public String getPropertiesViewBeanURL()
Returns URL of the view bean for the attribute.- Returns:
- URL for view bean
-
toString
public String toString()
String represenation of the AttributeSchema
-
getAttributeSchemaNode
public Node getAttributeSchemaNode()
-
isSearchable
public boolean isSearchable()
Returnstrueif the attribute is searchable;falseotherwise- Returns:
trueif the attribute is an optional attribute;falseotherwise
-
-