SMSUtils.java revision 28de0461d82a4e6471c71d793af7a9492ca98dd3
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: SMSUtils.java,v 1.5 2008/07/11 01:46:21 arviranga Exp $
*
* Portions Copyrighted 2011-2015 ForgeRock AS.
*/
public class SMSUtils {
public static final String ORG_ATTRIBUTE_SCHEMA =
"OrganizationAttributeSchema";
public static final String ORG_ATTRIBUTE_VALUE_PAIR =
"OrganizationAttributeValuePair";
protected static final String PROPERTIES_VIEW_BEAN_URL =
"propertiesViewBeanURL";
protected static final String PLUGIN_CONFIG_SCHEMA_NAME =
"pluginSchemaName";
protected static final String ATTRIBUTE_RESOURCE_NAME =
"IsResourceNameAllowed";
protected static final String ATTRIBUTE_VIEW_BEAN_URL =
"propertiesViewBeanURL";
protected static final String ATTRIBUTE_DEFAULT_CLASS =
"DefaultValuesClassName";
protected static final String ATTRIBUTE_CHOICE_CLASS =
"ChoiceValuesClassName";
protected static final String ATTRIBUTE_CHOICE_VALUES_ELEMENT =
"ChoiceValues";
protected static final String ATTRIBUTE_CHOICE_VALUE_ELEMENT =
"ChoiceValue";
protected static final String ATTRIBUTE_BOOLEAN_VALUES_ELEMENT =
"BooleanValues";
protected static final String ATTRIBUTE_TRUE_BOOLEAN_ELEMENT =
"BooleanTrueValue";
protected static final String ATTRIBUTE_FALSE_BOOLEAN_ELEMENT =
"BooleanFalseValue";
protected static int counter = 0;
static int getInstanceID() {
return counter++;
}
public static String getUniqueID() {
}
// Performs a deep copy of the Map
if (attributes == null) {
}
if (attributes.isEmpty()) {
return answer;
}
} else {
}
} else {
// Copy the HashSet
}
} else {
}
}
return answer;
}
}
return answer;
}
return answer;
}
private static void addAttributesToMap(SMSEntry entry, String[] attrs, Map<String, Set<String>> attrMap) {
// Get attribute name and value
if (idx == -1) {
// Error in attribute values
+ "\nIn SMSEntry: " + entry);
continue;
}
}
}
}
}
}
}
static void setAttributeValuePairs(SMSEntry e, Map<String, Object> attrs, Set<String> searchAttrNames)
throws SMSException {
}
// do nothing
if (isSearchable) {
} else {
}
// an attribute with no values
if (isSearchable) {
} else {
}
} else {
if (isSearchable) {
} else {
}
}
}
}
}
}
if (!srchValues.isEmpty()) {
}
}
}
static void addAttribute(SMSEntry e, String attrName, Set<String> values, Set<String> searchableAttrNames)
throws SMSException {
}
return;
}
}
} else {
}
}
}
return;
}
if (attrValues != null) {
}
}
}
if (searchableAttrValues != null) {
}
}
}
}
static void removeAttributeValues(SMSEntry e, String attrName, Set<String> values, Set searchableAttrNames)
throws SMSException {
return;
}
}
} else {
}
}
}
static void replaceAttributeValue(SMSEntry entry, String attrName, String oldValue, String newValue,
} else {
}
}
static void replaceAttributeValues(SMSEntry entry, String attrName, Set<String> oldValues, Set<String> newValues,
// Add other values
return;
}
}
} else {
}
}
}
return "";
}
}
}
}
/**
* Remove the validator attributes from the given attribute defaults map.
* @param attributeDefaults The attribute defaults.
* @param serviceSchema The service schema in which the attributes are specified.
* @return A copy of the attribute defaults with the validators removed.
*/
}
}
return subset;
}
}