com.waveset.adapter
Class GenericScriptResourceAdapter

java.lang.Object
  extended bycom.waveset.adapter.ResourceAdapterBase
      extended bycom.waveset.adapter.GenericScriptResourceAdapter
All Implemented Interfaces:
ResourceAdapter, ResourcePolicyTimeouts
Direct Known Subclasses:
GCOSResourceAdapter, NSKResourceAdapter, UnixResourceAdapter, VMSResourceAdapter

public abstract class GenericScriptResourceAdapter
extends ResourceAdapterBase
implements ResourcePolicyTimeouts

An abstract resource adapter supporting scripted connections. Used to easily create an adapter that uses shell style script commands to provision users on a resource. This class can be extended fairly easily by defining the abstract methods. They come in two flavors: getXXXScript which will return a Script for performing function XXX, and getXXXResult which will evaluate the CaptureList generated by executing the XXX Script through the ScriptedConnection. This class coordinates the operation and support of the script execution for all of the general adapter functions.


Nested Class Summary
protected static class GenericScriptResourceAdapter.AcctIter
          Very basic AccountIterator implementation that can be built by simple construction with a collection of names.
 
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 CLASS
           
static java.lang.String code_id
           
protected  ScriptedConnection conn
           
static java.lang.String RA_BLOCK_FETCH_TIMEOUT
           
static java.lang.String RA_CONN_MAX
           
static java.lang.String RA_CONN_TIMEOUT
           
static java.lang.String RA_CONN_TYPE
           
static java.lang.String RA_HOST
           
static java.lang.String RA_LOGIN_PASSWORD
           
static java.lang.String RA_LOGIN_USER
           
static java.lang.String RA_PORT
           
static java.lang.String RA_TERM
           
 
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
GenericScriptResourceAdapter()
          No argument constructor.
GenericScriptResourceAdapter(Resource res, ObjectCache cache)
          Constructor.
 
Method Summary
 WavesetResult authenticate(java.util.HashMap loginInfo)
          Authenticates the user represented in the loginInfo.
 WavesetResult checkCreateAccount(WSUser user)
          Verifies that account creation is likely to succeed with the given user.
 WavesetResult checkDeleteAccount(WSUser user)
          Verifies that account deletion is likely to succeed with the given user.
 WavesetResult checkUpdateAccount(WSUser user)
          Verifies that account update is likely to succeed with the given user.
protected abstract  java.lang.String constructUserAttributeParameter(java.lang.String key, java.lang.String value)
          Builds up a single user attribute value suitable for shell commands, given the parameter key and value.
protected  java.lang.String constructUserAttributeParameters(WSUser user)
          Builds a list of parameters appropriate for the resource to either create or update users.
protected  java.lang.String constructUserAttributeParameters(WSUser user, java.util.Map allowedAttributes)
          An alternate method to build a list of parameters appropriate for the resource to either create or update users.
 WavesetResult createObject(GenericObject object, java.util.Map options)
          Creates the specified objectId of type objectType using the list of attributes provided.
 WavesetResult deleteObject(GenericObject object, java.util.Map options)
          Deletes the requested objectId of the requested objectType from the resource
protected  void getAccountActionResult(CaptureList captureList, WavesetResult result)
           
 Script getAccountActionScript(java.lang.String action, WSUser user, java.lang.String operation, int timeout)
           
protected  WSAttribute getAccountAttributeFromMapName(WSUser user, java.lang.String mapName)
          Returns the user attribute, if found, from the map name.
 WSAttributes getAccountAttributes(java.lang.String accountIdentity)
          Get account attributes for an identity.
 AccountIterator getAccountIterator()
          Returns an account iterator containing all of the users on the resource.
 AccountIterator getAccountIterator(long timeout)
          Note: Overrides the method in ResourceAdapterBase.
protected abstract  AccountIterator getAccountIteratorResult(CaptureList captureList)
          Generates an account iterator from the capture list that was built from running the getAccountIteratorScript generated script through the ScriptedConnection.
protected abstract  Script getAccountIteratorScript()
          Returns a script that can be run on an opened and logged in ScriptedConnection to pull a list of users out of the system.
protected  Script getAccountIteratorScript(long timeout)
           
protected  void getActionResult(CaptureList captureList, WavesetResult result)
           
protected  Script getActionScript(java.lang.String action, int timeout, java.util.Map args)
           
protected abstract  WavesetResult getAuthenticateResult(java.util.HashMap loginInfo, CaptureList captureList)
          Takes the capture list from running the authenticate script through the resource and validates it.
protected abstract  Script getAuthenticateScript(java.util.HashMap loginInfo)
          Generates a script for authenticating a user on the resource using the username and password in the loginInfo HashMap.
 ScriptToken.Timeout getCapture()
           
protected abstract  WavesetResult getCheckCreateAccountResult(CaptureList captureList)
          Validates the capture list returned from the check create account script execution.
protected abstract  Script getCheckCreateAccountScript()
          Returns a shell script to check the resource and determine if a create account request is likely to succeed.
protected abstract  WavesetResult getCheckDeleteAccountResult(CaptureList captureList)
          Validates the capture list returned from the check delete account script execution.
protected abstract  Script getCheckDeleteAccountScript()
          Returns a shell script to check the resource and determine if a delete account request is likely to succeed.
protected abstract  WavesetResult getCheckUpdateAccountResult(CaptureList captureList)
          Validates the capture list returned from the check update account script execution.
protected abstract  Script getCheckUpdateAccountScript()
          Returns a shell script to check the resource and determine if an update account request is likely to succeed.
protected abstract  java.lang.String getConnectionType()
          Returns the scripted connection type of the resource.
protected  WavesetResult getCreateObjectResult(GenericObject object, java.util.Map options, CaptureList captureList)
          Analyzes the captuure list generated by executing the listObjects script on the scripted connection.
protected  Script getCreateObjectScript(GenericObject object, java.util.Map options)
          Returns a script which will create an object of a specified type from the scriptedConnection.
protected abstract  void getCreateUserResult(CaptureList captureList, WavesetResult result)
          Analyzes the capture list generated by executing the create user script on the scripted connection.
protected abstract  Script getCreateUserScript(WSUser user)
          Generates a script that will create an account for the passed user on the resource.
protected  WavesetResult getDeleteObjectResult(GenericObject object, java.util.Map options, CaptureList captureList)
          Analyzes the captuure list generated by executing the getDeleteObject script on the scripted connection.
protected  Script getDeleteObjectScript(GenericObject object, java.util.Map options)
          Returns a script which will delete an object of a specified type from the scriptedConnection.
protected abstract  void getDeleteUserResult(CaptureList captureList)
          Analyzes the capture list generated by executing the delete user script on the scripted connection.
protected abstract  Script getDeleteUserScript(WSUser user)
          Generates a script that will delete the account of the passed user on the resource.
protected abstract  boolean getDisableUserResult(CaptureList captureList)
          Analyzes the capture list generated by executing the disable user script on the scripted connection.
protected abstract  Script getDisableUserScript(WSUser user, java.lang.String password)
          Generates a script that will disable an account for the passed user on the resource.
protected abstract  boolean getEnableUserResult(CaptureList captureList)
          Analyzes the capture list generated by executing the enable user script on the scripted connection.
protected abstract  Script getEnableUserScript(WSUser user, java.lang.String password)
          Generates a script that will enable an account for the passed user on the resource.
 GenericObject getFeatures()
          Expose features supported by the Resource Adapter.
protected  GenericObject getGetObjectResult(java.lang.String objectType, java.lang.String objectId, java.util.List attrsToGet, CaptureList captureList)
          Analyzes the captuure list generated by executing the listObjects script on the scripted connection.
protected  Script getGetObjectScript(java.lang.String objectType, java.lang.String objectId, java.util.List attrsToGet, java.util.Map options)
          Returns a script which will create an object of a specified type from the scriptedConnection.
protected  java.util.ArrayList getListAllObjectsResult(java.lang.String objectType, CaptureList captureList)
          Analyzes the captrure list generated by executing the listAllObjects script on the scripted connection.
protected  Script getListAllObjectsScript(java.lang.String resObjType, java.util.Map options, java.lang.String runAsUser, EncryptedData runAsPassword)
          Returns a script which will return a list of objects of a specified type from the scriptedConnection.
protected  java.util.List getListObjectsResult(java.lang.String objectType, java.util.Map options, CaptureList captureList)
          Analyzes the capture list generated by executing the listObjects script on the scripted connection.
protected  Script getListObjectsScript(java.lang.String resObjType, java.util.Map options)
          Returns a script which will return a list of objects of a specified type from the scriptedConnection.
protected abstract  Script getLoginScript()
          Returns a script that will log the administrative user into the system and set up the shell if necessary.
protected abstract  Script getLogoutScript()
          Returns a script that will log the administrative user out of the resource.
 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
protected  WavesetResult getRenameObjectResult(GenericObject object, CaptureList captureList)
          Analyzes the capture list generated by executing the renameObject script on the scripted connection.
protected  Script getRenameObjectScript(GenericObject object)
          Returns a script which will rename an object of a specified type from the scriptedConnection.
 java.util.List getResourceAccounts(java.util.List attributes)
           
protected  WavesetResult getScanningResult(CaptureList captureList, java.util.Map scanArgs)
          Based on the result of the scan routine's capturelist and the arguments passed into the routine, generate some output.
protected  Script getScanningScript(java.util.Map scanArgs)
          Generates a script that will return a list of all the users and interesting attributes for scanning.
protected abstract  ScriptedConnection getScriptedConnection()
          Creates and returns a ScriptedConnection to the resource.
protected  WavesetResult getTestConfigurationResult(CaptureList captureList)
          Validates the configuration provided to the resource.
protected  Script getTestConfigurationScript()
          Returns a shell script to check the resource and determine if the configuration information is correct.
protected  WavesetResult getUpdateObjectResult(GenericObject object, java.util.Map options, CaptureList captureList)
          Analyzes the capture list generated by executing the updateObject script on the scripted connection.
protected  Script getUpdateObjectScript(GenericObject object, java.util.Map options)
          Returns a script which will update an object of a specified type from the scriptedConnection.
protected  void getUpdateUserResult(CaptureList captureList, WavesetResult result)
           
protected abstract  void getUpdateUserResult(WSUser user, CaptureList captureList, WavesetResult result)
          Analyzes the capture list generated by executing the update user script on the scripted connection.
protected  Script getUpdateUserScript(java.lang.String accountId, java.lang.String password)
          Generates a script that will update an account for the passed user on the resource.
protected abstract  Script getUpdateUserScript(WSUser user, java.lang.String password)
          Generates a script that will update an account for the passed user on the resource.
 WSUser getUser(WSUser user)
          Gets a specified user from the resource, or returns null if they are not there.
protected abstract  WSUser getUserResult(CaptureList captureList, WSUser targetUser)
          Analyzes the capture list generated by executing the get user script on the scripted connection.
protected abstract  Script getUserScript(WSUser user)
          Returns a script that sends commands to check for existence of the passed user on the resource.
 ScriptToken.Timeout getWaitFor()
           
 ScriptToken.Timeout getWaitForIgnoreCase()
           
protected abstract  boolean isAllowableUserAttribute(java.lang.String name)
          Tests whether a given attribute name is legal on the resource.
 java.util.ArrayList listAllObjects(java.lang.String resourceObjectType, 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)
          Returns a list of objects matching the requested objectType and options
protected  boolean lookupAndRunAction(WSUser user, java.lang.String operation, java.lang.String timing, WavesetResult result)
           
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)
          Deletes a user account on the resource

This method is called by deleteAccounts (the multiuser delete method).

protected  void realDisable(WSUser user, WavesetResult result)
          Disables a user account on the resource

This method is called by disableAccounts (the multiuser disable method).

protected  void realEnable(WSUser user, WavesetResult result)
          Enables a user account on the resource

This method is called by enableAccounts (the multiuser enable method).

protected  void realUpdate(WSUser user, WavesetResult result)
          Updates a user account on the resource

This method is called by updateAccounts (the multiuser update method).

 WavesetResult renameObject(GenericObject object)
           
protected  WSAttribute reverseMapAttr(java.lang.String attr, java.lang.Object value)
          Map from a resource attribute to a waveset attribute.
protected  WSAttribute reverseMapAttr(java.lang.String attr, java.lang.Object[] values)
          Map from a resource attribute to a waveset attribute.
protected  void reverseMapMultiAttr(java.lang.String attr, java.lang.Object value, WSUser user)
          Map from a resource attribute to multiple waveset attributes and add them to the user.
 WavesetResult run(ResourceAction action, java.util.Map args)
          This is NOT supported by default.
protected  WavesetResult runAction(ResourceAction action, java.util.Map args)
           
protected  void runAction(java.lang.String action, WSUser user, java.lang.String operation, int timeout, WavesetResult result)
           
protected  void runAfterAction(WSUser user, WavesetResult result, java.lang.String operation)
           
protected  void runBeforeAction(WSUser user, WavesetResult result, java.lang.String operation)
           
 WavesetResult scan(java.util.Map parameters)
          Generates a script that will return a list of all the users and interesting attributes for scanning.
protected  void startConnection()
          Starts a scripted connection up and logs into it.
protected  void stopConnection()
          Logs out of a scripted connection and disconnects.
 WavesetResult testConfiguration()
          Default implementation of test method, calls check create.
 WavesetResult updateObject(GenericObject object, java.util.Map options)
          Updates the specified objectId of type objectType using the list of attributes provided.
 WavesetResult updateResourceAccount(GenericObject account)
           
 boolean wellFormedUserAttributeName(java.lang.String name)
          Backwards compatible work around for restricted protected access of isAllowableUserAttribute.
 
Methods inherited from class com.waveset.adapter.ResourceAdapterBase
checkForNoPasswordInSchema, checkSyntax, createAccount, createAccounts, createIdentity, createPrototypeResource, deleteAccount, deleteAccount, deleteAccounts, disableAccount, disableAccounts, dnsEqual, dnsEqual, enableAccount, enableAccounts, executeResourceAttributeJavascriptAction, fillInResourceInfo, fillInResourceInfo, 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, getIdentity, getListAllObjectsAttrParse, getListUserAttrParse, getListUserGroupsAttrParse, getOptionalBooleanResAttrVal, getOptionalBooleanResAttrVal, getOptionalEncryptedResAttrVal, getOptionalResAttrVal, getOptionalStringResAttrVal, getRequiredResAttr, getRequiredResAttr, getRequiredResAttrVal, getRequiredResAttrVal, getRequiredResAttrVals, getRequiredUserAttributeNames, getResAttrValActionOnUser, getResAttrVals, getResource, 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, runResourceAttributeJavascriptAction, setCache, setContext, setDisabled, setFromResource, setResource, setResourceObjectClassAttr, setResourceOptionAttrs, startConnectionWrapper, supportsAccountActions, supportsAccountDisable, supportsActions, supportsCaseInsensitiveAccountIds, supportsContainerObjectTypes, supportsExcludedAccounts, supportsResourceAccount, supportsScanning, updateAccount, updateAccounts, 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

CLASS

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

RA_LOGIN_USER

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

RA_LOGIN_PASSWORD

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

RA_HOST

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

RA_PORT

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

RA_CONN_TYPE

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

RA_CONN_TIMEOUT

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

RA_CONN_MAX

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

RA_BLOCK_FETCH_TIMEOUT

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

RA_TERM

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

conn

protected ScriptedConnection conn
Constructor Detail

GenericScriptResourceAdapter

public GenericScriptResourceAdapter(Resource res,
                                    ObjectCache cache)
Constructor.


GenericScriptResourceAdapter

public GenericScriptResourceAdapter()
No argument constructor.

Method Detail

getCapture

public ScriptToken.Timeout getCapture()
Specified by:
getCapture in interface ResourcePolicyTimeouts

getWaitFor

public ScriptToken.Timeout getWaitFor()
Specified by:
getWaitFor in interface ResourcePolicyTimeouts

getWaitForIgnoreCase

public ScriptToken.Timeout getWaitForIgnoreCase()
Specified by:
getWaitForIgnoreCase in interface ResourcePolicyTimeouts

getFeatures

public GenericObject getFeatures()
Description copied from class: ResourceAdapterBase
Expose features supported by the Resource Adapter. Note: ActiveSync is considered a facet, not a feature.

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

authenticate

public WavesetResult authenticate(java.util.HashMap loginInfo)
                           throws WavesetException
Authenticates the user represented in the loginInfo. Throws if the user is not authenticated. Uses the abstract methods getAuthenticateScript and getAuthenticateResult for the resource specific logic.

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

checkCreateAccount

public WavesetResult checkCreateAccount(WSUser user)
                                 throws WavesetException
Verifies that account creation is likely to succeed with the given user. Uses the abstract methods getCheckCreateAccountScript and getCheckCreateAccountResult for the resource specific logic.

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

checkDeleteAccount

public WavesetResult checkDeleteAccount(WSUser user)
                                 throws WavesetException
Verifies that account deletion is likely to succeed with the given user. Uses the abstract methods getCheckDeleteAccountScript and getCheckDeleteAccountResult for the resource specific logic.

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

checkUpdateAccount

public WavesetResult checkUpdateAccount(WSUser user)
                                 throws WavesetException
Verifies that account update is likely to succeed with the given user. Uses the abstract methods getCheckUpdateAccountScript and getCheckUpdateAccountResult for the resource specific logic.

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

constructUserAttributeParameter

protected abstract java.lang.String constructUserAttributeParameter(java.lang.String key,
                                                                    java.lang.String value)
Builds up a single user attribute value suitable for shell commands, given the parameter key and value. Must be overridden to format for specific system syntax. In general would return a string like 'key=value' or '-k value' or something similar.


constructUserAttributeParameters

protected java.lang.String constructUserAttributeParameters(WSUser user)
Builds a list of parameters appropriate for the resource to either create or update users. Defers to the derived class to determine whether a particular attribute is legal (isAllowableUserAttribute) and how to format the parameter {constructUserAttributeParameter).


constructUserAttributeParameters

protected java.lang.String constructUserAttributeParameters(WSUser user,
                                                            java.util.Map allowedAttributes)
An alternate method to build a list of parameters appropriate for the resource to either create or update users. Defers to the passed in map to determine if a particular attribute is valid and how to format the parameter {constructUserAttributeParameter). Needed because the constructUserAttributeParameters(WSUser) method assumes that all parameters will be put on the same command line i.e. useradd ... some adapters have multipule command line executions


getAccountAttributeFromMapName

protected WSAttribute getAccountAttributeFromMapName(WSUser user,
                                                     java.lang.String mapName)
Returns the user attribute, if found, from the map name.


getAccountAttributes

public WSAttributes getAccountAttributes(java.lang.String accountIdentity)
                                  throws WavesetException
Get account attributes for an identity. Not properly implemented.

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

getAccountIterator

public AccountIterator getAccountIterator()
                                   throws WavesetException
Returns an account iterator containing all of the users on the resource. Defers to abstract methods getAccountIteratorScript and getAccountIteratorResult for resource specific behavior.

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

getAccountIterator

public AccountIterator getAccountIterator(long timeout)
                                   throws WavesetException
Note: Overrides the method in ResourceAdapterBase. The runScript method invokes methods which have a timeout built in and these need to be overridden in order to have valid timeout implementations.

Returns an account iterator containing all of the users on the resource. Defers to abstract methods getAccountIteratorScript and getAccountIteratorResult for resource specific behavior.

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

getAccountIteratorResult

protected abstract AccountIterator getAccountIteratorResult(CaptureList captureList)
                                                     throws WavesetException
Generates an account iterator from the capture list that was built from running the getAccountIteratorScript generated script through the ScriptedConnection. Should be defined in the derived class to wade through the captured script output, extract out the users, and build up an AccountIterator implementation covering them all.

Throws:
WavesetException

getAccountIteratorScript

protected abstract Script getAccountIteratorScript()
                                            throws WavesetException
Returns a script that can be run on an opened and logged in ScriptedConnection to pull a list of users out of the system. Needs to be defined in the derived class to send a command that will cause a list of users to be emitted, and to capture that list for parsing in getAccountIteratorResult. Should NOT send login or logout commands.

Throws:
WavesetException

getAccountIteratorScript

protected Script getAccountIteratorScript(long timeout)
                                   throws WavesetException
Throws:
WavesetException

getAuthenticateResult

protected abstract WavesetResult getAuthenticateResult(java.util.HashMap loginInfo,
                                                       CaptureList captureList)
                                                throws WavesetException
Takes the capture list from running the authenticate script through the resource and validates it. Throws if it is invalid. Should be defined in the derived class to evaluate the captured output of running the authenticate script through the ScriptedConnection

Throws:
WavesetException

getAuthenticateScript

protected abstract Script getAuthenticateScript(java.util.HashMap loginInfo)
                                         throws WavesetException
Generates a script for authenticating a user on the resource using the username and password in the loginInfo HashMap. Should NOT login or logout. Should be defined in the derived class to verify with the shell that the userid and password are authentic.

Throws:
WavesetException

getCheckCreateAccountResult

protected abstract WavesetResult getCheckCreateAccountResult(CaptureList captureList)
                                                      throws WavesetException
Validates the capture list returned from the check create account script execution. Returns a result if create account is likely to succeed, otherwise throws. The executing script may also throw if check fails. Derived class must define this to evaluate the capture list and throw if it is invalid.

Throws:
WavesetException

getCheckCreateAccountScript

protected abstract Script getCheckCreateAccountScript()
                                               throws WavesetException
Returns a shell script to check the resource and determine if a create account request is likely to succeed. Running the script through the scripted connection may cause a failure and throw, or evaluating the resulting capture list may result in a throw. The script should NOT login or logout. Must be defined in derived class to generate script.

Throws:
WavesetException

getCheckDeleteAccountResult

protected abstract WavesetResult getCheckDeleteAccountResult(CaptureList captureList)
                                                      throws WavesetException
Validates the capture list returned from the check delete account script execution. Returns a result if delete account is likely to succeed, otherwise throws. The executing script may also throw if check fails. Derived class must define this to evaluate the capture list and throw if it is invalid.

Throws:
WavesetException

getCheckDeleteAccountScript

protected abstract Script getCheckDeleteAccountScript()
                                               throws WavesetException
Returns a shell script to check the resource and determine if a delete account request is likely to succeed. Running the script through the scripted connection may cause a failure and throw, or evaluating the resulting capture list may result in a throw. The script should NOT login or logout. Must be defined in derived class to generate script.

Throws:
WavesetException

getCheckUpdateAccountResult

protected abstract WavesetResult getCheckUpdateAccountResult(CaptureList captureList)
                                                      throws WavesetException
Validates the capture list returned from the check update account script execution. Returns a result if update account is likely to succeed, otherwise throws. The executing script may also throw if check fails. Derived class must define this to evaluate the capture list and throw if it is invalid.

Throws:
WavesetException

getCheckUpdateAccountScript

protected abstract Script getCheckUpdateAccountScript()
                                               throws WavesetException
Returns a shell script to check the resource and determine if an update account request is likely to succeed. Running the script through the scripted connection may cause a failure and throw, or evaluating the resulting capture list may result in a throw. The script should NOT login or logout. Must be defined in derived class to generate script.

Throws:
WavesetException

getConnectionType

protected abstract java.lang.String getConnectionType()
                                               throws WavesetException
Returns the scripted connection type of the resource.

Throws:
WavesetException

getCreateUserResult

protected abstract void getCreateUserResult(CaptureList captureList,
                                            WavesetResult result)
                                     throws WavesetException
Analyzes the capture list generated by executing the create user script on the scripted connection. Throws if the capture list indicates failure. The executing script may throw on failure also.

Throws:
WavesetException

getCreateUserScript

protected abstract Script getCreateUserScript(WSUser user)
                                       throws WavesetException
Generates a script that will create an account for the passed user on the resource. The script can be executed on a ScriptedConnection. Should NOT login or logout. Must be defined in the derived class with the necessary steps to create a user.

Throws:
WavesetException

getDeleteUserResult

protected abstract void getDeleteUserResult(CaptureList captureList)
                                     throws WavesetException
Analyzes the capture list generated by executing the delete user script on the scripted connection. Throws if the capture list indicates failure. The executing script may throw on failure also.

Throws:
WavesetException

getDeleteUserScript

protected abstract Script getDeleteUserScript(WSUser user)
                                       throws WavesetException
Generates a script that will delete the account of the passed user on the resource. The script can be executed on a ScriptedConnection. Should NOT login or logout.

Throws:
WavesetException

getDisableUserResult

protected abstract boolean getDisableUserResult(CaptureList captureList)
                                         throws WavesetException
Analyzes the capture list generated by executing the disable user script on the scripted connection. Returns a boolean indicating if the operation was successful. Throws if the capture list indicates failure. The executing script may throw on failure also.

Throws:
WavesetException

getDisableUserScript

protected abstract Script getDisableUserScript(WSUser user,
                                               java.lang.String password)
                                        throws WavesetException
Generates a script that will disable an account for the passed user on the resource. The script can be executed on a ScriptedConnection. Should NOT login or logout.

Throws:
WavesetException

getEnableUserResult

protected abstract boolean getEnableUserResult(CaptureList captureList)
                                        throws WavesetException
Analyzes the capture list generated by executing the enable user script on the scripted connection. Returns a boolean indicating if the operation was successful. Throws if the capture list indicates failure. The executing script may throw on failure also.

Throws:
WavesetException

getEnableUserScript

protected abstract Script getEnableUserScript(WSUser user,
                                              java.lang.String password)
                                       throws WavesetException
Generates a script that will enable an account for the passed user on the resource. The script can be executed on a ScriptedConnection. Should NOT login or logout.

Throws:
WavesetException

getLoginScript

protected abstract Script getLoginScript()
                                  throws WavesetException
Returns a script that will log the administrative user into the system and set up the shell if necessary.

Throws:
WavesetException

getLogoutScript

protected abstract Script getLogoutScript()
                                   throws WavesetException
Returns a script that will log the administrative user out of the resource.

Throws:
WavesetException

getScriptedConnection

protected abstract ScriptedConnection getScriptedConnection()
                                                     throws WavesetException
Creates and returns a ScriptedConnection to the resource.

Throws:
WavesetException

getUpdateUserResult

protected abstract void getUpdateUserResult(WSUser user,
                                            CaptureList captureList,
                                            WavesetResult result)
                                     throws WavesetException
Analyzes the capture list generated by executing the update user script on the scripted connection. Throws if the capture list indicates failure. The executing script may throw on failure also.

Throws:
WavesetException

getUpdateUserResult

protected void getUpdateUserResult(CaptureList captureList,
                                   WavesetResult result)
                            throws WavesetException
Throws:
WavesetException

getUpdateUserScript

protected abstract Script getUpdateUserScript(WSUser user,
                                              java.lang.String password)
                                       throws WavesetException
Generates a script that will update an account for the passed user on the resource. The script can be executed on a ScriptedConnection. Should NOT login or logout.

Throws:
WavesetException

getUpdateUserScript

protected Script getUpdateUserScript(java.lang.String accountId,
                                     java.lang.String password)
                              throws WavesetException
Generates a script that will update an account for the passed user on the resource. The script can be executed on a ScriptedConnection. Should NOT login or logout.

Throws:
WavesetException

getUser

public WSUser getUser(WSUser user)
               throws WavesetException
Gets a specified user from the resource, or returns null if they are not there. Defers to abstract methods getUserScript and getUserResult for resource specific behavior.

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

getUserResult

protected abstract WSUser getUserResult(CaptureList captureList,
                                        WSUser targetUser)
                                 throws WavesetException
Analyzes the capture list generated by executing the get user script on the scripted connection. Returns null if the capture list indicates failure. Otherwise returns the new user. Should probably be called getGetUserResult for consistency, but that would look funny.

Throws:
WavesetException

getUserScript

protected abstract Script getUserScript(WSUser user)
                                 throws WavesetException
Returns a script that sends commands to check for existence of the passed user on the resource. Upon execution, captures necessary text for analysis by getUserResult method.

Throws:
WavesetException

isAllowableUserAttribute

protected abstract boolean isAllowableUserAttribute(java.lang.String name)
Tests whether a given attribute name is legal on the resource.


wellFormedUserAttributeName

public boolean wellFormedUserAttributeName(java.lang.String name)
Backwards compatible work around for restricted protected access of isAllowableUserAttribute.

Parameters:
name -
Returns:

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. Defers to abstract methods getCreateUserScript and getCreateUserResult for resource specific behavior.

Overrides:
realCreate in class ResourceAdapterBase
Throws:
WavesetException

runBeforeAction

protected void runBeforeAction(WSUser user,
                               WavesetResult result,
                               java.lang.String operation)
                        throws WavesetException
Throws:
WavesetException

runAfterAction

protected void runAfterAction(WSUser user,
                              WavesetResult result,
                              java.lang.String operation)
                       throws WavesetException
Throws:
WavesetException

lookupAndRunAction

protected boolean lookupAndRunAction(WSUser user,
                                     java.lang.String operation,
                                     java.lang.String timing,
                                     WavesetResult result)
                              throws WavesetException
Throws:
WavesetException

runAction

protected void runAction(java.lang.String action,
                         WSUser user,
                         java.lang.String operation,
                         int timeout,
                         WavesetResult result)
                  throws WavesetException
Throws:
WavesetException

realDelete

protected void realDelete(WSUser user,
                          WavesetResult result)
                   throws WavesetException
Deletes a user account on the resource

This method is called by deleteAccounts (the multiuser delete method). deleteAccounts will open a connection, call delete for each user given, then close the connection. Defers to abstract methods getDeleteUserScript and getDeleteUserResult for resource specific behavior.

Overrides:
realDelete in class ResourceAdapterBase
Throws:
WavesetException

realDisable

protected void realDisable(WSUser user,
                           WavesetResult result)
                    throws WavesetException
Disables a user account on the resource

This method is called by disableAccounts (the multiuser disable method). EnableAccounts will open a connection, call disableUpdate for each user being created, then close the connection. Defers to abstract methods getDisableUserScript and getDisableUserResult for resource specific behavior.

Overrides:
realDisable in class ResourceAdapterBase
Throws:
WavesetException

realEnable

protected void realEnable(WSUser user,
                          WavesetResult result)
                   throws WavesetException
Enables a user account on the resource

This method is called by enableAccounts (the multiuser enable method). EnableAccounts will open a connection, call enableUpdate for each user being created, then close the connection. Defers to abstract methods getEnableUserScript and getEnableUserResult for resource specific behavior.

Overrides:
realEnable in class ResourceAdapterBase
Throws:
WavesetException

realUpdate

protected void realUpdate(WSUser user,
                          WavesetResult result)
                   throws WavesetException
Updates a user account on the resource

This method is called by updateAccounts (the multiuser update method). UpdateAccounts will open a connection, call realUpdate for each user being created, then close the connection. Defers to abstract methods getUpdateUserScript and getUpdateUserResult for resource specific behavior.

Overrides:
realUpdate in class ResourceAdapterBase
Throws:
WavesetException

reverseMapAttr

protected WSAttribute reverseMapAttr(java.lang.String attr,
                                     java.lang.Object[] values)
Map from a resource attribute to a waveset attribute. Return null if there's no mapping.


reverseMapAttr

protected WSAttribute reverseMapAttr(java.lang.String attr,
                                     java.lang.Object value)
Map from a resource attribute to a waveset attribute. Return null if there's no mapping.


reverseMapMultiAttr

protected void reverseMapMultiAttr(java.lang.String attr,
                                   java.lang.Object value,
                                   WSUser user)
Map from a resource attribute to multiple waveset attributes and add them to the user.


startConnection

protected void startConnection()
                        throws WavesetException
Starts a scripted connection up and logs into it. Defers to abstract method getLoginScript for resource specific behavior.

Overrides:
startConnection in class ResourceAdapterBase
Throws:
WavesetException

stopConnection

protected void stopConnection()
                       throws WavesetException
Logs out of a scripted connection and disconnects. Defers to abstract method getLogoutScript for resource specific behavior.

Overrides:
stopConnection in class ResourceAdapterBase
Throws:
WavesetException

scan

public WavesetResult scan(java.util.Map parameters)
                   throws WavesetException
Generates a script that will return a list of all the users and interesting attributes for scanning.

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

getScanningScript

protected Script getScanningScript(java.util.Map scanArgs)
                            throws WavesetException
Generates a script that will return a list of all the users and interesting attributes for scanning.

Resources which support scanning will have to implement both a genScanningScript and getScanningResult along the "_supportsScanning" attribute to true. ( in the prototype xml )

Throws:
WavesetException

getScanningResult

protected WavesetResult getScanningResult(CaptureList captureList,
                                          java.util.Map scanArgs)
                                   throws WavesetException
Based on the result of the scan routine's capturelist and the arguments passed into the routine, generate some output. You may or may not use the scanArgs in the processing of the results, it depends on what mechanisms are available on each resource.

Resources which support scanning will have to implement both a genScanningScript and getScanningResult along the "_supportsScanning" attribute to true. ( in the prototype xml )

Throws:
WavesetException

listAllObjects

public java.util.ArrayList listAllObjects(java.lang.String resourceObjectType,
                                          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:
resourceObjectType - - a type of object that is either well-known or is meaningful to the resource. Every resource is expected to recognize certain values. For example, listAllObjects(ACCOUNT) should return a list of all account names.
options - - a map of options
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 of all objects of a specified type.
Throws:
WavesetException

getListAllObjectsScript

protected Script getListAllObjectsScript(java.lang.String resObjType,
                                         java.util.Map options,
                                         java.lang.String runAsUser,
                                         EncryptedData runAsPassword)
                                  throws WavesetException
Returns a script which will return a list of objects of a specified type from the scriptedConnection. This script should login as the username and password, if specified, or login as the authoritative account.

Throws:
WavesetException

getListAllObjectsResult

protected java.util.ArrayList getListAllObjectsResult(java.lang.String objectType,
                                                      CaptureList captureList)
                                               throws WavesetException
Analyzes the captrure list generated by executing the listAllObjects script on the scripted connection. Throws if the capture list indicates failure. The executing script may throw on failure also.

Throws:
WavesetException

getResourceAccounts

public java.util.List getResourceAccounts(java.util.List attributes)
                                   throws WavesetException
Specified by:
getResourceAccounts in interface ResourceAdapter
Overrides:
getResourceAccounts in class ResourceAdapterBase
Throws:
WavesetException

updateResourceAccount

public WavesetResult updateResourceAccount(GenericObject account)
                                    throws WavesetException
Specified by:
updateResourceAccount in interface ResourceAdapter
Overrides:
updateResourceAccount in class ResourceAdapterBase
Throws:
WavesetException

run

public WavesetResult run(ResourceAction action,
                         java.util.Map args)
                  throws WavesetException
Description copied from class: ResourceAdapterBase
This is NOT supported by default. If you have enabled the Featrues.ACTIONS feature, then this MUST be supported.

Specified by:
run in interface ResourceAdapter
Overrides:
run in class ResourceAdapterBase
Parameters:
action - The action to execute
args - Additional args, can be null.
Returns:
A WavesetResult.
Throws:
WavesetException

runAction

protected WavesetResult runAction(ResourceAction action,
                                  java.util.Map args)
                           throws WavesetException
Throws:
WavesetException

getActionResult

protected void getActionResult(CaptureList captureList,
                               WavesetResult result)

getActionScript

protected Script getActionScript(java.lang.String action,
                                 int timeout,
                                 java.util.Map args)

getAccountActionResult

protected void getAccountActionResult(CaptureList captureList,
                                      WavesetResult result)

getAccountActionScript

public Script getAccountActionScript(java.lang.String action,
                                     WSUser user,
                                     java.lang.String operation,
                                     int timeout)
                              throws WavesetException
Throws:
WavesetException

getListObjectsScript

protected Script getListObjectsScript(java.lang.String resObjType,
                                      java.util.Map options)
                               throws WavesetException
Returns a script which will return a list of objects of a specified type from the scriptedConnection.

Throws:
WavesetException

getListObjectsResult

protected java.util.List getListObjectsResult(java.lang.String objectType,
                                              java.util.Map options,
                                              CaptureList captureList)
                                       throws WavesetException
Analyzes the capture list generated by executing the listObjects script on the scripted connection. Throws if the capture list indicates failure. The executing script may also throw on failure.

Throws:
WavesetException

listObjects

public java.util.List listObjects(java.lang.String objectType,
                                  java.util.Map options)
                           throws WavesetException
Returns a list of objects matching the requested objectType and options

Specified by:
listObjects in interface ResourceAdapter
Overrides:
listObjects in class ResourceAdapterBase
Parameters:
objectType - - the name of a valid object class for this specified "resId".
options - - several options can be specified which control the behavior of the search. They include:
    "searchContext" - the value of this option determines within what context to perform search (ResourceAdapter.RA_SEARCH_CONTEXT). If not specified, will attempt to get a value from RA_BASE_CONTEXT. If no value, will assume search should be done from logical top.
  1. "searchFilter" - optional specification, in LDAP search filter format as specified in RFC 1558, of one or more object tuples either and'ed or or'ed together. If not specified, a filter will be constructed using the specified objectType. (ResourceAdapter.SEARCH_FILTER).
  2. "searchScope" - specifies whether the search should be done on the current object, only within the context of the specified "searchContext", or in all subcontext within the specified "searchContext" (ResourceAdapter.RA_SEARCH_SCOPE). Valid values are "object", "oneLevel", or "subTree" indicates that the search should be performed on all sub contexts within the specified "searchContext".
  3. "searchTimeLimit" - the timelimit in milliseconds a search should not exceed (ResourceAdapter.RA_SEARCH_TIME_LIMIT).
  4. "searchAttrsToGet" - the list of objectType specific attribute names to get per object
  5. "runAsUser" - user name this request is to be run as. If not specified, defaults to resource proxy admin user.
  6. "runAsPassword" - password of runAsUser. Required to authenticate with resource in order to run the list request as the specified user
Throws:
WavesetException

getGetObjectScript

protected Script getGetObjectScript(java.lang.String objectType,
                                    java.lang.String objectId,
                                    java.util.List attrsToGet,
                                    java.util.Map options)
                             throws WavesetException
Returns a script which will create an object of a specified type from the scriptedConnection.

Throws:
WavesetException

getGetObjectResult

protected GenericObject getGetObjectResult(java.lang.String objectType,
                                           java.lang.String objectId,
                                           java.util.List attrsToGet,
                                           CaptureList captureList)
                                    throws WavesetException
Analyzes the captuure list generated by executing the listObjects script on the scripted connection. Throws if the capture list indicates failure. The executing script may also throw on failure.

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:
objectType - - a valid object type defined in the resource's section
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
Throws:
WavesetException

getCreateObjectScript

protected Script getCreateObjectScript(GenericObject object,
                                       java.util.Map options)
                                throws WavesetException
Returns a script which will create an object of a specified type from the scriptedConnection.

Throws:
WavesetException

getCreateObjectResult

protected WavesetResult getCreateObjectResult(GenericObject object,
                                              java.util.Map options,
                                              CaptureList captureList)
                                       throws WavesetException
Analyzes the captuure list generated by executing the listObjects script on the scripted connection. Throws if the capture list indicates failure. The executing script may also throw on failure.

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:
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

getDeleteObjectScript

protected Script getDeleteObjectScript(GenericObject object,
                                       java.util.Map options)
                                throws WavesetException
Returns a script which will delete an object of a specified type from the scriptedConnection.

Throws:
WavesetException

getDeleteObjectResult

protected WavesetResult getDeleteObjectResult(GenericObject object,
                                              java.util.Map options,
                                              CaptureList captureList)
                                       throws WavesetException
Analyzes the captuure list generated by executing the getDeleteObject script on the scripted connection. Throws if the capture list indicates failure. The executing script may also throw on failure.

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:
object - - a valid fully qualified object identifier on this resource (e.g. "dn")
options - - not currently used since the objectId/objectType provide a unique identifier of the object being deleted
Throws:
WavesetException

getUpdateObjectScript

protected Script getUpdateObjectScript(GenericObject object,
                                       java.util.Map options)
                                throws WavesetException
Returns a script which will update an object of a specified type from the scriptedConnection.

Throws:
WavesetException

getUpdateObjectResult

protected WavesetResult getUpdateObjectResult(GenericObject object,
                                              java.util.Map options,
                                              CaptureList captureList)
                                       throws WavesetException
Analyzes the capture list generated by executing the updateObject script on the scripted connection. Throws if the capture list indicates failure. The executing script may also throw on failure.

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:
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

getRenameObjectScript

protected Script getRenameObjectScript(GenericObject object)
                                throws WavesetException
Returns a script which will rename an object of a specified type from the scriptedConnection.

Throws:
WavesetException

getRenameObjectResult

protected WavesetResult getRenameObjectResult(GenericObject object,
                                              CaptureList captureList)
                                       throws WavesetException
Analyzes the capture list generated by executing the renameObject script on the scripted connection. Throws if the capture list indicates failure. The executing script may also throw on failure.

Throws:
WavesetException

renameObject

public WavesetResult renameObject(GenericObject object)
                           throws WavesetException
Throws:
WavesetException

getTestConfigurationResult

protected WavesetResult getTestConfigurationResult(CaptureList captureList)
                                            throws WavesetException
Validates the configuration provided to the resource. It also should check if the commands are available and permission are set so that the account can use them.

Throws:
WavesetException

getTestConfigurationScript

protected Script getTestConfigurationScript()
                                     throws WavesetException
Returns a shell script to check the resource and determine if the configuration information is correct. It also should determine if the command available and the account given has permission to execute them.

Throws:
WavesetException

testConfiguration

public WavesetResult testConfiguration()
                                throws WavesetException
Description copied from class: ResourceAdapterBase
Default implementation of test method, calls check create. It is strongly preferred that this is overrided by derived classes so that a real test can be done without burdening the checkCreate method with a large overhead. On errors, an exception can be thrown or the error can be returned in the WavesetResult. Errors in the result will generate a test failure message, messages will appear for success or failure.

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