public class ConfigManagerUMS extends Object implements Serializable
ConfigManager cm = ConfigManager.getConfigManager(); AttrSet tempAtts= cm.getTemplate("o=foo,o=isp", "BasicUser"); Set hs = cm.getEntity("o=foo,o=isp", "com.iplanet.ums.PeopleContainer" ); String [] sTemplateNames = cm.getCreationTemplateNames("o=foo, o=isp"); *ConfigManager obsoletes the use of previous Config class which opens up resource file and reading whenever a configuation is needed. ConfigManager speeds up the retrieval in caching the configurations at start up time once as a singleton and share it among the ums package. ConfigManager uses the default PROXY as AuthPrincipal for this instance of the server.
Modifier and Type | Method and Description |
---|---|
String[][] |
getClassResolver()
Gets the mapping between ldap entry objectclasses and the UMS Java class.
|
static ConfigManagerUMS |
getConfigManager()
Get the singleton instance of Config Manager.
|
Set |
getConfigTemplateNames(Guid guid,
String template,
int lookup) |
AttrSet |
getCreationTemplate(Guid guid,
String templateName,
int lookup)
Returns Attribute Key-Value set of a
CreationTemplate entry. |
AttrSet |
getCreationTemplateForClass(Guid guid,
String className,
int lookup)
Returns the Attribute key-value pair of Creation templates under the
given organization by matching the the
javaclass attribute
to the name provided. |
Set |
getCreationTemplateNames(Guid guid)
Returns an array of the Creation Template names under the
given organization.
|
Set |
getEntity(Guid guid,
String name)
Returns the Attribute Key-Value set of a Structure Template
entry.
|
AttrSet |
getSearchTemplate(Guid guid,
String templateName,
int lookup)
Returns the Attribute Key-Value set of a Search or Creation
Template entry.
|
Set |
getSearchTemplateNames(Guid guid)
Returns a set of the Search Template names under the given
organization.
|
void |
replaceCreationTemplate(Guid guid,
String templateName,
AttrSet attrSet)
Replaces an existing template.
|
protected static final String UMS_SRVC
public static ConfigManagerUMS getConfigManager() throws ConfigManagerException
ConfigManagerException
public Set getConfigTemplateNames(Guid guid, String template, int lookup) throws ConfigManagerException
ConfigManagerException
public Set getEntity(Guid guid, String name) throws ConfigManagerException
guid
- GUI specifies the starting location for
ConfigManager
to begin searching for DIT
information (for structural entities).name
- Class name of the object for which the DIT information
applies.ConfigManagerException.
ConfigManagerException
public AttrSet getSearchTemplate(Guid guid, String templateName, int lookup) throws ConfigManagerException
guid
- Specifies the starting location for
ConfigManager
to begin searching for DIT
information (for structural entities).templateName
- Template name.lookup
- AttrSet
value pertaining to the structural template
in the DIT. Usage:
AttrSet a = CM.getSearchTemplateForClass( principal, "o=foo,o=org", "BasicUserSearch");Converts the guid to
/iDA/foo/org
(for internal SMS
representation). Looks for Search Template with attribute "name"
matching BasicUserSearch
and returns the first one
matched. If found in cache, it returns that. Else it looks it up
in the Directory through SMS (traverses the tree if need be).ConfigManagerException.
ConfigManagerException
public AttrSet getCreationTemplate(Guid guid, String templateName, int lookup) throws ConfigManagerException
CreationTemplate
entry.
It searches for all entries and returns the entry for which the
"name" Attribute matches the provided name.guid
- Specifies the starting location for
ConfigManager
to begin searching for DIT information
(for structural entities).templateName
- Template name.lookup
- AttrSet
value pertaining to the structural template
in the DIT. Usage:
AttrSet a = CM.getCreationTemplateForClass( principal, "o=foo,o=org", "BasicUser");Converts the guid to
/iDA/foo/org
(for internal SMS
representation). Looks for Search Template with attribute "name"
matching BasicUser
and returns the first one
matched. If found in cache, it returns that. Else it looks it
up in the Directory through SMS (traverses the tree if need be)ConfigManagerException.
ConfigManagerException
public AttrSet getCreationTemplateForClass(Guid guid, String className, int lookup) throws ConfigManagerException
javaclass
attribute
to the name provided. If no templates are listed under the current
organization then it traverses the org tree till it finds one, or returns
null.guid
- Organization DN.className
- Name of javaclass
Attribute to be matched.lookup
- AttrSet a = CM.getCreationTemplateForClass( principal, "o=foo,o=org", "com.iplanet.ums.BasicUser");Converts the guid to
/iDA/org
. Looks under
CreationTemplates/templates/org
for nodes where
attribute "class" matches com.iplanet.ums.BasicUser
.
First looks up cache, if not found in cache, then looks up in
Directory.ConfigManagerException
public Set getCreationTemplateNames(Guid guid) throws ConfigManagerException
guid
- Organization to look under.ConfigManagerException
public Set getSearchTemplateNames(Guid guid) throws ConfigManagerException
guid
- Organization to look under.ConfigManagerException.
ConfigManagerException
public String[][] getClassResolver() throws ConfigManagerException
ConfigManagerException.
- Usage: String[][] a = CM.getClassResolver() Looks up the attributes at
the top level /ObjectResolver/templates/iDA Caches it first.ConfigManagerException
public void replaceCreationTemplate(Guid guid, String templateName, AttrSet attrSet) throws ConfigManagerException
guid
- the GUID it is looking under.templateName
- Name of the template.attrSet
- attribute-values pair to be replaced.ConfigManagerException.
ConfigManagerException
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.