Class AttributeSchemaImpl

  • Direct Known Subclasses:
    ActionSchema

    public class AttributeSchemaImpl
    extends Object
    The class AttributeSchemaImpl provides methods to access the schema of a configuration parameter.
    • 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.
      • 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, or null if the list order is not defined.
      • 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<String> getDefaultValues()
        Returns the default values of the 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 either SINGLE_CHOICE or MULTIPLE_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 either SINGLE_CHOICE or MULTIPLE_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 either NUMBER_RANGE or DECIMAL_RANGE.
      • getEndRange

        public String getEndRange()
        Returns the end range if the attribute syntax is either NUMBER_RANGE or DECIMAL_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 type MULTIPLE_CHOICE.
      • getMaxValue

        public int getMaxValue()
        Returns the maximum number of values for the attribute if the attribute is of type MULTIPLE_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
        Overrides:
        toString in class Object
      • getAttributeSchemaNode

        public Node getAttributeSchemaNode()
      • getValues

        protected static Set getValues​(Node node)
      • isSearchable

        public boolean isSearchable()
        Returns true if the attribute is searchable; false otherwise
        Returns:
        true if the attribute is an optional attribute; false otherwise