com.waveset.adapter
Class IDMResourceAdapter

java.lang.Object
  extended bycom.waveset.adapter.ResourceAdapterBase
      extended bycom.waveset.adapter.IDMResourceAdapter
All Implemented Interfaces:
ResourceAdapter

public class IDMResourceAdapter
extends ResourceAdapterBase


Nested Class Summary
 
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 code_id
           
static java.lang.String RA_PASSWORD
          The password of the proxy user.
static java.lang.String RA_SPMLOC
          The SPML object class to use.
static java.lang.String RA_URL
          The URL of the IDM web service.
static java.lang.String RA_USER
          The account name of the proxy user.
static java.lang.String TYPE
          The name of the resource type.
 
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
IDMResourceAdapter()
           
IDMResourceAdapter(Resource res, ObjectCache cache)
           
 
Method Summary
 WavesetResult authenticate(java.util.HashMap loginInfo)
          Authenticates the user against the resource.
 WSUser buildUser(java.lang.String id)
          Build the base user object given an id.
 WavesetResult checkCreateAccount(WSUser user)
          Checks to see if an account can be created.
 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.
 WSAttributes getAccountAttributes(java.lang.String accountIdentity)
          Obsolete method.
 AccountIterator getAccountIterator()
           
 WSUser getUser(WSUser iduser)
          Retrieve information about an account, and package it as a WSUser object.
 java.util.List listObjects(java.lang.String objectType, java.util.Map options)
          Default implementation calls older method ResourceAdapterBase.listAllObjects(String, Map, String, EncryptedData), which does not support newer options (such as "searchContext" or "searchFilter").
protected  void realCreate(WSUser user, WavesetResult result)
          Create a new user account on the resource.
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  void startConnection()
          Needs to be overridden by subclass if default createAccounts() implementation is used.
static Resource staticCreatePrototypeResource()
          Create resource prototype.
protected  void stopConnection()
          Needs to be overridden by subclass if default createAccounts() implementation is used.
 boolean supportsAccountDisable()
          This method indicates to the server that this resource natively supports account enable and disable.
 boolean supportsCaseInsensitiveAccountIds()
          This method will return whether the resource adapter supports case insensitive account Ids or not.
 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, getBaseContextAttrName, getBaseContextObject, getBaseContexts, getBlockSize, getContext, getExcludedAccountsRule, getFeatures, getIdentity, getListAllObjectsAttrParse, getListUserAttrParse, getListUserGroupsAttrParse, getObject, 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, listAllObjects, listObjects, listObjectsOfType, lookupAction, lookupAction, lookupActions, namesEqual, objectClassesMatchType, println, restoreResourceObjectClassAttr, run, run, runResourceAttributeJavascriptAction, scan, setCache, setContext, setDisabled, setFromResource, setResource, setResourceObjectClassAttr, setResourceOptionAttrs, startConnectionWrapper, supportsAccountActions, supportsActions, supportsContainerObjectTypes, supportsExcludedAccounts, supportsResourceAccount, supportsScanning, testConfiguration, 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

TYPE

public static final java.lang.String TYPE
The name of the resource type.

See Also:
Constant Field Values

RA_URL

public static final java.lang.String RA_URL
The URL of the IDM web service. This combines what other adapters split out into seperate host and port attributes, but exposing the full URL may be necessary to account for changes to deployment location.

See Also:
Constant Field Values

RA_USER

public static final java.lang.String RA_USER
The account name of the proxy user.

See Also:
Constant Field Values

RA_SPMLOC

public static final java.lang.String RA_SPMLOC
The SPML object class to use.

See Also:
Constant Field Values

RA_PASSWORD

public static final java.lang.String RA_PASSWORD
The password of the proxy user.

See Also:
Constant Field Values
Constructor Detail

IDMResourceAdapter

public IDMResourceAdapter(Resource res,
                          ObjectCache cache)

IDMResourceAdapter

public IDMResourceAdapter()
Method Detail

staticCreatePrototypeResource

public static Resource staticCreatePrototypeResource()
                                              throws WavesetException
Create resource prototype.

Throws:
WavesetException

createPrototypeResource

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

supportsCaseInsensitiveAccountIds

public boolean supportsCaseInsensitiveAccountIds()
This method will return whether the resource adapter supports case insensitive account Ids or not. If the resource does support allow case insensitive names, then this method should be removed as the default implementation, in ResourceAdapterBase, returns true. If the resource supports case sensitive names, then this method should be implemented to return false.

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

supportsAccountDisable

public boolean supportsAccountDisable()
This method indicates to the server that this resource natively supports account enable and disable. If the resource does not natively support account enable and disable, then this method should be removed as the default implementation, in ResourceAdapterBase, returns false.

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

buildUser

public WSUser buildUser(java.lang.String id)
Build the base user object given an id.


getUser

public WSUser getUser(WSUser iduser)
               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

getAccountAttributes

public WSAttributes getAccountAttributes(java.lang.String accountIdentity)
                                  throws WavesetException
Obsolete method.

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

checkCreateAccount

public WavesetResult checkCreateAccount(WSUser user)
                                 throws WavesetException
Checks to see if an account can be created. Ignore since we're not using this now anyway.

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.

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

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

getAccountIterator

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

createObject

public WavesetResult createObject(GenericObject object,
                                  java.util.Map options)
                           throws WavesetException
Description copied from class: ResourceAdapterBase
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:
object - - a GenericObject containing the objectType, objectId, and list of attributes to be set on the new object
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).
    Throws:
    WavesetException

updateObject

public WavesetResult updateObject(GenericObject object,
                                  java.util.Map options)
                           throws WavesetException
Description copied from class: ResourceAdapterBase
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:
object - - a GenericObject containing the objectType, objectId, and list of new and changed attributes to be set on the object
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).
    Throws:
    WavesetException

deleteObject

public WavesetResult deleteObject(GenericObject object,
                                  java.util.Map options)
                           throws WavesetException
Description copied from class: ResourceAdapterBase
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 because the objectId and objectType parameters uniquely identify the object to delete.
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
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

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