Class AMStoreConnection
- java.lang.Object
-
- com.iplanet.am.sdk.AMStoreConnection
-
- All Implemented Interfaces:
AMConstants
public final class AMStoreConnection extends Object implements AMConstants
Deprecated.As of Sun Java System Access Manager 7.1.TheAMStoreConnectionclass represents a connection to the Sun Java System Access Manager data store. It provides methods to create, remove and get different type of Sun Java System Access Manager SDK objects in the data tore.AMStoreConnectioncontrols and manages access to the data store.An instance of
AMStoreConnectionobject should always be obtained by anyone using the AM SDK since this object is the entry point to all other AM SDK managed objects. The constructor takes the SSO token of the user. Here is some sample code on how to get a user's attributes, using AM SDK:AMStoreConnection amsc = new AMStoreConnection(ssotoken); AMUser user = amsc.getUser(ssotoken.getPrincipal()); Map attributes = user.getAttributes();
AMStoreConnectionalso has other helper methods which are very useful. Some examples below:int otype = amsc.getAMObjectType(fullDN);
otypereturned is one of the managedAMObjecttypes, likeAMObject.USER,AMObject.ROLE,AMObject.ORGANIZATION. If the entry being checked in not of the type managed by AM SDK, then anAMExceptionis thrown.boolean exists = amsc.isValidEntry(fullDN);
If there is a
fullDNthat you want to know if it exists or not in the data store, then use the above method. The typical use of this method is in the case when you know that you need to get a managed object fromamsc, but you want to verify that it exists before you create the managed object instance:if (amsc.isValidEntry(userDN)) { AMUser user = amsc.getUser(userDN); - More code here - }Helper method
getOrganizationDN(): Use this method to perform a subtree scoped search for organization,based on various attribute values.String orgDN = amsc.getOrganizationDN("sun.com", null);The above method will return the DN of a organization, which matches the search criterias of having either domain name of
sun.com, Domain alias name ofsun.comor it's naming attribute value issun.com. More examples of how to use this method are provided in the Javadocs of the method below.
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringdefaultOrgDeprecated.protected static MaporgMapCacheDeprecated.static StringrootSuffixDeprecated.-
Fields inherited from interface com.iplanet.am.sdk.AMConstants
ADD_MEMBER, ADMIN_GROUPS_ENABLED_ATTR, ADMIN_ROLE_ATTR, ADMINISTRATION_SERVICE, CACHE_ENABLED_DISABLED_KEY, CACHE_MAX_SIZE_KEY, COMPLIANCE_SPECIAL_FILTER_ATTR, COMPLIANCE_USER_DELETION_ATTR, CONTAINER_DEFAULT_TEMPLATE_ROLE, CONTAINER_SUPPORTED_TYPES_ATTRIBUTE, DCT_ATTRIBUTE_LIST_ATTR, DCT_ENABLED_ATTR, DOMAIN_ADMINISTRATORS, DOMAIN_HELP_DESK_ADMINISTRATORS, EMAIL_ATTRIBUTE, FILTER_ATTR_NAME, INET_ADMIN_OBJECT_CLASS, INET_DOMAIN_STATUS_ATTR, INET_DOMAIN_STATUS_ATTRIBUTE, INVALID_USERID_CHARACTERS, OTHER_COSATTR_TYPE, POLICY_COSATTR_TYPE, POLICY_SUFFIX, PRE_POST_PROCESSING_MODULES_ATTR, REMOVE_ATTRIBUTE, REMOVE_MEMBER, REQUIRED_SERVICES_ATTR, ROLE_MANAGED_CONTAINER_DN_ATTRIBUTE, SCOPE_BASE, SCOPE_ONE, SCOPE_SUB, SERVICE_STATUS_ATTRIBUTE, STATIC_GROUP_DN_ATTRIBUTE, SUBSCRIBABLE_ATTRIBUTE, UNIQUE_ATTRIBUTE_LIST_ATTRIBUTE, UNIQUE_MEMBER_ATTRIBUTE, USER_CREATE_NOTIFICATION_LIST, USER_DELETE_NOTIFICATION_LIST, USER_ENCRYPTED_PASSWORD_ATTRIBUTE, USER_ENTRY_PROCESSING_IMPL, USER_MODIFY_NOTIFICATION_LIST, USER_PASSWORD_ATTRIBUTE, USER_SEARCH_RETURN_ATTR, USERID_PASSWORD_VALIDATION_CLASS
-
-
Constructor Summary
Constructors Constructor Description AMStoreConnection(SSOToken ssoToken)Deprecated.Gets the connection to the Sun Java System Access Manager data store if the Session is valid.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected static voidaddToOrgMapCache(SSOToken stoken, String dn)Deprecated.Protected method to update theorgMapCacheAMOrganizationcreateTopOrganization(String orgName, Map avPairs)Deprecated.Bootstraps the Organization tree by creating the Top Organization tree.protected static intdaysSinceModified(SSOToken stoken, String entryDN)Deprecated.Protected method to obtain the number of days since this DN was last modified.StringgetAMObjectName(int type)Deprecated.Take a supported type, and returns the matching name of the supported managed type.intgetAMObjectType(String dn)Deprecated.Returns the type of the object given its DN.static StringgetAMSdkBaseDN()Deprecated.Returns the root suffix for user management node.AMAssignableDynamicGroupgetAssignableDynamicGroup(String assignableDynamicGroupDN)Deprecated.Returns the handle to theAMAssignableDynamicGroupobject represented by DN.SetgetAttributeNames(String serviceName, AMSchema.Type schemaType)Deprecated.usecom.sun.identity.sm.ServiceSchemaManager.protected StringgetBaseDN(ServiceConfig sc)Deprecated.AMDynamicGroupgetDynamicGroup(String dynamicGroupDN)Deprecated.Returns the handle to theAMDynamicGroupobject represented by DN.AMEntitygetEntity(String eDN)Deprecated.Returns the handle to theAMEntityobject represented by DN.SetgetEntityTypes()Deprecated.Returns a set ofcom.iplanet.am.sdk.AMEntityTypeobjects, which is the set of objects which are supported by thecom.iplanet.am.sdk.AMEntityAPIs.AMFilteredRolegetFilteredRole(String roleDN)Deprecated.Returns the handle to theAMFilteredRoleobject represented by DN.static StringgetFilteredRoleNamingAttribute()Deprecated.This method is deprecated.AMGroupContainergetGroupContainer(String groupContainerDN)Deprecated.Returns the handle to theAMGroupContainerobject represented by DN.static StringgetGroupContainerNamingAttribute()Deprecated.This method is deprecated.static StringgetGroupNamingAttribute()Deprecated.This method is deprecated.StringgetI18NPropertiesFileName(String serviceName)Deprecated.Returns the I18N properties file name that contains the internationalized messages.static StringgetNamingAttribute(int objectType)Deprecated.Returns the naming attribute of an object type.static StringgetObjectName(int type)Deprecated.Take a supported type, and returns the matching name of the supported managed type.AMOrganizationgetOrganization(String orgDN)Deprecated.Returns the handle to theAMOrganizationobject represented by DN.AMOrganizationalUnitgetOrganizationalUnit(String orgUnitDN)Deprecated.Returns the handle to theAMOrganizationalUnitobject represented by DN.static StringgetOrganizationalUnitNamingAttribute()Deprecated.This method is deprecated.StringgetOrganizationDN(String domainname, String orgSearchTemplate)Deprecated.Returns the DN of the organization, using thedomainnameprovided and thesearchTemplate(if provided).static StringgetOrganizationNamingAttribute()Deprecated.This method is deprecated.AMPeopleContainergetPeopleContainer(String peopleContainerDN)Deprecated.Returns the handle to theAMPeopleContainerobject represented by DN.static StringgetPeopleContainerNamingAttribute()Deprecated.This method is deprecated.AMTemplategetPolicyTemplate(String templateDN)Deprecated.StringgetPropertiesViewBeanURL(String serviceName)Deprecated.Returns the URL of the view bean for the serviceAMResourcegetResource(String resourceDN)Deprecated.Returns the handle to theAMResourceobject represented by DN.AMRolegetRole(String roleDN)Deprecated.Returns the handle to theAMRoleobject represented by DN.static StringgetRoleNamingAttribute()Deprecated.This method is deprecated.AMSchemagetSchema(String serviceName, AMSchema.Type schemaType)Deprecated.This method has been deprecated.SetgetSchemaTypes(String serviceName)Deprecated.This method has been deprecated.SetgetServiceHierarchy()Deprecated.Returns the service hierarchy for all registered services.SetgetServiceNames()Deprecated.Returns the set of name of services that have been loaded to the data store.AMStaticGroupgetStaticGroup(String groupDN)Deprecated.Returns the handle to theAMStaticGroupobject represented by DN.SetgetTopLevelContainers()Deprecated.Returns the top level containers (Organizations, People Containers, Roles, etc) for the particular user based on single sign on token as the starting point in the tree.SetgetTopLevelOrganizations()Deprecated.Returns the "real" or "physical" top level organizations as the starting point in the tree.AMUsergetUser(String userDN)Deprecated.Returns the handle to theAMUserobject represented by DN.static StringgetUserNamingAttribute()Deprecated.This method is deprecated.protected booleanisRFC2247(ServiceConfig sc)Deprecated.booleanisValidEntry(String dn)Deprecated.Checks if the entry exists in the directory or not.voidpurge(String domainName, int graceperiod)Deprecated.This method takes an organization DN and purges all objects marked for deletion.voidpurgeGroup(String gid, String domainName, int graceperiod)Deprecated.This method takes a group name and a domain name, It uses default search templates to search for the organization and uses the deleted objects search filter for Groups as defined in the Administration Service of Access Manager.voidpurgeResource(String rid, String domainName, int graceperiod)Deprecated.This method takes a resource ID and a domain name, It uses default search templates to search for the organization and uses the deleted objects search filter for Resources as defined in the Administration Service of Access Manager.voidpurgeUser(String uid, String domainName, int graceperiod)Deprecated.This method takes a user ID and a domain name, It uses default search templates to search for the organization and uses the deleted objects search filter for Users as defined in the Administration Service of Access Manager.protected static voidupdateCache(String dn, int eventType)Deprecated.Protected method to updateorgMapCache.
-
-
-
Constructor Detail
-
AMStoreConnection
public AMStoreConnection(SSOToken ssoToken) throws SSOException
Deprecated.Gets the connection to the Sun Java System Access Manager data store if the Session is valid.- Parameters:
ssoToken- a valid SSO token object to authenticate before getting the connection- Throws:
SSOException- if single sign on token is invalid or expired.
-
-
Method Detail
-
getAMSdkBaseDN
public static String getAMSdkBaseDN()
Deprecated.Returns the root suffix for user management node.- Returns:
- root suffix for user management node.
-
getFilteredRoleNamingAttribute
public static String getFilteredRoleNamingAttribute()
Deprecated.This method is deprecated. UsegetNamingAttribute(int objectType)Returns the filtered role naming attribute.- Returns:
- filtered role naming attribute
-
getGroupContainerNamingAttribute
public static String getGroupContainerNamingAttribute()
Deprecated.This method is deprecated. UsegetNamingAttribute(int objectType)Returns the group container naming attribute.- Returns:
- group container naming attribute
-
getGroupNamingAttribute
public static String getGroupNamingAttribute()
Deprecated.This method is deprecated. UsegetNamingAttribute(int objectType)Returns the group naming attribute.- Returns:
- group naming attribute
-
getNamingAttribute
public static String getNamingAttribute(int objectType) throws AMException
Deprecated.Returns the naming attribute of an object type.- Parameters:
objectType- Object type can be one of the following:- Returns:
- the naming attribute corresponding to the
objectType - Throws:
AMException- if an error occurred in obtaining the naming attribute
-
getOrganizationNamingAttribute
public static String getOrganizationNamingAttribute()
Deprecated.This method is deprecated. UsegetNamingAttribute(int objectType)Returns the organization naming attribute.- Returns:
- organization naming attribute
-
getOrganizationalUnitNamingAttribute
public static String getOrganizationalUnitNamingAttribute()
Deprecated.This method is deprecated. UsegetNamingAttribute(int objectType)Returns the organizational unit naming attribute.- Returns:
- organizational unit naming attribute
-
getPeopleContainerNamingAttribute
public static String getPeopleContainerNamingAttribute()
Deprecated.This method is deprecated. UsegetNamingAttribute(int objectType)Returns the people container naming attribute.- Returns:
- people container naming attribute
-
getRoleNamingAttribute
public static String getRoleNamingAttribute()
Deprecated.This method is deprecated. UsegetNamingAttribute(int objectType)Returns the role naming attribute.- Returns:
- role naming attribute
-
getUserNamingAttribute
public static String getUserNamingAttribute()
Deprecated.This method is deprecated. UsegetNamingAttribute(int objectType)Returns the user naming attribute.- Returns:
- user naming attribute
-
getAMObjectType
public int getAMObjectType(String dn) throws AMException, SSOException
Deprecated.Returns the type of the object given its DN.- Parameters:
dn- DN of the object whose type is to be known.- Returns:
- the type of the object given its DN.
- Throws:
AMException- if the data store is unavailable or if the object type is unknown.SSOException- if single sign on token is invalid or expired.
-
getAMObjectName
public String getAMObjectName(int type)
Deprecated.Take a supported type, and returns the matching name of the supported managed type. For example, ifAMObject.USERis passed in, it will return "user" (one of the basic supported types in AM SDK. But this method (and configuration in the serviceDAI) can be used to extend the basic supported types to include customer-specific entities, like "agents", "printers" etc.- Parameters:
type- Integer type (as returned bygetAMObjectType)- Returns:
- identifier for the above type. Returns null if type is unknown.
-
getObjectName
public static String getObjectName(int type)
Deprecated.Take a supported type, and returns the matching name of the supported managed type. For example, ifAMObject.USERis passed in, it will return "user" (one of the basic supported types in AM SDK. But this method (and configuration in the serviceDAI) can be used to extend the basic supported types to include customer-specific entities, like "agents", "printers" etc.- Parameters:
type- Integer type (as returned bygetAMObjectType)- Returns:
- identifier for the above type. Returns null if type is unknown.
-
getAssignableDynamicGroup
public AMAssignableDynamicGroup getAssignableDynamicGroup(String assignableDynamicGroupDN) throws SSOException
Deprecated.Returns the handle to theAMAssignableDynamicGroupobject represented by DN. However, the validity of the handle returned by this method cannot be guaranteed, since the object is created in memory, and not instantiated from the data store. Using theAMAssignableDynamicGroupreturned from this method may result in exceptions thrown in the later part of the application, if the DN is not valid or represents an entry that does not exist.Validity of the DN can be verified is using
isValidEntry()method of the object returned.- Parameters:
assignableDynamicGroupDN- assignable dynamic group DN- Returns:
AMAssignableDynamicGroupobject represented by DN.- Throws:
SSOException- if single sign on token is invalid or expired.- See Also:
isValidEntry(java.lang.String)
-
getAttributeNames
public Set getAttributeNames(String serviceName, AMSchema.Type schemaType) throws AMException
Deprecated.usecom.sun.identity.sm.ServiceSchemaManager. getServiceAttributeNames(com.sun.identity.sm.SchemaType)Returns the service attribute names for a given service name and schema type.- Parameters:
serviceName- the name of the serviceschemaType- the type of service schema- Returns:
- Set of service attribute names
- Throws:
AMException- if an error is encountered while retrieving information.
-
getDynamicGroup
public AMDynamicGroup getDynamicGroup(String dynamicGroupDN) throws SSOException
Deprecated.Returns the handle to theAMDynamicGroupobject represented by DN. However, the validity of the handle returned by this method cannot be guaranteed, since the object is created in memory, and not instantiated from the data store. Using theAMDynamicGroupreturned from this method may result in exceptions thrown in the later part of the application, if the DN is not valid or represents an entry that does not exist.Validity of the DN can be verified is using
isValidEntry()method of the object returned.- Parameters:
dynamicGroupDN- group DN- Returns:
AMDynamicGroupobject represented by DN.- Throws:
SSOException- if single sign on token is invalid or expired.- See Also:
isValidEntry(java.lang.String)
-
getFilteredRole
public AMFilteredRole getFilteredRole(String roleDN) throws SSOException
Deprecated.Returns the handle to theAMFilteredRoleobject represented by DN. However, the validity of the handle returned by this method cannot be guaranteed, since the object is created in memory, and not instantiated from the data store. Using theAMFilteredRolereturned from this method may result in exceptions thrown in the later part of the application, if the DN is not valid or represents an entry that does not exist.Validity of the DN can be verified is using
isValidEntry()method of the object returned.- Parameters:
roleDN- role DN.- Returns:
AMFilteredRoleobject represented by DN.- Throws:
SSOException- if single sign on token is invalid or expired.- See Also:
isValidEntry(java.lang.String)
-
getGroupContainer
public AMGroupContainer getGroupContainer(String groupContainerDN) throws SSOException
Deprecated.Returns the handle to theAMGroupContainerobject represented by DN. However, the validity of the handle returned by this method cannot be guaranteed, since the object is created in memory, and not instantiated from the data store. Using theAMGroupContainerreturned from this method may result in exceptions thrown in the later part of the application, if the DN is not valid or represents an entry that does not exist.Validity of the DN can be verified is using
isValidEntry()method of the object returned.- Parameters:
groupContainerDN- group container DN.- Returns:
AMGroupContainerobject represented by DN.- Throws:
SSOException- if single sign on token is invalid or expired.- See Also:
isValidEntry(java.lang.String)
-
getI18NPropertiesFileName
public String getI18NPropertiesFileName(String serviceName) throws AMException
Deprecated.Returns the I18N properties file name that contains the internationalized messages.- Parameters:
serviceName- the service name- Returns:
- String String representing i18N properties file name
- Throws:
AMException- if an error is encountered while retrieving information
-
getOrganization
public AMOrganization getOrganization(String orgDN) throws SSOException
Deprecated.Returns the handle to theAMOrganizationobject represented by DN. However, the validity of the handle returned by this method cannot be guaranteed, since the object is created in memory, and not instantiated from the data store. Using theAMOrganizationreturned from this method may result in exceptions thrown in the later part of the application, if the DN is not valid or represents an entry that does not exist.Validity of the DN can be verified is using
isValidEntry()method of the object returned.- Parameters:
orgDN- organization DN- Returns:
AMOrganizationobject represented by DN.- Throws:
SSOException- if single sign on token is invalid or expired.- See Also:
isValidEntry(java.lang.String)
-
getOrganizationDN
public String getOrganizationDN(String domainname, String orgSearchTemplate) throws AMException, SSOException
Deprecated.Returns the DN of the organization, using thedomainnameprovided and thesearchTemplate(if provided). IfsearchTemplateis null, SDK uses the defaultsearchTemplateto perform theorgDNsearch. If the DC tree global flag is enabled, the DC tree is used to obtain the organization DN, otherwise an LDAP search is conducted using thesearchfilterin thesearchtemplate. All%Vin the filter are replaced withdomainname. If the search returns more than one entries, then an Exception is thrown. Otherwise the DN obtained is returned.- Parameters:
domainname- Organization identifier passed. It can be a domain name (example:sun.com) or it could be a full DN or it could be null or* "/". A full DN is verified to be an organization and returned as is. A "/" is assumed to be a request for the root DN and the root DN is returned. A "/" separated string is assumed to represent an existing organization DN in the DIT. For example:/iplanet/sunis converted to a DN(o=iplanet,o=sun,<base DN>)and the validity of this DN is checked and returned. Any other string is assumed to be either a domain or an associated domain or the organization name. The search filter is created accordingly.orgSearchTemplate- template to use for the search.- Returns:
- The full organization DN
- Throws:
AMException- If there is a problem connecting or searching the data store.SSOException- If the user has an invalid SSO token.
-
getOrganizationalUnit
public AMOrganizationalUnit getOrganizationalUnit(String orgUnitDN) throws SSOException
Deprecated.Returns the handle to theAMOrganizationalUnitobject represented by DN. However, the validity of the handle returned by this method cannot be guaranteed, since the object is created in memory, and not instantiated from the data store. Using theAMOrganizationialUnitreturned from this method may result in exceptions thrown in the later part of the application, if the DN is not valid or represents an entry that does not exist.Validity of the DN can be verified is using
isValidEntry()method of the object returned.- Parameters:
orgUnitDN- organizational unit DN- Returns:
AMOrganizationalUnitobject represented by DN.- Throws:
SSOException- if single sign on token is invalid or expired.- See Also:
isValidEntry(java.lang.String)
-
getPeopleContainer
public AMPeopleContainer getPeopleContainer(String peopleContainerDN) throws SSOException
Deprecated.Returns the handle to theAMPeopleContainerobject represented by DN. However, the validity of the handle returned by this method cannot be guaranteed, since the object is created in memory, and not instantiated from the data store. Using theAMPeopleContainerreturned from this method may result in exceptions thrown in the later part of the application, if the DN is not valid or represents an entry that does not exist.Validity of the DN can be verified is using
isValidEntry()method of the object returned.- Parameters:
peopleContainerDN- people container DN- Returns:
AMPeopleContainerobject represented by DN.- Throws:
SSOException- if single sign on token is invalid or expired.- See Also:
isValidEntry(java.lang.String)
-
getPolicyTemplate
public AMTemplate getPolicyTemplate(String templateDN) throws AMException, SSOException
Deprecated.Returns the handle to theAMTemplateobject represented by DN. However, the validity of the handle returned by this method cannot be guaranteed, since the object is created in memory, and not instantiated from the data store. Using theAMTemplatereturned from this method may result in exceptions thrown in the later part of the application, if the DN is not valid or represents an entry that does not exist.Validity of the DN can be verified is using
isValidEntry()method of the object returned.- Parameters:
templateDN- a policy template DN.- Returns:
AMTemplateobject represented by DN.- Throws:
AMException- if the DN does not represent a Policy template DNSSOException- if single sign on token is invalid or expired.- See Also:
isValidEntry(java.lang.String)
-
getPropertiesViewBeanURL
public String getPropertiesViewBeanURL(String serviceName) throws AMException
Deprecated.Returns the URL of the view bean for the service- Parameters:
serviceName- the service name- Returns:
- String URL of the view bean for the service
- Throws:
AMException- if an error is encountered while retrieving information
-
getResource
public AMResource getResource(String resourceDN) throws SSOException
Deprecated.Returns the handle to theAMResourceobject represented by DN. However, the validity of the handle returned by this method cannot be guaranteed, since the object is created in memory, and not instantiated from the data store. Using theAMResourcereturned from this method may result in exceptions thrown in the later part of the application, if the DN is not valid or represents an entry that does not exist.Validity of the DN can be verified is using
isValidEntry()method of the object returned.- Parameters:
resourceDN- resource DN.- Returns:
AMResourceobject represented by DN.- Throws:
SSOException- if single sign on token is invalid or expired.- See Also:
isValidEntry(java.lang.String)
-
getRole
public AMRole getRole(String roleDN) throws SSOException
Deprecated.Returns the handle to theAMRoleobject represented by DN. However, the validity of the handle returned by this method cannot be guaranteed, since the object is created in memory, and not instantiated from the data store. Using theAMRolereturned from this method may result in exceptions thrown in the later part of the application, if the DN is not valid or represents an entry that does not exist.Validity of the DN can be verified is using
isValidEntry()method of the object returned.- Parameters:
roleDN- role DN- Returns:
AMRoleobject represented by DN.- Throws:
SSOException- if single sign on token is invalid or expired.- See Also:
isValidEntry(java.lang.String)
-
getSchema
public AMSchema getSchema(String serviceName, AMSchema.Type schemaType) throws AMException
Deprecated.This method has been deprecated. Please usecom.sun.identity.sm.ServiceSchemaManager.getSchema().Returns theAMSchemafor the given service name and service type.- Parameters:
serviceName- the name of the serviceschemaType- the type of service schema that needs to be retrieved.- Returns:
AMSchemacorresponding to the given service name and schema type.- Throws:
AMException- if an error is encountered in retrieving theAMSchema.
-
getSchemaTypes
public Set getSchemaTypes(String serviceName) throws AMException
Deprecated.This method has been deprecated. Please usecom.sun.identity.sm.ServiceSchemaManager.getSchemaTypes().Returns the schema types available for a particular service.- Parameters:
serviceName- the name of the service whose schema types needs to be retrieved- Returns:
- Set of
AMSchema.Typeobjects - Throws:
AMException- if an error is encountered in retrieving theschemaTypes.
-
getServiceHierarchy
public Set getServiceHierarchy() throws AMException
Deprecated.Returns the service hierarchy for all registered services.- Returns:
- the service hierarchy for all registered services.
- Throws:
AMException- if an error is encountered in retrieving the service hierarchy. The return value is a Set of strings in slash format.
-
getServiceNames
public Set getServiceNames() throws AMException
Deprecated.Returns the set of name of services that have been loaded to the data store.- Returns:
- set of name of services.
- Throws:
AMException- if an error is encountered in retrieving the names of the services
-
getStaticGroup
public AMStaticGroup getStaticGroup(String groupDN) throws SSOException
Deprecated.Returns the handle to theAMStaticGroupobject represented by DN. However, the validity of the handle returned by this method cannot be guaranteed, since the object is created in memory, and not instantiated from the data store. Using theAMStaticGroupreturned from this method may result in exceptions thrown in the later part of the application, if the DN is not valid or represents an entry that does not exist.Validity of the DN can be verified is using
isValidEntry()method of the object returned.- Parameters:
groupDN- group DN- Returns:
AMStaticGroupobject represented by DN.- Throws:
SSOException- if single sign on token is invalid or expired.- See Also:
isValidEntry(java.lang.String)
-
getTopLevelContainers
public Set getTopLevelContainers() throws AMException, SSOException
Deprecated.Returns the top level containers (Organizations, People Containers, Roles, etc) for the particular user based on single sign on token as the starting point in the tree.- Returns:
- set of
DBObjectsthat are top level containers for the signed in user. - Throws:
AMException- if an error occurred when retrieving the information from the data store.SSOException- if single sign on token is invalid or expired.
-
getTopLevelOrganizations
public Set getTopLevelOrganizations() throws AMException, SSOException
Deprecated.Returns the "real" or "physical" top level organizations as the starting point in the tree.- Returns:
- Set Set of DN Strings for top level Organizations
- Throws:
AMException- if an error occurred when retrieving the information from the data store.SSOException- if single sign on token is invalid or expired.
-
getUser
public AMUser getUser(String userDN) throws SSOException
Deprecated.Returns the handle to theAMUserobject represented by DN. However, the validity of the handle returned by this method cannot be guaranteed, since the object is created in memory, and not instantiated from the data store. Using theAMUserreturned from this method may result in exceptions thrown in the later part of the application, if the DN is not valid or represents an entry that does not exist.Validity of the DN can be verified is using
isValidEntry()method of the object returned.- Parameters:
userDN- user DN- Returns:
AMUserobject represented by DN- Throws:
SSOException- if single sign on token is invalid or expired.- See Also:
isValidEntry(java.lang.String)
-
getEntity
public AMEntity getEntity(String eDN) throws SSOException
Deprecated.Returns the handle to theAMEntityobject represented by DN. However, the validity of the handle returned by this method cannot be guaranteed, since the object is created in memory, and not instantiated from the data store. Using theAMEntityreturned from this method may result in exceptions thrown in the later part of the application, if the DN is not valid or represents an entry that does not exist.Validity of the DN can be verified is using
isValidEntry()method of the object returned.- Parameters:
eDN- entity DN.- Returns:
AMEntityobject represented by DN.- Throws:
SSOException- if single sign on token is invalid or expired.- See Also:
isValidEntry(java.lang.String)
-
isValidEntry
public boolean isValidEntry(String dn) throws SSOException
Deprecated.Checks if the entry exists in the directory or not. First a syntax check is done on the DN string corresponding to the entry. If the DN syntax is valid, a directory call will be made to check for the existence of the entry.NOTE: This method internally invokes a call to the directory to verify the existence of the entry. There could be a performance overhead. Hence, please use your discretion while using this method.
- Parameters:
dn- DN of the entry that needs to be validated.- Returns:
- false if the entry does not have a valid DN syntax or if the entry does not exists in the Directory. True otherwise.
- Throws:
SSOException- if the single sign on token is no longer valid.
-
createTopOrganization
public AMOrganization createTopOrganization(String orgName, Map avPairs) throws AMException, SSOException
Deprecated.Bootstraps the Organization tree by creating the Top Organization tree.- Parameters:
orgName- name of the top organizationavPairs- Attribute-Value pairs for the top organization- Returns:
- Top Organization object.
- Throws:
AMException- if an error occurred during the process of creation.SSOException- if single sign on token is invalid or expired.
-
purge
public void purge(String domainName, int graceperiod) throws AMException, SSOException
Deprecated.This method takes an organization DN and purges all objects marked for deletion. If the organization itself is marked for deletion, then a recursive delete of everything under the organization is called, followed by the organization deletion. This method works in the mode where soft-delete option in Access Manager is turned on. The Pre/Postcallbacksfor users are executed during this method.- Parameters:
domainName- domain to be purgedgraceperiod- time in days which should have passed since the entry was last modified before it can be deleted from the system.- Throws:
AMException- if an error occurred when retrieving the information from the data store.SSOException- if single sign on token is invalid or expired.
-
purgeUser
public void purgeUser(String uid, String domainName, int graceperiod) throws AMException, SSOException
Deprecated.This method takes a user ID and a domain name, It uses default search templates to search for the organization and uses the deleted objects search filter for Users as defined in the Administration Service of Access Manager. This filter is used to search for the deleted user under the organization. If the user is marked for deletion and the grace period is passed then the user is purged. The pre-delete call backs as listed in the Administration service, are called before the user is deleted. If any of thecallbacksthrow an exception the delete operation is aborted.- Parameters:
uid- user IDdomainName- domain in which the user belongs.graceperiod- time in days which should have passed before this user can be deleted.- Throws:
AMException- if there is an error in deleting the user, or if the usercallbacksthrown an exceptionSSOException
-
purgeResource
public void purgeResource(String rid, String domainName, int graceperiod) throws AMException, SSOException
Deprecated.This method takes a resource ID and a domain name, It uses default search templates to search for the organization and uses the deleted objects search filter for Resources as defined in the Administration Service of Access Manager. This filter is used to search for the deleted resource under the organization. If the resource is marked for deletion and the grace period is passed then the resource is purged. The pre-delete call backs as listed in the Administration service, are called before the user is deleted. If any of thecallbacksthrow an exception the delete operation is aborted.- Parameters:
rid- resource IDdomainName- domain in which the user belongs.graceperiod- time in days which should have passed before this user can be deleted.- Throws:
AMException- if there is an error in deleting the user, or if the usercallbacksthrown an exceptionSSOException
-
purgeGroup
public void purgeGroup(String gid, String domainName, int graceperiod) throws AMException, SSOException
Deprecated.This method takes a group name and a domain name, It uses default search templates to search for the organization and uses the deleted objects search filter for Groups as defined in the Administration Service of Access Manager. This filter is used to search for the deleted user under the organization. If the group is marked for deletion and the grace period is passed then the group is purged. The pre-delete call backs as listed in the Administration service, are called before the group is deleted. If any of thecallbacksthrow an exception the delete operation is aborted.- Parameters:
gid- group namedomainName- domain in which the group belongs.graceperiod- time in days which should have passed before this user can be deleted. If a -1 is passed, group is deleted right away without check ongraceperiod.- Throws:
AMException- if there is an error in deleting the group, or if thecallbacksthrown an exceptionSSOException
-
getEntityTypes
public Set getEntityTypes()
Deprecated.Returns a set ofcom.iplanet.am.sdk.AMEntityTypeobjects, which is the set of objects which are supported by thecom.iplanet.am.sdk.AMEntityAPIs.- Returns:
- Set of
AMEntityTypeobjects.
-
getBaseDN
protected String getBaseDN(ServiceConfig sc)
Deprecated.
-
isRFC2247
protected boolean isRFC2247(ServiceConfig sc)
Deprecated.
-
addToOrgMapCache
protected static void addToOrgMapCache(SSOToken stoken, String dn) throws AMException, SSOException
Deprecated.Protected method to update theorgMapCache- Throws:
AMExceptionSSOException
-
daysSinceModified
protected static int daysSinceModified(SSOToken stoken, String entryDN) throws AMException, SSOException
Deprecated.Protected method to obtain the number of days since this DN was last modified.- Throws:
AMExceptionSSOException
-
updateCache
protected static void updateCache(String dn, int eventType)
Deprecated.Protected method to updateorgMapCache.
-
-