com.waveset.adapter
Class NSKResourceAdapter

java.lang.Object
  extended bycom.waveset.adapter.ResourceAdapterBase
      extended bycom.waveset.adapter.GenericScriptResourceAdapter
          extended bycom.waveset.adapter.NSKResourceAdapter
All Implemented Interfaces:
ResourceAdapter, ResourcePolicyTimeouts

public class NSKResourceAdapter
extends GenericScriptResourceAdapter

Resource adapter for a Compaq (Tandem) NonStop Kernel Operating System. The hardware platform is Himalaya, although I think that NSK will run on other Compaq (Tandem) platforms. There are 2 OS interfaces/personalities that are available on NSK: Guardian and Open System Services (OSS). Guardian is the native environment and OSS is a Unix like environment that supports POSIX in compliance with XPG4. There is also a security tool (SafeGuard) that provides extra security features for the NSK. These features are available on both Guardian and OSS interfaces. Supports two sets of user attributes. 1. Native Guardian 2. Safeguard


Nested Class Summary
protected  class NSKResourceAdapter.AcctIter
          AccountIterator implementation that can be built by construction from the output of "safecom info user".
 
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 ACCOUNT_ID_MAPNAME
           
static java.lang.String ACCOUNT_ID_NAME
           
static java.lang.String ADMIN_GROUP_MAPNAME
           
static java.lang.String ADMIN_GROUP_NAME
           
static java.lang.String code_id
           
static java.lang.String GROUP_ID_MAPNAME
           
static java.lang.String GROUP_ID_NAME
           
static java.lang.String OWNER_GROUP_NUM_MAPNAME
           
static java.lang.String OWNER_GROUP_NUM_NAME
           
static java.lang.String OWNER_USER_NUM_MAPNAME
           
static java.lang.String OWNER_USER_NUM_NAME
           
static java.lang.String RA_ADMIN_PASSWORD
          Resource attribute name of the admin user's password variable.
static java.lang.String RA_ADMIN_USER
          Resource attribute name of the account name used to connect to the resource.
static java.lang.String RA_CONN_TYPE
          Resource attribute name of the scripted connection type variable.
static java.lang.String RA_CREATE_DIR
          Resource attribute name of the variable asking whether to make a users home directory when creating a user.
static java.lang.String RA_HOST
          Resource attribute name of the host used to communicate with the resource.
static java.lang.String RA_PORT
          Resource attribute name of the variable holding the port on which to communicate to the resource.
static java.lang.String RA_TACL_PROMPT
          Resource attribute name of the shell prompt character.
static java.lang.String RESOURCE_NAME
           
static java.lang.String USER_ID_MAPNAME
           
static java.lang.String USER_ID_NAME
           
static java.lang.String USER_MAPNAME
           
static java.lang.String USER_NAME
           
 
Fields inherited from class com.waveset.adapter.GenericScriptResourceAdapter
CLASS, conn, RA_BLOCK_FETCH_TIMEOUT, RA_CONN_MAX, RA_CONN_TIMEOUT, RA_LOGIN_PASSWORD, RA_LOGIN_USER, 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
NSKResourceAdapter()
          No argument constructor.
NSKResourceAdapter(Resource res, ObjectCache cache)
          Constructor.
 
Method Summary
protected  java.lang.String constructUserAttributeParameter(java.lang.String key, java.lang.String value)
          Builds up a single user attribute value suitable for shell commands.
protected  java.lang.String constructUserAttributeParameters(WSUser user)
          Builds a list of parameters appropriate for the resource to either create or update users.
 Resource createPrototypeResource()
           
protected  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  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  WavesetResult getAuthenticateResult(java.util.HashMap loginInfo, CaptureList captureList)
          Takes the capture list from running the authenticate script through the resource and validates it.
protected  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.
protected  WavesetResult getCheckCreateAccountResult(CaptureList captureList)
          Validates the capture list returned from the check create account script execution.
protected  Script getCheckCreateAccountScript()
          Returns a shell script to check the resource and determine if a create account request is likely to succeed.
protected  WavesetResult getCheckDeleteAccountResult(CaptureList captureList)
          Validates the capture list returned from the check delete account script execution.
protected  Script getCheckDeleteAccountScript()
          Returns a shell script to check the resource and determine if a delete account request is likely to succeed.
protected  WavesetResult getCheckUpdateAccountResult(CaptureList captureList)
          Validates the capture list returned from the update create account script execution.
protected  Script getCheckUpdateAccountScript()
          Returns a shell script to check the resource and determine if an update account request is likely to succeed.
protected  java.lang.String getConnectionType()
          Returns the scripted connection type of the resource.
protected  void getCreateUserResult(CaptureList captureList, WavesetResult result)
          Analyzes the capture list generated by executing the create user script on the scripted connection.
protected  Script getCreateUserScript(WSUser user)
          Generates a script that will create an account for the passed user on the resource.
protected  void getDeleteUserResult(CaptureList captureList)
          Analyzes the capture list generated by executing the delete user script on the scripted connection.
protected  Script getDeleteUserScript(WSUser user)
          Generates a script that will delete the account of the passed user on the resource.
protected  boolean getDisableUserResult(CaptureList captureList)
          Analyzes the capture list generated by executing the disable user script on the scripted connection.
protected  Script getDisableUserScript(WSUser user, java.lang.String password)
          Generates a script that will disable an account for the passed user on the resource.
protected  boolean getEnableUserResult(CaptureList captureList)
          Analyzes the capture list generated by executing the enable user script on the scripted connection.
protected  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()
          Doesn't support listAllObjects of accounts.
 java.lang.String getLoginPasswordAttrName()
           
protected  Script getLoginScript()
          Returns a script that will log the administrative user into the system and set up the shell if necessary.
 java.lang.String getLoginUserAttrName()
           
protected  Script getLogoutScript()
          Returns a script that will log the administrative user out of the resource.
protected  ScriptedConnection getScriptedConnection()
          Creates and returns a ScriptedConnection to the resource.
protected  WavesetResult getTestConnectionResult(CaptureList captureList)
          Evaluates capture list from execution of generic test connection script.
protected  Script getTestConnectionScript()
          Creates a script to test the connection, does NOT login or logout.
protected  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(WSUser user, java.lang.String password)
          Generates a script that will create an account for the passed user on the resource.
protected  WSUser getUserResult(CaptureList captureList, WSUser targetUser)
          Analyzes the capture list generated by executing the get user script on the scripted connection.
protected  Script getUserScript(WSUser user)
          Returns a script that sends commands to check for existence of the passed user on the resource.
protected  boolean isAllowableUserAttribute(java.lang.String name)
          Reports whether a given attribute name is legal on the resource.
protected  void startConnection()
          Starts a scripted connection up and logs into it.
static Resource staticCreatePrototypeResource()
          Creates a resource based on the prototype xml.
 boolean supportsAccountDisable()
          Whether we support account enable and disable through the resource.
 
Methods inherited from class com.waveset.adapter.GenericScriptResourceAdapter
authenticate, checkCreateAccount, checkDeleteAccount, checkUpdateAccount, constructUserAttributeParameters, createObject, deleteObject, getAccountActionResult, getAccountActionScript, getAccountAttributeFromMapName, getAccountAttributes, getAccountIterator, getAccountIterator, getAccountIteratorScript, getActionResult, getActionScript, getCapture, getCreateObjectResult, getCreateObjectScript, getDeleteObjectResult, getDeleteObjectScript, getGetObjectResult, getGetObjectScript, getListAllObjectsResult, getListAllObjectsScript, getListObjectsResult, getListObjectsScript, getObject, getRenameObjectResult, getRenameObjectScript, getResourceAccounts, getScanningResult, getScanningScript, getTestConfigurationResult, getTestConfigurationScript, getUpdateObjectResult, getUpdateObjectScript, getUpdateUserResult, getUpdateUserScript, getUser, getWaitFor, getWaitForIgnoreCase, listAllObjects, listObjects, lookupAndRunAction, realCreate, realDelete, realDisable, realEnable, realUpdate, renameObject, reverseMapAttr, reverseMapAttr, reverseMapMultiAttr, run, runAction, runAction, runAfterAction, runBeforeAction, scan, stopConnection, testConfiguration, updateObject, updateResourceAccount, wellFormedUserAttributeName
 
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, 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, 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

RA_CONN_TYPE

public static final java.lang.String RA_CONN_TYPE
Resource attribute name of the scripted connection type variable.

See Also:
Constant Field Values

RA_HOST

public static final java.lang.String RA_HOST
Resource attribute 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
Resource attribute name of the variable holding the port on which to communicate to the resource.

See Also:
Constant Field Values

RA_TACL_PROMPT

public static final java.lang.String RA_TACL_PROMPT
Resource attribute name of the shell prompt character.

See Also:
Constant Field Values

RA_ADMIN_USER

public static final java.lang.String RA_ADMIN_USER
Resource attribute name of the account name used to connect to the resource.

See Also:
Constant Field Values

RA_ADMIN_PASSWORD

public static final java.lang.String RA_ADMIN_PASSWORD
Resource attribute name of the admin user's password variable.

See Also:
Constant Field Values

RA_CREATE_DIR

public static final java.lang.String RA_CREATE_DIR
Resource attribute name of the variable asking whether to make a users home directory when creating a user.

See Also:
Constant Field Values

RESOURCE_NAME

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

ACCOUNT_ID_NAME

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

ACCOUNT_ID_MAPNAME

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

USER_ID_NAME

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

USER_ID_MAPNAME

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

GROUP_ID_NAME

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

GROUP_ID_MAPNAME

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

OWNER_GROUP_NUM_NAME

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

OWNER_GROUP_NUM_MAPNAME

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

OWNER_USER_NUM_NAME

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

OWNER_USER_NUM_MAPNAME

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

ADMIN_GROUP_NAME

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

ADMIN_GROUP_MAPNAME

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

USER_MAPNAME

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

USER_NAME

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

NSKResourceAdapter

public NSKResourceAdapter()
No argument constructor.


NSKResourceAdapter

public NSKResourceAdapter(Resource res,
                          ObjectCache cache)
Constructor.

Method Detail

staticCreatePrototypeResource

public static Resource staticCreatePrototypeResource()
                                              throws WavesetException
Creates a resource based on the prototype xml.

Throws:
WavesetException

createPrototypeResource

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

getLoginUserAttrName

public java.lang.String getLoginUserAttrName()

getLoginPasswordAttrName

public java.lang.String getLoginPasswordAttrName()

constructUserAttributeParameter

protected java.lang.String constructUserAttributeParameter(java.lang.String key,
                                                           java.lang.String value)
Builds up a single user attribute value suitable for shell commands.

Specified by:
constructUserAttributeParameter in class GenericScriptResourceAdapter
Parameters:
key - - the account attribute name (not the map name)
value - - attribute value
Returns:
the string for the command line

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).

Overrides:
constructUserAttributeParameters in class GenericScriptResourceAdapter

getAccountIteratorResult

protected AccountIterator getAccountIteratorResult(CaptureList captureList)
Generates an account iterator from the capture list that was built from running the getAccountIteratorScript generated script through the ScriptedConnection.

Specified by:
getAccountIteratorResult in class GenericScriptResourceAdapter

getAccountIteratorScript

protected 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.

Specified by:
getAccountIteratorScript in class GenericScriptResourceAdapter

getAuthenticateResult

protected 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.

Specified by:
getAuthenticateResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getAuthenticateScript

protected 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.

Specified by:
getAuthenticateScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getCheckCreateAccountResult

protected 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.

Specified by:
getCheckCreateAccountResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getCheckCreateAccountScript

protected 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.

Specified by:
getCheckCreateAccountScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getCheckDeleteAccountResult

protected 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.

Specified by:
getCheckDeleteAccountResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getCheckDeleteAccountScript

protected 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.

Specified by:
getCheckDeleteAccountScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getCheckUpdateAccountResult

protected WavesetResult getCheckUpdateAccountResult(CaptureList captureList)
                                             throws WavesetException
Validates the capture list returned from the update create account script execution. Returns a result if update account is likely to succeed, otherwise throws. The executing script may also throw if check fails.

Specified by:
getCheckUpdateAccountResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getCheckUpdateAccountScript

protected 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.

Specified by:
getCheckUpdateAccountScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getConnectionType

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

Specified by:
getConnectionType in class GenericScriptResourceAdapter
Throws:
WavesetException

getCreateUserResult

protected 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.

Specified by:
getCreateUserResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getCreateUserScript

protected 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.

Specified by:
getCreateUserScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getDeleteUserResult

protected 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.

Specified by:
getDeleteUserResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getDeleteUserScript

protected 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.

Specified by:
getDeleteUserScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getDisableUserResult

protected boolean getDisableUserResult(CaptureList captureList)
                                throws WavesetException
Analyzes the capture list generated by executing the disable user script on the scripted connection. Throws if the capture list indicates failure. The executing script throws on failure.

Specified by:
getDisableUserResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getDisableUserScript

protected 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.

Specified by:
getDisableUserScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getEnableUserResult

protected boolean getEnableUserResult(CaptureList captureList)
                               throws WavesetException
Analyzes the capture list generated by executing the enable user script on the scripted connection. Throws if the capture list indicates failure. The executing script throws on failure.

Specified by:
getEnableUserResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getEnableUserScript

protected 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.

Specified by:
getEnableUserScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getLoginScript

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

Specified by:
getLoginScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getLogoutScript

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

Specified by:
getLogoutScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getScriptedConnection

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

Specified by:
getScriptedConnection in class GenericScriptResourceAdapter
Throws:
WavesetException

getTestConnectionResult

protected WavesetResult getTestConnectionResult(CaptureList captureList)
                                         throws WavesetException
Evaluates capture list from execution of generic test connection script.

Throws:
WavesetException

getTestConnectionScript

protected Script getTestConnectionScript()
                                  throws WavesetException
Creates a script to test the connection, does NOT login or logout.

Throws:
WavesetException

getUpdateUserResult

protected 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.

Specified by:
getUpdateUserResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getUpdateUserScript

protected Script getUpdateUserScript(WSUser user,
                                     java.lang.String password)
                              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. If the userID is passed in, the update will fail if the Id is in use by another user, but will succeed if the userId is the same or is a new value. Changing the user's ID will not change the files owned by that user. If you make changes here, check to see if the changes should be applied to implementations in subclasses (eg HPUXResourceAdapter)

Specified by:
getUpdateUserScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getUserResult

protected 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.

Specified by:
getUserResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getUserScript

protected 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.

Specified by:
getUserScript in class GenericScriptResourceAdapter
Throws:
WavesetException

isAllowableUserAttribute

protected boolean isAllowableUserAttribute(java.lang.String name)
Reports whether a given attribute name is legal on the resource. Also, checks if the operation is a create, update or delete

Specified by:
isAllowableUserAttribute in class GenericScriptResourceAdapter

startConnection

protected void startConnection()
                        throws WavesetException
Starts a scripted connection up and logs into it.

Overrides:
startConnection in class GenericScriptResourceAdapter
Throws:
WavesetException

supportsAccountDisable

public boolean supportsAccountDisable()
Whether we support account enable and disable through the resource.

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

getFeatures

public GenericObject getFeatures()
Doesn't support listAllObjects of accounts. Remove from feature map.

Specified by:
getFeatures in interface ResourceAdapter
Overrides:
getFeatures in class GenericScriptResourceAdapter