Package com.iplanet.ums.cos
Class DirectCOSDefinition
- java.lang.Object
-
- com.iplanet.ums.PersistentObject
-
- com.iplanet.ums.cos.DirectCOSDefinition
-
- All Implemented Interfaces:
ICOSDefinition,ISearch,IUMSConstants,Serializable
public class DirectCOSDefinition extends PersistentObject implements ICOSDefinition
This class represents a Direct (or Classic) COS definition.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.iplanet.ums.PersistentObject
COMPUTED_MEMBER_ATTR_NAME
-
Fields inherited from interface com.iplanet.ums.cos.ICOSDefinition
COSATTRIBUTE, COSSPECIFIER, COSSUPERDEF_NAME_SEARCH, COSSUPERDEF_SEARCH, COSTARGETTREE, COSTEMPLATEDN, DEFAULT, DEFAULT_NAMING_ATTR, ICOSSPECIFIER, maxQualifier, MERGE_SCHEMES, minQualifier, OPERATIONAL, OVERRIDE, qualifiers
-
Fields inherited from interface com.iplanet.ums.IUMSConstants
ADD_NULL_OBJ, ATTR_NOT_ALLOWED, ATTRIBUTETYPE_NOT_FOUND, BAD_ATTRNAMES, BAD_CHILD_OBJ, BAD_CLASS, BAD_COS_ATTR_QUALIFIER, BAD_GUID, BAD_ID, BAD_NAMING_ATTR, BAD_OBJ_TO_ADD, BAD_PRINCIPAL_HDL, BAD_STRUCTURE_TEMPLATE_PRIORITY, BAD_TEMPLATE, BAD_TOKEN_HDL, COMPOSE_GUID_FAILED, CONFIG_MGR_ERROR, COS_DEF_OR_TARGET_OBJECT_NULL, COS_DEFINITION_NOT_FOUND, COS_DEFINITION_NOT_PERSISTENT, COS_TARGET_OBJECT_DIFFERENT_TREE, COS_TARGET_OBJECT_NOT_PERSISTENT, COS_TEMPLATE_NOT_FOUND, DATA_CONSTRAINT, DEFINITION_NOT_PERSISTENT, DEL_NULL_OBJ, DSCFG_CONNECTFAIL, DSCFG_CTRLERROR, DSCFG_DIRSERVER_NODE_EXPECTED, DSCFG_INVALID_BASE_DN, DSCFG_JSSSFFAIL, DSCFG_NO_FILE_PATH, DSCFG_NOCFGMGR, DSCFG_SERVER_NOT_FOUND, DSCFG_SERVERGROUP_NODE_EXPECTED, DSCFG_UNSUPPORTEDLSTNRTYPE, DSCFG_UNSUPPORTEDSERVERCTRL, ENTRY_ALREADY_EXISTS, ENTRY_NOT_FOUND, ERROR_CM, ERROR_CM_INITIATE, ILLEGAL_ADGROUP_SCOPE, ILLEGAL_GROUP_SCOPE, INSTANCE_FAILED, INSUFFICIENT_ACCESS_ADD, INSUFFICIENT_ACCESS_DELETE, INVALID_COS_ATTRIBUTE_QUALIFIER, INVALID_COSDEFINITION, INVALID_TOKEN, MISSING_TEMPL_NAME, MULTIPLE_ENTRY, NEW_INSTANCE_FAILED, NEXT_ENTRY_FAILED, NO_NAMING_ATTR, NO_POLICY_DOMAIN, NO_RECURSION_ALLOW, NO_REQUIRED, NO_VALUE, NULL_GUIDS, NULL_PRINCIPAL, NULL_SESSION, NULL_TOKEN, OBJECT_NOT_PERSISTENT, OBJECTCLASS_NOT_FOUND, PERSISTENT_OBJECT_PARAM_NULL, POLICIES_DO_NOT_MATCH_BY_NAME_RESOURCE_ACTION, POLICY_DOMAIN_NOT_FOUND, POLICY_EXISTS_FOR_NAME, POLICY_EXISTS_FOR_RESOURCE_ACTION, POLICY_NOT_FOUND, POLICY_ROOT_NOT_FOUND, READ_ATTRIBUTES_ERROR, READING_LDIF_FAILED, REPLACE_DEFINITION_NOT_PERSISTENT, ROLE_CONTAINED, SEARCH_FAILED, services_validator_initialize_failed, services_validator_invalid_attr_name, services_validator_invalid_attr_schema, services_validator_schema_does_not_exist, SMS_ADD_SUB_CONFIG_FAILED, SMS_ADMIN_LIMIT_EXCEEDED, SMS_ATTR_LIST_NEEDED, SMS_ATTR_NAME_NOT_FOUND, SMS_ATTR_OR_VAL_EXISTS, SMS_ATTR_SYNTAX_NOT_FOUND, SMS_AUTHENTICATION_ERROR, SMS_CAN_NOT_CONSTRUCT_SERVICE_MANAGER, SMS_CANNOT_CREATE_INSTANCE, SMS_CANNOT_CREATE_PLACE_HOLDER_NODE, SMS_EVENT_NOTIFICATION_FAILED, SMS_failed_to_get_schema_manager, SMS_INSUFFICIENT_ACCESS_RIGHTS, SMS_INVALID_ATTR_ENTRY, SMS_INVALID_ATTR_NAME, SMS_INVALID_CLASS_NAME, SMS_INVALID_CONFIG_NAME, SMS_INVALID_DN, SMS_INVALID_METHOD, SMS_INVALID_OP_VALUE, SMS_INVALID_PARAMETERS, SMS_INVALID_SEARCH_BASE, SMS_INVALID_SEARCH_ORDER_PARAMETER, SMS_INVALID_SEARCH_PATTERN, SMS_LDAP_NOT_SUPPORTED, SMS_LDAP_OPERATION_FAILED, SMS_LDAP_REFERRAL_EXCEPTION, SMS_LDAP_SERVER_BUSY, SMS_NO_ATTRIBUTE_IN_ENTRY, SMS_NO_SUCH_ATTRIBUTE, SMS_NO_SUCH_OBJECT, SMS_NODE_ALREADY_EXISTS, SMS_OC_NAME_NOT_FOUND, SMS_organization_already_exists_no_args, SMS_READONLY_OBJ, SMS_SERVER_DOWN, SMS_SERVER_INSTANCE_NOT_FOUND, SMS_service_already_exists, SMS_service_already_exists_no_args, SMS_service_does_not_exist, SMS_SERVICE_NAME_NOT_FOUND, SMS_SERVICE_NODE_NOT_FOUND, SMS_services_node_does_not_exist, SMS_SMSSchema_exception_message, SMS_SMSSchema_invalid_input_stream, SMS_SMSSchema_invalid_xml_document, SMS_SMSSchema_no_schema_element, SMS_SMSSchema_no_service_element, SMS_SMSSchema_parser_error, SMS_SMSSchema_service_notfound, SMS_SUB_CONFIG_DOES_NOT_EXIST, SMS_TIME_LIMIT_EXCEEDED, SMS_UNEXPECTED_LDAP_EXCEPTION, SMS_UNKNOWN_EXCEPTION_OCCURRED, SMS_VALIDATOR_CANNOT_INSTANTIATE_CLASS, SMS_VALUE_DOES_NOT_EXIST, SMS_xml_invalid_doc_type, SMS_XML_PARSER_EXCEPTION, SMSSCHEMA_SERVICE_NOTFOUND, SSO_ILLEGALACCESS, SSO_NOPROVIDERCLASS, SSO_NOPROVIDERINSTANCE, SSO_NOPROVIDERPROPERTY, STRUCTURE_TEMPLATE_ATTRSET_NULL, TEMPLATE_NO_ATTR, UMS_BUNDLE_NAME, UMS_DEBUG, UMS_PKG, UNABLE_TO_ADD_ENTRY, UNABLE_TO_DELETE_ENTRY, UNABLE_TO_READ_ENTRY, UNMATCHED_CLASS, USER_NOT_IN_GROUP_SCOPE
-
-
Constructor Summary
Constructors Constructor Description DirectCOSDefinition()NoArg ConstructorDirectCOSDefinition(AttrSet attrSet)Constructor with attribute set argument.DirectCOSDefinition(CreationTemplate template, AttrSet attrSet)Constructor with creation template and attribute set arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCOSAttribute(String attrName, int qualifier)Adds the COS attribute to the definition.voidaddCOSTemplate(COSTemplate cosTemplate)Adds a COS Template to this COS definition.String[]getCOSAttributes()Retrieves the COS attributes for this definition.StringgetCOSSpecifier()Returns the COS specifier.COSTemplategetCOSTemplate(String name)Returns a template from this definition given the name of the template.CollectiongetCOSTemplates()Returns all templates for this definition.StringgetName()Returns the name of this COS.voidremoveCOSAttribute(String attrName)Removes the COS attribute from the definition.voidremoveCOSTemplate(String name)Removes a COS Template from this COS definition.voidremoveCOSTemplates()Removes all COS Templates from this COS definition.voidsetCOSSpecifier(String cosSpecifier)Sets the COS specifier.voidsetName(String name)Sets the name of this COS.-
Methods inherited from class com.iplanet.ums.PersistentObject
addACI, addAttributeValue, addChild, changePassword, deleteACI, getACI, getACI, getAttribute, getAttribute, getAttributeNames, getAttributes, getAttributes, getAttributes, getAttrSet, getChildren, getChildren, getChildren, getDN, getGuid, getNamingAttribute, getParentGuid, getParentObject, getRoles, idToDN, isMemberOf, isPersistent, modify, modify, modify, remove, removeAttribute, removeAttributeValue, removeChild, removeChild, rename, replaceACI, save, search, search, search, setAttribute, setAttribute, setAttrSet, setGuid, toString
-
-
-
-
Constructor Detail
-
DirectCOSDefinition
public DirectCOSDefinition()
NoArg Constructor
-
DirectCOSDefinition
public DirectCOSDefinition(AttrSet attrSet) throws UMSException
Constructor with attribute set argument. The attribute set needs to contain all the required attributes for this definition: name, cosspecifier, cosattribute (with qualifier).- Parameters:
attrSet- the attribute set- Throws:
UMSException- The exception thrown from the DirectCOSDefinition constructor accepting a creation template and attribute set.- See Also:
(CreationTemplate, AttrSet)
-
DirectCOSDefinition
public DirectCOSDefinition(CreationTemplate template, AttrSet attrSet) throws UMSException
Constructor with creation template and attribute set arguments.- Parameters:
template- the Creation template.attrSet- the attribute set- Throws:
UMSException- The exception thrown from the parent class constructor.- See Also:
(CreationTemplate, AttrSet)
-
-
Method Detail
-
setName
public void setName(String name)
Sets the name of this COS.- Specified by:
setNamein interfaceICOSDefinition- Parameters:
name- the name of this COS.
-
getName
public String getName()
Returns the name of this COS.- Specified by:
getNamein interfaceICOSDefinition- Returns:
- the name of this COS
-
addCOSAttribute
public void addCOSAttribute(String attrName, int qualifier) throws UMSException
Adds the COS attribute to the definition. The COS attribute is the name of the attribute for which you want to generate a value.- Specified by:
addCOSAttributein interfaceICOSDefinition- Parameters:
attrName- The name of the attribute (for example, mailQuota)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.
-
removeCOSAttribute
public void removeCOSAttribute(String attrName)
Removes the COS attribute from the definition.- Specified by:
removeCOSAttributein interfaceICOSDefinition- Parameters:
attrName- The name of the attribute to be removed.
-
getCOSAttributes
public String[] getCOSAttributes()
Retrieves the COS attributes for this definition.- Specified by:
getCOSAttributesin interfaceICOSDefinition- Returns:
- String[] A string array of COS attributes (for example, mailquota).
-
setCOSSpecifier
public void setCOSSpecifier(String cosSpecifier)
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.- Parameters:
cosSpecifier- The COS specifier.
-
getCOSSpecifier
public String getCOSSpecifier()
Returns the COS specifier.- Returns:
- the COS specifier
- See Also:
setCOSSpecifier(String cosSpecifier)
-
addCOSTemplate
public void addCOSTemplate(COSTemplate cosTemplate) throws UMSException
Adds a COS Template to this COS definition. This COS definition must be persistent before adding the template.- Parameters:
cosTemplate- The COS Template to be added.- Throws:
UMSException- The exception thrown from the data layer.
-
removeCOSTemplate
public void removeCOSTemplate(String name) throws UMSException
Removes a COS Template from this COS definition.- Parameters:
name- The name of the template to be removed.- Throws:
UMSException- The exception thrown from the data layer.
-
removeCOSTemplates
public void removeCOSTemplates() throws UMSExceptionRemoves all COS Templates from this COS definition.- Throws:
UMSException- The exception thrown from the data layer.
-
getCOSTemplate
public COSTemplate getCOSTemplate(String name) throws COSNotFoundException, UMSException
Returns a template from this definition given the name of the template.- Parameters:
name- The name of the template to be returned.- Returns:
- The COS template.
- Throws:
COSNotFoundException- The exception thrown if the COS template is not found.UMSException- The exception thrown from the data layer.
-
getCOSTemplates
public Collection getCOSTemplates() throws UMSException
Returns all templates for this definition.- Returns:
- a collection of COS templates
- Throws:
UMSException- The exception thrown from the data layer.
-
-