AttributeSchemaImpl.java revision 8af80418ba1ec431c8027fa9668e5678658d3611
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * The contents of this file are subject to the terms
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * of the Common Development and Distribution License
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * (the License). You may not use this file except in
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * compliance with the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * You can obtain a copy of the License at
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * https://opensso.dev.java.net/public/CDDLv1.0.html or
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * See the License for the specific language governing
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * permission and limitations under the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * When distributing Covered Code, include this CDDL
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Header Notice in each file and include the License file
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * If applicable, add the following below the CDDL Header,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * with the fields enclosed by brackets [] replaced by
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * your own identifying information:
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * "Portions Copyrighted [year] [name of copyright owner]"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * $Id: AttributeSchemaImpl.java,v 1.3 2008/06/25 05:44:03 qcheng Exp $
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Portions Copyrighted 2011 ForgeRock AS
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * The class <code>AttributeSchemaImpl</code> provides methods to access the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * schema of a configuration parameter.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Input variables
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Variables derived from the Node
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster private boolean isOptional;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster private boolean isServiceIdentifier;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster private boolean isStatusAttribute;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Attribute display properties
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Constructor used by ServiceSchema to instantiate AttributeSchema objects.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Retunrs the name of the attribute.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the type of the attribute.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the UI type of the attribute; or null if UI type is not defined.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the syntax of the attribute.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the I18N key to describe the configuration attribute.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the value of the cosQualifier for this attribute. Either default,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * overrid, operational or merge-cos.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return the value of the cosQualifier for this attribute.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the default values of the attribute.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster defaultValues = defaultsObject.getDefaultValues();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster if ((defaultValues != null) && (!defaultValues.isEmpty())) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // return (new HashSet());
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the default values of the attribute.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param envParams
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Map of environment parameter to a set of values
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return default values for the attribute
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster defaultValues = defaultsObject.getDefaultValues(envParams);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster if ((defaultValues != null) && (!defaultValues.isEmpty())) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // return (new HashSet());
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the possible choice values for the attribute if the attribute
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * type is either <code>SINGLE_CHOICE</code> or
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * <code>MULTIPLE_CHOICE</code>.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return choice values for the attribute
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster return ((String[]) ret.toArray(new String[ret.size()]));
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the possible choice values for the attribute if the attribute
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * type is either <code>SINGLE_CHOICE</code> or
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * <code>MULTIPLE_CHOICE</code>.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param envParams
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Map of environment parameter to a set of values
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return choice values for the attribute
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public String[] getChoiceValues(Map envParams) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster choiceValues = choiceObject.getChoiceValues(envParams);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster return ((String[]) ret.toArray(new String[ret.size()]));
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the choice values as a Map.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return choice values for the attribute and its i18n key
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster return (new HashMap());
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the choice values as a set.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return choice values for the attribute
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster return (new HashSet());
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the choice values as a Map.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param envParams
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Map of environment parameter to a set of values
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return choice values for the attribute
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster protected Map getChoiceValuesMap(Map envParams) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster choiceValues = choiceObject.getChoiceValues(envParams);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster return (new HashMap());
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the choice values as a set.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param envParams
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Map of environment parameter to a set of values
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return choice values for the attribute
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster protected Set getChoiceValuesSet(Map envParams) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster choiceValues = choiceObject.getChoiceValues(envParams);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster return (new HashSet());
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the I18N key for the given choice value.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return the I18N key for the given choice value
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public String getChoiceValueI18NKey(String cValue) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the start range if the attribute syntax is either
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * <code>NUMBER_RANGE</code> or <code>DECIMAL_RANGE</code>.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the end range if the attribute syntax is either
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * <code>NUMBER_RANGE</code> or <code>DECIMAL_RANGE</code>.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Method to get the validator name for using to validate this service
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return the validator name
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the minimum number of values for the attribute if the attribute
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * is of type <code>MULTIPLE_CHOICE</code>.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public int getMinValue() {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the maximum number of values for the attribute if the attribute
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * is of type <code>MULTIPLE_CHOICE</code>.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public int getMaxValue() {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the string value for BooleanTrueValue.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Retruns the I18N Key for BooleanTrueValue.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the string value for BooleanFalseValue.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the I18N Key for BooleanFalseValue.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Checks if the attribute is an optional attribute.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public boolean isOptional() {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Chekcs if the attribute is a service identifier (i.e., in the case of
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * LDAP it would be the COS Specifier attribute).
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public boolean isServiceIdentifier() {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Checks if the attribute allows to have resource name.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public boolean isResourceNameAllowed() {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Checkds if the attribute is a service's status attribute.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public boolean isStatusAttribute() {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Method to get service specific attributes. It return the value of the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * "any" attribute, if set in the XML schema for the service
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns URL of the view bean for the attribute.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return URL for view bean
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * String represenation of the AttributeSchema
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster buf.append("\n\tDefault values=").append(defaultValues);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster buf.append("\n\tChoice Values=").append(choiceValues);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster buf.append("\n\tRangeStart=").append(rangeStart);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster buf.append("\n\tCoS Qualifier=").append(cosQualifier);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster buf.append("\n\tView Bean URL=").append(attributeViewBeanURL);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster buf.append("\n\tisOptional=").append(isOptional);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster buf.append("\n\tisServiceIdentifier=").append(isServiceIdentifier);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster buf.append("\n\tisResourceNameAllowed=").append(isResourceNameAllowed);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster buf.append("\n\tisStatusAttribute=").append(isStatusAttribute);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster buf.append("\n\tisSearchable=").append(isSearchable);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Updates the attribute schema object based on information in the XML node
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Copy the XML node
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Get attribute name
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster name = XMLUtils.getNodeAttributeValue(n, SMSUtils.NAME);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Get I18N key
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster key = XMLUtils.getNodeAttributeValue(n, SMSUtils.I18N_KEY);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Get Attribute type
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster String attrType = XMLUtils.getNodeAttributeValue(n,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Class attrClass = (AttributeSchema.Type.LIST).getClass();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster type = (AttributeSchema.Type) (attrClass.getField(attrType
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster .toUpperCase()).get(AttributeSchema.Type.LIST));
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // do nothing, use the default
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Get attribute UI type
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster String attrUIType = XMLUtils.getNodeAttributeValue(n,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Class attrClass = (AttributeSchema.UIType.LINK).getClass();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // do nothing, use the default
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Get attribute syntax
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster String attrSyntax = XMLUtils.getNodeAttributeValue(n,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Class syntaxClass = (AttributeSchema.Syntax.STRING).getClass();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // do nothing, use the default setting
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // If syntax is boolean, get the "true" & "false" values
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster if ((syntax.equals(AttributeSchema.Syntax.BOOLEAN))
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster SMSUtils.ATTRIBUTE_BOOLEAN_VALUES_ELEMENT)) != null)) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Get the True value
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster if ((node = XMLUtils.getChildNode(booleanValue,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster SMSUtils.ATTRIBUTE_TRUE_BOOLEAN_ELEMENT)) != null) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster trueBooleanValue = XMLUtils.getValueOfValueNode(node);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster trueValueKey = XMLUtils.getNodeAttributeValue(node,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Get the false value
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster if ((node = XMLUtils.getChildNode(booleanValue,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster SMSUtils.ATTRIBUTE_FALSE_BOOLEAN_ELEMENT)) != null) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster falseBooleanValue = XMLUtils.getValueOfValueNode(node);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster falseValueKey = XMLUtils.getNodeAttributeValue(node,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Get choice values, if applicable
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster if (type.equals(AttributeSchema.Type.SINGLE_CHOICE)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster || type.equals(AttributeSchema.Type.MULTIPLE_CHOICE)) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Node choiceValueNode = XMLUtils.getChildNode(n,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // If the sub-element ChoiceValuesClassName, use it
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Node cvClassName = XMLUtils.getChildNode(choiceValueNode,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster String className = XMLUtils.getNodeAttributeValue(
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // If choice class not present, use ChoiceValues element
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Choice object was not configured or error in obtaining it
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Iterator cit = XMLUtils.getChildNodes(choiceValueNode,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster SMSUtils.ATTRIBUTE_CHOICE_VALUE_ELEMENT).iterator();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster String i18nKey = XMLUtils.getNodeAttributeValue(cnode,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Get default values
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster .getChildNode(n, SMSUtils.ATTRIBUTE_DEFAULT_ELEMENT)) != null) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // If the sub-element DefaultValuesClassName, use it
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster String className = XMLUtils.getNodeAttributeValue(dvClassName,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster defaultsObject = (DefaultValues) c.newInstance();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // use default approach
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // If syntax is password, decrypt the attribute values
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster if ((syntax.equals(AttributeSchema.Syntax.PASSWORD) || syntax
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster .equals(AttributeSchema.Syntax.ENCRYPTED_PASSWORD))
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster "AttributeSchemaImpl: Unable to decode", e);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Set the cosQualifier
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster if ((cosQualifier = XMLUtils.getNodeAttributeValue(n,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Get range start
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Get range end
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Get minimum number of values
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster minValue = Integer.parseInt(XMLUtils.getNodeAttributeValue(n,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Get maximum number of values
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster maxValue = Integer.parseInt(XMLUtils.getNodeAttributeValue(n,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // get validator
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Check if the variable is optional
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster if (XMLUtils.getChildNode(n, SMSUtils.ATTRIBUTE_OPTIONAL) != null) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // COS identifer
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster if (XMLUtils.getChildNode(n, SMSUtils.ATTRIBUTE_SERVICE_ID) != null) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Resource name allowed
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster if (XMLUtils.getChildNode(n, SMSUtils.ATTRIBUTE_RESOURCE_NAME) != null){
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Service Status attribute
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster if (XMLUtils.getChildNode(n, SMSUtils.ATTRIBUTE_STATUS_ATTR) != null) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Any attribute
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster any = XMLUtils.getNodeAttributeValue(n, SMSUtils.ATTRIBUTE_ANY);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Get view bean url
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster attributeViewBeanURL = XMLUtils.getNodeAttributeValue(n,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster String srch = XMLUtils.getNodeAttributeValue(n, SMSUtils.ISSEARCHABLE);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster if ((srch != null) && (srch.equalsIgnoreCase("yes"))) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster for (int i = 0; i < children.getLength(); i++) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster if (n.getNodeName().equals(SMSUtils.ATTRIBUTE_VALUE)) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns <code>true</code> if the attribute is searchable;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * <code>false</code> otherwise
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return <code>true</code> if the attribute is an optional attribute;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * <code>false</code> otherwise
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public boolean isSearchable() {