/*
* 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: DirectCOSDefinition.java,v 1.3 2008/06/25 05:41:47 qcheng Exp $
*
* Portions Copyrighted 2011-2015 ForgeRock AS.
*/
/**
* This class represents a Direct (or Classic) COS definition.
* @supported.api
*/
/**
* NoArg Constructor
*/
public DirectCOSDefinition() {
}
/**
* Constructor with attribute set argument. The attribute set needs to
* contain all the required attributes for this definition: name,
* cosspecifier, cosattribute (with qualifier).
*
* @param attrSet
* the attribute set
*
* @throws UMSException
* The exception thrown from the DirectCOSDefinition constructor
* accepting a creation template and attribute set.
* @see com.iplanet.ums.cos.DirectCOSDefinition#DirectCOSDefinition
* (CreationTemplate, AttrSet)
* @supported.api
*/
}
/**
* Constructor with creation template and attribute set arguments.
*
* @param template
* the Creation template.
* @param attrSet
* the attribute set
*
* @throws UMSException
* The exception thrown from the parent class constructor.
* @see com.iplanet.ums.PersistentObject#PersistentObject (CreationTemplate,
* AttrSet)
* @supported.api
*/
throws UMSException {
}
/**
* Sets the name of this COS.
*
* @param name
* the name of this COS.
* @supported.api
*/
}
/**
* Returns the name of this COS.
*
* @return the name of this COS
* @supported.api
*/
}
return attributeValue;
}
/**
* Adds the COS attribute to the definition. The COS attribute is the name
* of the attribute for which you want to generate a value.
*
* @param attrName
* The name of the attribute (for example, mailQuota)
* @param qualifier
* An integer representing the following values: "default" - The
* server only returns a generated value if there is no
* corresponding attribute value stored with the entry.
* "override" - This value will always be generated by the server
* (it will override entry values). "operational" - the attribute
* will only be returned if it is requested in the search.
* "operational" can be combined with "default" or "override".
* These values are represented as integers in the ICOSDefinition
* interface.
*
* @throws UMSException
* The exception thrown from the data layer.
* @supported.api
*/
throws UMSException {
throw new UMSException(msg);
}
}
/**
* Removes the COS attribute from the definition.
*
* @param attrName
* The name of the attribute to be removed.
* @supported.api
*/
}
/**
* Retrieves the COS attributes for this definition.
*
* @return String[] A string array of COS attributes (for example,
* mailquota).
* @supported.api
*/
return attr.getStringValues();
}
/**
* Sets the COS specifier. The COS specifier is the attribute value used in
* conjunction with the template entry's DN, to identify the template entry.
*
* @param cosSpecifier
* The COS specifier.
* @supported.api
*/
}
/**
* Returns the COS specifier.
*
* @return the COS specifier
*
* @see DirectCOSDefinition#setCOSSpecifier(String cosSpecifier)
* @supported.api
*/
}
return attributeValue;
}
/**
* Adds a COS Template to this COS definition. This COS definition must be
* persistent before adding the template.
*
* @param cosTemplate
* The COS Template to be added.
*
* @throws UMSException
* The exception thrown from the data layer.
* @supported.api
*/
throw new UMSException(msg);
}
this.save();
}
this.addChild(cosTemplate);
}
/**
* Removes a COS Template from this COS definition.
*
* @param name
* The name of the template to be removed.
*
* @throws UMSException
* The exception thrown from the data layer.
* @supported.api
*/
+ "," + this.getGuid());
this.removeChild(tGuid);
}
/**
* Removes all COS Templates from this COS definition.
*
* @throws UMSException
* The exception thrown from the data layer.
* @supported.api
*/
}
}
/**
* Returns a template from this definition given the name of the template.
*
* @param name
* The name of the template to be returned.
*
* @return The COS template.
*
* @throws COSNotFoundException
* The exception thrown if the COS template is not found.
* @throws UMSException
* The exception thrown from the data layer.
* @supported.api
*/
while (sr.hasMoreElements()) {
}
if (cosTemplate == null) {
throw new COSNotFoundException(msg);
}
return cosTemplate;
}
/**
* Returns all templates for this definition.
*
* @return a collection of COS templates
*
* @throws UMSException
* The exception thrown from the data layer.
* @supported.api
*/
while (sr.hasMoreElements()) {
}
return cosTemplates;
}
}