/*
* 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: AttrSet.java,v 1.4 2009/01/28 05:34:49 ww203982 Exp $
*
* Portions Copyrighted 2011-2015 ForgeRock AS.
*/
/**
* Represents a set of attributes
* @supported.api
*/
/**
* Empty Attribute Set.
* @supported.api
*/
/**
* No argument constructor
* @supported.api
*/
public AttrSet() {
}
/**
* Construct attribute set given an array of attributes.
*
* @param attrs
* array of attributes to be defined in the attribute set
* @supported.api
*/
for (int i = 0; i < size; i++) {
}
}
/**
* Construct attribute set given an attribute
*
* @param attr
* attribute to be defined in the attribute set
* @supported.api
*/
}
/**
* Construct AttrSet from LDAPAttributeSet
*
* @param ldapAttrSet
* LDAP attribute set
*
*/
}
}
}
/**
* Add one attribute to the AttrSet The attribute
* should have only string values
*
* @param attr
* attribute to be added to the set
* @supported.api
*/
return;
} else {
// attribute already exists,
// add new values to existing attribute
}
}
/**
* Add one attribute to the AttrSet The attribute
* should have only byte values
*
* @param attr
* attribute to be added to the set
* @supported.api
*/
} else {
// attribute already exists,
// add new values to existing attribute
}
}
/**
* Removes an exisiting attribute
*
* @param name
* attribute to be removed
* @supported.api
*/
if (index != -1) {
}
}
/**
* Remove a specified value for an attribute in the
* set
*
* @param attrName
* attribute name to be looked up
* @param delValue
* value to be deleted for the specified attribute
* @supported.api
*/
if (index != -1) {
}
}
}
/**
* Replace an existing attribute.
*
* @param attr
* attribute to be replaced
* @supported.api
*/
if (index != -1) {
} else {
}
}
/**
* Get names of attributes.
*
* @return Names of attributes in the set
* @supported.api
*/
for (int i = 0; i < size; i++) {
}
return names;
}
/**
* Gets the attribute contained in the set. If not
* found returns null object
*
* @param name
* name of the attribute to get
* @return attribute found
* @supported.api
*/
// We may probably want to clone. Not cloning now.
return findAttribute(name);
}
/**
* Enumerate the attributes contained in the attribute
* set
*
* @return enmeration of attributes in the set
* @supported.api
*/
// iterator would be preferred; returning Enumeration for backward
// compatibility
}
/**
* Gets the first string value right from a specified
* attribute
*
* @param attrName
* name of the attribute to be queried in the set
* @return the first string value found
* @supported.api
*/
}
return value;
}
/**
* Check if attrSet has this attribute
*
* @param attrName
* name of the attribute to be checked against the set
* @return true if found and false otherwise
* @supported.api
*/
boolean containsTheValue = false;
if (index != -1) {
containsTheValue = true;
}
return containsTheValue;
}
/**
* Check if this attrSet has the attribute with the
* given value
*
* @param attrName
* name of the attribute to be checked against the set
* @param value
* value of the attribute the attribute should contain
* @return true if found and false otherwise
* @supported.api
*/
boolean containsTheValue = false;
}
return containsTheValue;
}
/**
* Get the number of attributes in the Attribute Set
*
* @return number of attributes in the set
* @supported.api
*/
public int size() {
}
/**
* Get the attribute at an index that starts from 0
*
* @return the attribute at the given index
*/
}
/**
* Gets the index for an attribute contained in the set
*
* @return index that is zero based. If attrName is not found in the set,
* this method returns -1.
*/
int index = -1;
for (int i = 0; i < size; i++) {
index = i;
break;
}
}
return index;
}
/**
* Find the attribute gvien the attribute name
*
* @return attribute found, returns null if no such attribute exists
*/
for (int i = 0; i < size; i++) {
break;
}
}
}
return attr;
}
/**
* Return a copy of the object
*
* @return A copy of the object
* @supported.api
*/
for (int i = 0; i < size; i++) {
}
return attrSet;
}
/**
* Maps to an LDAPAttributeSet
*
* @return the equivalent LDAPAttributeSet
*/
for (int i = 0; i < size; i++) {
}
}
return ldapAttrSet;
}
/**
* Retrieves the string representation of an AttrSet
*
* @return string representation of the AttrSet.
* @supported.api
*/
for (int i = 0; i < size; i++) {
}
}
}
}
public boolean hasMoreElements() {
}
}
}