com.waveset.adapter
Class SunAccessManagerResourceAdapter

java.lang.Object
  extended bycom.waveset.adapter.ResourceAdapterBase
      extended bycom.waveset.adapter.SunAccessManagerResourceAdapter
All Implemented Interfaces:
ResourceAdapter
Direct Known Subclasses:
SunISResourceAdapter

public class SunAccessManagerResourceAdapter
extends ResourceAdapterBase


Nested Class Summary
 class SunAccessManagerResourceAdapter.AcctIter
           
 class SunAccessManagerResourceAdapter.SunAMConnection
           
 
Nested classes inherited from class com.waveset.adapter.ResourceAdapterBase
ResourceAdapterBase.SimpleAccountIterator
 
Nested classes inherited from class com.waveset.adapter.ResourceAdapter
ResourceAdapter.ActionResult, ResourceAdapter.Features, ResourceAdapter.ObjectType
 
Field Summary
static java.lang.String ATTR_ACCOUNT_MEMBERS
          Special attribute used for Filtered Groups and Dynamic Subscription Groups resource objects.
static java.lang.String ATTR_ASSIGNABLE_DYNAMIC_GROUPS
           
static java.lang.String ATTR_MEMBERSHIP_FILTER
          Special attribute used for Filtered Groups.
static java.lang.String ATTR_ROLES
           
static java.lang.String ATTR_STATIC_GROUPS
           
static java.lang.String code_id
           
static java.lang.String DISABLE_AUTO_GROUPS_OU
          Key name for listObjects option to disable the automatic searching of the "Groups" organizational unit (OU) when searching for groups at the "oneLevel" searchScope.
static java.lang.String RA_AM_VERSION7
          Is this AM 7 or above? Used to simplify connection logic
static java.lang.String RA_ENCRYPTION_KEY
          The encryption key used to communicate to the resource.
static java.lang.String RA_ERROR_LOG_DIRECTORY
           
static java.lang.String RA_ERROR_LOG_LEVEL
          The logging settings.
static java.lang.String RA_HOST
          The name of the host used to communicate with the resource.
static java.lang.String RA_JCE_ENCRYPTOR
          The default JCE encryption class.
static java.lang.String RA_NAMING_SERVICE_URL
          The name service on the Access Manager server.
static java.lang.String RA_OBJECT_TYPE_ASSIGNABLE_DYNAMIC_GROUP
           
static java.lang.String RA_OBJECT_TYPE_ASSIGNABLE_DYNAMIC_GROUP_KEY
           
static java.lang.String RA_OBJECT_TYPE_DYNAMIC_GROUP
           
static java.lang.String RA_OBJECT_TYPE_DYNAMIC_GROUP_KEY
           
static java.lang.String RA_OBJECT_TYPE_FILTERED_ROLE
           
static java.lang.String RA_OBJECT_TYPE_FILTERED_ROLE_KEY
           
static java.lang.String RA_OBJECT_TYPE_ORGANIZATION
           
static java.lang.String RA_OBJECT_TYPE_ORGANIZATION_KEY
           
static java.lang.String RA_OBJECT_TYPE_ORGANIZATIONAL_UNIT
           
static java.lang.String RA_OBJECT_TYPE_ORGANIZATIONAL_UNIT_KEY
           
static java.lang.String RA_OBJECT_TYPE_ROLE
           
static java.lang.String RA_OBJECT_TYPE_ROLE_KEY
           
static java.lang.String RA_OBJECT_TYPE_STATIC_GROUP
          Resource object types // Note: The groups are a little strange.
static java.lang.String RA_OBJECT_TYPE_STATIC_GROUP_KEY
           
static java.lang.String RA_PASSWORD
           
static java.lang.String RA_PORT
          The port on which to communicate to the resource.
static java.lang.String RA_PROTOCOL
          The protocol used to communicate to the resource.
static java.lang.String RA_USER
          The account name used to connect to the resource.
static java.lang.String SEARCH_PATTERN
          Key name for listObjects option to specify the pattern to use to filter the objects that are returned.
static java.lang.String USER_PASSWORD_ATTR
           
 
Fields inherited from class com.waveset.adapter.ResourceAdapterBase
_cache, _context, _excludedAccountsRule, _excludedAccountsRuleInited, _listAllObjectsAttrParse, _listAllObjectsAttrParseName, _listUserAttrParse, _listUserAttrParseName, _listUserGroupsAttrParse, _listUserGroupsAttrParseName, _resource, _thread, _trace, displayInfoCode, RA_BLOCKCOUNT, RA_LOGIN_ACTION, RA_LOGOFF_ACTION, RA_MULTI_VALUED_ATTRS, RA_TEST_MODE
 
Fields inherited from interface com.waveset.adapter.ResourceAdapter
CHANGE_PASSWORD_LOCATION, DISABLE, ENABLE, EXPIRE_PASSWORD, GUID, IGNORE_ATTR, NEW_ACCOUNT_ID, OP_DAYS_INACTIVE, OP_DISABLED, OP_DORMANT, OP_EXPIRED, OP_EXPIREDPWD, OP_INACTIVE, OP_LOCKED, OP_NO_PASSWORD_SET, OP_NOOWNERSHIP, OP_NOPASSWORDREQ, OP_NUMINACTIVEDAYS, OP_NUMPWDAYS, OP_PWNUMDAYS, RA_BASE_CTX, RA_DISPLAY_NAME_ATTR, RA_NEW_OBJECT_ID, RA_NEW_OBJECT_NAME, RA_OBJECT_ATTRIBUTES, RA_OBJECT_CLASS, RA_OBJECT_ID, RA_OBJECT_TYPE, RA_OP_TYPE, RA_RENAME_OP, RA_REQUESTOR, RA_SAVEAS_OP, RA_SEARCH_ATTRIBUTE_NAMES, RA_SEARCH_ATTRS_TO_GET, RA_SEARCH_CONTEXT, RA_SEARCH_FILTER, RA_SEARCH_RUN_AS_PASSWORD, RA_SEARCH_RUN_AS_USER, RA_SEARCH_SCOPE, RA_SEARCH_SCOPE_OBJECT, RA_SEARCH_SCOPE_ONE_LEVEL, RA_SEARCH_SCOPE_SUBTREE, RA_SEARCH_TIME_LIMIT, RESET_PASSWORD, SYSTEM_ATTRIBUTES, UNLOCK, WS_USER_PASSWORD
 
Constructor Summary
SunAccessManagerResourceAdapter()
           
SunAccessManagerResourceAdapter(Resource res, ObjectCache cache)
           
 
Method Summary
 WavesetResult authenticate(java.util.HashMap loginInfo)
          Authenticates the user against the resource.
 WavesetResult checkCreateAccount(WSUser user)
           
 WavesetResult checkDeleteAccount(WSUser user)
           
 WavesetResult checkUpdateAccount(WSUser user)
           
 WavesetResult createObject(GenericObject object, java.util.Map options)
          Creates the specified objectId of type objectType using the list of attributes provided.
 Resource createPrototypeResource()
           
 WavesetResult deleteObject(GenericObject object, java.util.Map options)
          Deletes the requested objectId of the requested objectType from the resource
protected  WavesetResult doCreateOrUpdateObjectRequest(java.lang.String objectType, java.lang.String objectId, GenericObject attributes, java.util.Map options, java.lang.String cmd)
           
 WSAttributes getAccountAttributes(java.lang.String accountIdentity)
          This method is obsolete.
 AccountIterator getAccountIterator()
           
 java.lang.String getBaseContextAttrName()
          Returns the name, if any, of the attribute used by the resource as the base context or the context to which all operations are bound
 GenericObject getFeatures()
          Indicates what functionality the resource adapter supports.
 GenericObject getObject(java.lang.String objectType, java.lang.String objectId, java.util.List attrsToGet, java.util.Map options)
          Returns the requested objectId of the requested objectType from the resource
 WSUser getUser(WSUser user)
          Retrieve information about an account, and package it as a WSUser object.
 java.util.ArrayList listAllObjects(java.lang.String objectType, java.util.Map options, java.lang.String runAsUser, EncryptedData runAsPassword)
          This method will return a list of object names of the specified object type.
 java.util.List listObjects(java.lang.String objectType, java.util.Map options)
          Default implementation calls older method listAllObjects(String, Map, String, EncryptedData), which does not support newer options (such as "searchContext" or "searchFilter").
protected  GenericObject mapAMAttributes(java.lang.String objectType, java.lang.String objectId, java.util.List attrsToGet, com.iplanet.am.sdk.AMObject amObject)
           
protected  void realCreate(WSUser user, WavesetResult result)
          Create a new user account on the resource This method is called by createAccounts (the multiuser create method).
protected  void realDelete(WSUser user, WavesetResult result)
          Needs to be overridden by subclass if default deleteAccounts() implementation is used.
protected  void realDisable(WSUser user, WavesetResult result)
           
protected  void realEnable(WSUser user, WavesetResult result)
           
protected  void realUpdate(WSUser user, WavesetResult result)
          Needs to be overridden by subclass if default updateAccounts() implementation is used.
protected  boolean setUserAccountId(WSUser user, com.iplanet.am.sdk.AMUser amUser)
          Make sure that the user accountId (name) is set.
protected  void startConnection()
          Needs to be overridden by subclass if default createAccounts() implementation is used.
protected  void startConnection(SunAccessManagerResourceAdapter.SunAMConnection amConnection)
           
static Resource staticCreatePrototypeResource()
           
protected  void stopConnection()
          Needs to be overridden by subclass if default createAccounts() implementation is used.
 boolean supportsAccountDisable()
          Return true if this resource supports some form of native account disable.
 WavesetResult testConfiguration()
          Test method.
 WavesetResult updateObject(GenericObject object, java.util.Map options)
          Updates the specified objectId of type objectType using the list of attributes provided.
 
Methods inherited from class com.waveset.adapter.ResourceAdapterBase
checkForNoPasswordInSchema, checkSyntax, createAccount, createAccounts, createIdentity, deleteAccount, deleteAccount, deleteAccounts, disableAccount, disableAccounts, dnsEqual, dnsEqual, enableAccount, enableAccounts, executeResourceAttributeJavascriptAction, fillInResourceInfo, fillInResourceInfo, getAccountIterator, getAccountIterator, getAction, getActionNotFoundErrorMessage, getActionNotFoundMessage, getActionRunAsPassword, getActionRunAsUser, getActionTimeout, getActionType, getAdapter, getAdapter, getAdapter, getAdapterProxy, getAdapterProxy, getAllAccounts, getAttrNameFromMapName, getAttrNameFromMapName, getAttrParse, getAttrTypeFromMapName, getAttrTypeFromMapName, getAUserName, getBaseContextObject, getBaseContexts, getBlockSize, getContext, getExcludedAccountsRule, getIdentity, getListAllObjectsAttrParse, getListUserAttrParse, getListUserGroupsAttrParse, getOptionalBooleanResAttrVal, getOptionalBooleanResAttrVal, getOptionalEncryptedResAttrVal, getOptionalResAttrVal, getOptionalStringResAttrVal, getRequiredResAttr, getRequiredResAttr, getRequiredResAttrVal, getRequiredResAttrVal, getRequiredResAttrVals, getRequiredUserAttributeNames, getResAttrValActionOnUser, getResAttrVals, getResource, getResourceAccounts, getResourceInfo, getResourceObjectAttrValNameAttr, getResourceObjectClassAttr, getResourceObjectTypePrefix, getSchemaMap, getUser, getWSAttrByMapName, getWSAttrByMapName, getWSAttrFromMap, handleActionResult, handleJavascriptActionResult, isAccountAttributeSecret, isExcludedAccount, isExcludedAccount, isFeatureEnabled, isSupported, isTestMode, listAllObjects, listObjects, listObjectsOfType, lookupAction, lookupAction, lookupActions, namesEqual, objectClassesMatchType, println, restoreResourceObjectClassAttr, run, run, runResourceAttributeJavascriptAction, scan, setCache, setContext, setDisabled, setFromResource, setResource, setResourceObjectClassAttr, setResourceOptionAttrs, startConnectionWrapper, supportsAccountActions, supportsActions, supportsCaseInsensitiveAccountIds, supportsContainerObjectTypes, supportsExcludedAccounts, supportsResourceAccount, supportsScanning, updateAccount, updateAccounts, updateResourceAccount, updateResourceIdentity, vmStoreBoot, vmStoreGet, vmStoreInit, vmStoreLatch, vmStorePut
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values

RA_HOST

public static final java.lang.String RA_HOST
The name of the host used to communicate with the resource.

See Also:
Constant Field Values

RA_PORT

public static final java.lang.String RA_PORT
The port on which to communicate to the resource.

See Also:
Constant Field Values

RA_USER

public static final java.lang.String RA_USER
The account name used to connect to the resource.

See Also:
Constant Field Values

RA_PASSWORD

public static final java.lang.String RA_PASSWORD
See Also:
Constant Field Values

RA_AM_VERSION7

public static final java.lang.String RA_AM_VERSION7
Is this AM 7 or above? Used to simplify connection logic

See Also:
Constant Field Values

RA_PROTOCOL

public static final java.lang.String RA_PROTOCOL
The protocol used to communicate to the resource.

See Also:
Constant Field Values

RA_ENCRYPTION_KEY

public static final java.lang.String RA_ENCRYPTION_KEY
The encryption key used to communicate to the resource.

See Also:
Constant Field Values

RA_JCE_ENCRYPTOR

public static final java.lang.String RA_JCE_ENCRYPTOR
The default JCE encryption class.

See Also:
Constant Field Values

RA_NAMING_SERVICE_URL

public static final java.lang.String RA_NAMING_SERVICE_URL
The name service on the Access Manager server.

See Also:
Constant Field Values

RA_ERROR_LOG_LEVEL

public static final java.lang.String RA_ERROR_LOG_LEVEL
The logging settings.

See Also:
Constant Field Values

RA_ERROR_LOG_DIRECTORY

public static final java.lang.String RA_ERROR_LOG_DIRECTORY
See Also:
Constant Field Values

SEARCH_PATTERN

public static final java.lang.String SEARCH_PATTERN
Key name for listObjects option to specify the pattern to use to filter the objects that are returned.

See Also:
Constant Field Values

DISABLE_AUTO_GROUPS_OU

public static final java.lang.String DISABLE_AUTO_GROUPS_OU
Key name for listObjects option to disable the automatic searching of the "Groups" organizational unit (OU) when searching for groups at the "oneLevel" searchScope. The default behavior is to look in the "Groups" OU at the current level since this is where the IS admin utility puts groups. Set to true to turn off the default behavior.

See Also:
Constant Field Values

ATTR_ACCOUNT_MEMBERS

public static final java.lang.String ATTR_ACCOUNT_MEMBERS
Special attribute used for Filtered Groups and Dynamic Subscription Groups resource objects. It contains the list of dns of the accounts that are members of the group. This attribute is used to fetch and set the members of the Dynamic Subscription Groups. It is only used for fetching members of Filtered Groups -- it is ignored if specified when setting attribute values. // // It looks like there is some support for having nested groups, // but there isn't an API to set //

See Also:
Constant Field Values

ATTR_MEMBERSHIP_FILTER

public static final java.lang.String ATTR_MEMBERSHIP_FILTER
Special attribute used for Filtered Groups. On creates and updates, the attr's value is passed into AMDynamicGroup.setFilter() and on fetched, the return value from AMDynamicGroup.getFilter() is returned in it.

See Also:
Constant Field Values

ATTR_ROLES

public static final java.lang.String ATTR_ROLES
See Also:
Constant Field Values

ATTR_STATIC_GROUPS

public static final java.lang.String ATTR_STATIC_GROUPS
See Also:
Constant Field Values

ATTR_ASSIGNABLE_DYNAMIC_GROUPS

public static final java.lang.String ATTR_ASSIGNABLE_DYNAMIC_GROUPS
See Also:
Constant Field Values

USER_PASSWORD_ATTR

public static final java.lang.String USER_PASSWORD_ATTR
See Also:
Constant Field Values

RA_OBJECT_TYPE_STATIC_GROUP

public static final java.lang.String RA_OBJECT_TYPE_STATIC_GROUP
Resource object types // Note: The groups are a little strange. From what I can gather so far, // the admin console can either manage static subscription groups or // dynamic subscription groups, where "subscription" means that you // manually select the users that are members of the group. "Static" // refers to the fact that the group actually lists the members in the // uniqueMember attribute. "Dynamic" means that the members of the group // have a "memberOf" attribute that references the group. It appears // that the choice for which of these is supported is done during the // installation of the Access Manager. The Managed Group Type option // controls which type is managed. // // There are also filtered groups which uses an LDAP search filter to // select which users are members of the group. This type of group is // always supported regardless of the Managed Group Type setting.

See Also:
Constant Field Values

RA_OBJECT_TYPE_ASSIGNABLE_DYNAMIC_GROUP

public static final java.lang.String RA_OBJECT_TYPE_ASSIGNABLE_DYNAMIC_GROUP
See Also:
Constant Field Values

RA_OBJECT_TYPE_DYNAMIC_GROUP

public static final java.lang.String RA_OBJECT_TYPE_DYNAMIC_GROUP
See Also:
Constant Field Values

RA_OBJECT_TYPE_ORGANIZATION

public static final java.lang.String RA_OBJECT_TYPE_ORGANIZATION
See Also:
Constant Field Values

RA_OBJECT_TYPE_ORGANIZATIONAL_UNIT

public static final java.lang.String RA_OBJECT_TYPE_ORGANIZATIONAL_UNIT
See Also:
Constant Field Values

RA_OBJECT_TYPE_ROLE

public static final java.lang.String RA_OBJECT_TYPE_ROLE
See Also:
Constant Field Values

RA_OBJECT_TYPE_FILTERED_ROLE

public static final java.lang.String RA_OBJECT_TYPE_FILTERED_ROLE
See Also:
Constant Field Values

RA_OBJECT_TYPE_STATIC_GROUP_KEY

public static final java.lang.String RA_OBJECT_TYPE_STATIC_GROUP_KEY
See Also:
Constant Field Values

RA_OBJECT_TYPE_ASSIGNABLE_DYNAMIC_GROUP_KEY

public static final java.lang.String RA_OBJECT_TYPE_ASSIGNABLE_DYNAMIC_GROUP_KEY
See Also:
Constant Field Values

RA_OBJECT_TYPE_DYNAMIC_GROUP_KEY

public static final java.lang.String RA_OBJECT_TYPE_DYNAMIC_GROUP_KEY
See Also:
Constant Field Values

RA_OBJECT_TYPE_ORGANIZATION_KEY

public static final java.lang.String RA_OBJECT_TYPE_ORGANIZATION_KEY
See Also:
Constant Field Values

RA_OBJECT_TYPE_ORGANIZATIONAL_UNIT_KEY

public static final java.lang.String RA_OBJECT_TYPE_ORGANIZATIONAL_UNIT_KEY
See Also:
Constant Field Values

RA_OBJECT_TYPE_ROLE_KEY

public static final java.lang.String RA_OBJECT_TYPE_ROLE_KEY
See Also:
Constant Field Values

RA_OBJECT_TYPE_FILTERED_ROLE_KEY

public static final java.lang.String RA_OBJECT_TYPE_FILTERED_ROLE_KEY
See Also:
Constant Field Values
Constructor Detail

SunAccessManagerResourceAdapter

public SunAccessManagerResourceAdapter(Resource res,
                                       ObjectCache cache)

SunAccessManagerResourceAdapter

public SunAccessManagerResourceAdapter()
Method Detail

staticCreatePrototypeResource

public static Resource staticCreatePrototypeResource()
                                              throws WavesetException
Throws:
WavesetException

createPrototypeResource

public Resource createPrototypeResource()
                                 throws WavesetException
Specified by:
createPrototypeResource in interface ResourceAdapter
Specified by:
createPrototypeResource in class ResourceAdapterBase
Throws:
WavesetException

getUser

public WSUser getUser(WSUser user)
               throws WavesetException
Retrieve information about an account, and package it as a WSUser object.

Information required to identify the resource account is supplied in another WSUser object.

The returned user object will resemble the source object, but will have its account attribute list filled in.

Returns "null" if there is no account that corresponds to the user.

Specified by:
getUser in interface ResourceAdapter
Overrides:
getUser in class ResourceAdapterBase
Throws:
WavesetException

checkCreateAccount

public WavesetResult checkCreateAccount(WSUser user)
                                 throws WavesetException
Specified by:
checkCreateAccount in interface ResourceAdapter
Specified by:
checkCreateAccount in class ResourceAdapterBase
Throws:
WavesetException

realCreate

protected void realCreate(WSUser user,
                          WavesetResult result)
                   throws WavesetException
Create a new user account on the resource This method is called by createAccounts (the multiuser create method). CreateAccounts will open a connection, call realCreate for each user being created, then close the connection.

Overrides:
realCreate in class ResourceAdapterBase
Throws:
WavesetException

checkUpdateAccount

public WavesetResult checkUpdateAccount(WSUser user)
                                 throws WavesetException
Specified by:
checkUpdateAccount in interface ResourceAdapter
Specified by:
checkUpdateAccount in class ResourceAdapterBase
Throws:
WavesetException

realUpdate

protected void realUpdate(WSUser user,
                          WavesetResult result)
                   throws WavesetException
Description copied from class: ResourceAdapterBase
Needs to be overridden by subclass if default updateAccounts() implementation is used.

Overrides:
realUpdate in class ResourceAdapterBase
Throws:
WavesetException

checkDeleteAccount

public WavesetResult checkDeleteAccount(WSUser user)
                                 throws WavesetException
Specified by:
checkDeleteAccount in interface ResourceAdapter
Specified by:
checkDeleteAccount in class ResourceAdapterBase
Throws:
WavesetException

realDelete

protected void realDelete(WSUser user,
                          WavesetResult result)
                   throws WavesetException
Description copied from class: ResourceAdapterBase
Needs to be overridden by subclass if default deleteAccounts() implementation is used.

Overrides:
realDelete in class ResourceAdapterBase
Throws:
WavesetException

getAccountAttributes

public WSAttributes getAccountAttributes(java.lang.String accountIdentity)
                                  throws WavesetException
Description copied from interface: ResourceAdapter
This method is obsolete. ResourceAdapterBase provides a default implementation that throws a "not implemented" WavesetException.

Specified by:
getAccountAttributes in interface ResourceAdapter
Overrides:
getAccountAttributes in class ResourceAdapterBase
Throws:
WavesetException

setUserAccountId

protected boolean setUserAccountId(WSUser user,
                                   com.iplanet.am.sdk.AMUser amUser)
                            throws java.lang.Exception
Make sure that the user accountId (name) is set. If it is not set, use the uid (first) or the cn (second) from the AMUser. uid and cn are just the defaults to use if accountId is not in the schema map. If accountId is in the schema map, then that should set the WSUser's accountId (name). Returns true if the accountId is set at the end of the method (not necessarily because it was set in this method). Returns false otherwise.

Throws:
java.lang.Exception

getAccountIterator

public AccountIterator getAccountIterator()
                                   throws WavesetException
Specified by:
getAccountIterator in interface ResourceAdapter
Overrides:
getAccountIterator in class ResourceAdapterBase
Throws:
WavesetException

authenticate

public WavesetResult authenticate(java.util.HashMap loginInfo)
                           throws WavesetException
Description copied from interface: ResourceAdapter
Authenticates the user against the resource. If authentication is successful, the authenticated id will be returned. If more info is required to complete authentication the result will contain the required info

Specified by:
authenticate in interface ResourceAdapter
Specified by:
authenticate in class ResourceAdapterBase
Throws:
WavesetException

startConnection

protected void startConnection()
                        throws WavesetException
Description copied from class: ResourceAdapterBase
Needs to be overridden by subclass if default createAccounts() implementation is used.

Overrides:
startConnection in class ResourceAdapterBase
Throws:
WavesetException

startConnection

protected void startConnection(SunAccessManagerResourceAdapter.SunAMConnection amConnection)
                        throws WavesetException
Throws:
WavesetException

stopConnection

protected void stopConnection()
                       throws WavesetException
Description copied from class: ResourceAdapterBase
Needs to be overridden by subclass if default createAccounts() implementation is used.

Overrides:
stopConnection in class ResourceAdapterBase
Throws:
WavesetException

getBaseContextAttrName

public java.lang.String getBaseContextAttrName()
                                        throws WavesetException
Returns the name, if any, of the attribute used by the resource as the base context or the context to which all operations are bound

Specified by:
getBaseContextAttrName in interface ResourceAdapter
Overrides:
getBaseContextAttrName in class ResourceAdapterBase
Returns:
the name, if any, of the attribute used by the resource as the base context or the context to which all operations is bound
Throws:
WavesetException

getObject

public GenericObject getObject(java.lang.String objectType,
                               java.lang.String objectId,
                               java.util.List attrsToGet,
                               java.util.Map options)
                        throws WavesetException
Returns the requested objectId of the requested objectType from the resource

Specified by:
getObject in interface ResourceAdapter
Overrides:
getObject in class ResourceAdapterBase
Parameters:
objectId - - a valid fully qualified object identifier on this resource (e.g. "dn")
attrsToGet - - a list of attribute names supported by the specified objectType to be returned with the object
options - - not currently used since the objectId/objectType provide a unique identifier of the object being requested
objectType - - a valid object type defined in the resource's section
Throws:
WavesetException

mapAMAttributes

protected GenericObject mapAMAttributes(java.lang.String objectType,
                                        java.lang.String objectId,
                                        java.util.List attrsToGet,
                                        com.iplanet.am.sdk.AMObject amObject)
                                 throws WavesetException
Throws:
WavesetException

createObject

public WavesetResult createObject(GenericObject object,
                                  java.util.Map options)
                           throws WavesetException
Creates the specified objectId of type objectType using the list of attributes provided.

Specified by:
createObject in interface ResourceAdapter
Overrides:
createObject in class ResourceAdapterBase
Parameters:
options - - several options can be specified which control the behavior of the search for referenced objects (e.g. group members) They include:
    "searchContext" - the value of this option determines within what context to perform search (ResourceAdapter.RA_SEARCH_CONTEXT). If no value, will assume search should be done from logical top.
  1. "searchScope" - specifies whether the search should be done on the current object, only within the context of the specified "searchContainer", or in all subcontext within the specified "searchContainer" (ResourceAdapter.RA_SEARCH_SCOPE). Valid values are "object", "oneLevel", or "subTree" indicates that the search should be performed on all sub containers within the specified "searchContainer".
  2. "searchTimeLimit" - the timelimit in milliseconds a search should not exceed (ResourceAdapter.RA_SEARCH_TIME_LIMIT).
  3. "searchAttributeNames" - a list of one or more attribute names used as the component of the tuple when searching for referenced objects (Resource_Adapter.RA_SEARCH_ATTRIBUTES).
    object - - a GenericObject containing the objectType, objectId, and list of attributes to be set on the new object
    Throws:
    WavesetException

updateObject

public WavesetResult updateObject(GenericObject object,
                                  java.util.Map options)
                           throws WavesetException
Updates the specified objectId of type objectType using the list of attributes provided.

Specified by:
updateObject in interface ResourceAdapter
Overrides:
updateObject in class ResourceAdapterBase
Parameters:
options - - several options can be specified which control the behavior of the search for referenced objects (e.g. group members) They include:
    "searchContext" - the value of this option determines within what context to perform search (ResourceAdapter.RA_SEARCH_CONTEXT). If no value, will assume search should be done from logical top.
  1. "searchScope" - specifies whether the search should be done on the current object, only within the context of the specified "searchContainer", or in all subcontext within the specified "searchContainer" (ResourceAdapter.RA_SEARCH_SCOPE). Valid values are "object", "oneLevel", or "subTree" indicates that the search should be performed on all sub containers within the specified "searchContainer".
  2. "searchTimeLimit" - the timelimit in milliseconds a search should not exceed (ResourceAdapter.RA_SEARCH_TIME_LIMIT).
  3. "searchAttributeNames" - a list of one or more attribute names used as the component of the tuple when searching for referenced objects (Resource_Adapter.RA_SEARCH_ATTRIBUTES).
    object - - a GenericObject containing the objectType, objectId, and list of new and changed attributes to be set on the object
    Throws:
    WavesetException

doCreateOrUpdateObjectRequest

protected WavesetResult doCreateOrUpdateObjectRequest(java.lang.String objectType,
                                                      java.lang.String objectId,
                                                      GenericObject attributes,
                                                      java.util.Map options,
                                                      java.lang.String cmd)
                                               throws WavesetException
Throws:
WavesetException

deleteObject

public WavesetResult deleteObject(GenericObject object,
                                  java.util.Map options)
                           throws WavesetException
Deletes the requested objectId of the requested objectType from the resource

Specified by:
deleteObject in interface ResourceAdapter
Overrides:
deleteObject in class ResourceAdapterBase
Parameters:
options - - not currently used since the objectId/objectType provide a unique identifier of the object being deleted
Throws:
WavesetException

supportsAccountDisable

public boolean supportsAccountDisable()
Return true if this resource supports some form of native account disable. When this is true, the provisoining engine will expect a real implementation of the disableAccount and enableAccount methods.

Specified by:
supportsAccountDisable in interface ResourceAdapter
Overrides:
supportsAccountDisable in class ResourceAdapterBase

realEnable

protected void realEnable(WSUser user,
                          WavesetResult result)
                   throws WavesetException
Overrides:
realEnable in class ResourceAdapterBase
Throws:
WavesetException

realDisable

protected void realDisable(WSUser user,
                           WavesetResult result)
                    throws WavesetException
Overrides:
realDisable in class ResourceAdapterBase
Throws:
WavesetException

listObjects

public java.util.List listObjects(java.lang.String objectType,
                                  java.util.Map options)
                           throws WavesetException
Description copied from class: ResourceAdapterBase
Default implementation calls older method ResourceAdapterBase.listAllObjects(String, Map, String, EncryptedData), which does not support newer options (such as "searchContext" or "searchFilter").

Each ResourceAdapter subclass should override this default implementation as soon as possible with an implementation that supports the options specified in {#listObjects(ObjectType, Map)}.

Specified by:
listObjects in interface ResourceAdapter
Overrides:
listObjects in class ResourceAdapterBase
Parameters:
objectType - the name of an object class that is valid for the resource specified by the value of option "resId". If objectType is null, this method will list objects of the types specified in the resource's section.

options - control the behavior of the search. Supported options include:
searchContext
the target context to search. If not specified, this method will attempt to get a value from RA_BASE_CONTEXT. If this method cannot obtain a context value, this method will search from logical top.
Returns:
a list of objects matching the requested objectType and options

Must be overridden by each subclass in order to support browsing and editing of resource objects.

Throws:
WavesetException
See Also:
searchPattern
Wildcard pattern to be used in the search. Wildcards can be specified such as a*, *, *a. If not specified, this method will construct a search filter using the specified objectType.,
searchScope
specifies how deeply to search. Valid values are:
"object"
search only on the current object
"oneLevel"
search directly within the specified "searchContext"
"subTree"
search every subcontext beneath the specified "searchContext"
,
"searchAttrsToGet"
the list of objectType-specific attribute names to return for each listed object. @see #RA_SEARCH_ATTRS_TO_GET

listAllObjects

public java.util.ArrayList listAllObjects(java.lang.String objectType,
                                          java.util.Map options,
                                          java.lang.String runAsUser,
                                          EncryptedData runAsPassword)
                                   throws WavesetException
Description copied from interface: ResourceAdapter
This method will return a list of object names of the specified object type. If you need to be able to specify which attrs to return, use listObjects instead

Specified by:
listAllObjects in interface ResourceAdapter
Overrides:
listAllObjects in class ResourceAdapterBase
Parameters:
objectType - the name of an object class that is valid for the resource specified by the value of option "resId". If objectType is null, this method will list objects of the types specified in the resource's section.

options - control the behavior of the search. Supported options include:
searchContext
the target context to search. If not specified, this method will attempt to get a value from RA_BASE_CONTEXT. If this method cannot obtain a context value, this method will search from logical top.
runAsUser - - (optional) if specified, connect as this user to list all objects of the specified type.
runAsPassword - - (optional) if specified, connect with this password to list all objects of the specified type.
Returns:
a list containing names of objects of the specified type. If you need to be able to specify which attrs to return, use listObjects instead.

Throws:
WavesetException
See Also:
searchPattern
Wildcard pattern to be used in the search. Wildcards can be specified such as a*, *, *a. If not specified, this method will construct a search filter using the specified objectType.,
searchScope
specifies how deeply to search. Valid values are:
"object"
search only on the current object
"oneLevel"
search directly within the specified "searchContext"
"subTree"
search every subcontext beneath the specified "searchContext"
,

getFeatures

public GenericObject getFeatures()
Indicates what functionality the resource adapter supports.

Specified by:
getFeatures in interface ResourceAdapter
Overrides:
getFeatures in class ResourceAdapterBase
Returns:
Features supported by this resource adapter.
See Also:
ResourceAdapter.Features

testConfiguration

public WavesetResult testConfiguration()
                                throws WavesetException
Test method. This method should check the configuration of the adapter, connecting to the host and validating that it has rights to do account create/update/delete actions.

Specified by:
testConfiguration in interface ResourceAdapter
Overrides:
testConfiguration in class ResourceAdapterBase
Throws:
WavesetException