com.waveset.adapter
Class GCOSResourceAdapter

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

public class GCOSResourceAdapter
extends GenericScriptResourceAdapter

Title: Description: Copyright: Copyright (c) 2000 Company:

Version:
1.0

Nested Class Summary
protected  class GCOSResourceAdapter.AcctIter
          AccountIterator implementation that can be built by construction from the output of mast smc
 
Nested classes inherited from class com.waveset.adapter.ResourceAdapterBase
ResourceAdapterBase.SimpleAccountIterator
 
Nested classes inherited from class com.waveset.adapter.ResourceAdapter
ResourceAdapter.ActionResult, ResourceAdapter.Features, ResourceAdapter.ObjectType
 
Field Summary
static java.lang.String code_id
           
static java.lang.String DISPLAY_PASSWORD
           
static java.lang.String DISPLAY_USER
           
static java.lang.String GCOS_ATTR_CARDIN
           
static java.lang.String GCOS_ATTR_LLINKS
           
static java.lang.String GCOS_ATTR_LLINKS_USED
           
static java.lang.String GCOS_ATTR_LODS
           
static java.lang.String GCOS_ATTR_LODX
           
static java.lang.String GCOS_ATTR_RESOURCES
           
static java.lang.String GCOS_ATTR_RESOURCES_USED
           
static java.lang.String GCOS_ATTR_TALK
           
static java.lang.String LOGIN_PASSWORD
           
static java.lang.String LOGIN_USER
           
static java.lang.String RA_CONN_TYPE
           
static java.lang.String RA_CREATE_BATCH_COMMANDS
           
static java.lang.String RA_FIRST_PASSWORD
           
static java.lang.String RA_HOST
           
static java.lang.String RA_LOGIN_SHELL_PROMPT
           
static java.lang.String RA_LOGIN_USER
           
static java.lang.String RA_MAST_PASSWORD
           
static java.lang.String RA_PASSWORD_PROMPT
           
static java.lang.String RA_PORT
           
static java.lang.String RA_SECOND_PASSWORD
           
static java.lang.String RA_SYSTEM_NAME
           
static java.lang.String RA_TRACE
           
static java.lang.String RA_TSS_COMMAND
           
static java.lang.String RA_VOLSET
           
static java.lang.String RESOURCE_LOGIN_MODULE
           
static java.lang.String RESOURCE_NAME
           
static java.lang.String RESOURCE_USER_FORM
           
 
Fields inherited from class com.waveset.adapter.GenericScriptResourceAdapter
conn, RA_BLOCK_FETCH_TIMEOUT, RA_CONN_MAX, RA_CONN_TIMEOUT, RA_LOGIN_PASSWORD, 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
GCOSResourceAdapter()
           
GCOSResourceAdapter(Resource res, ObjectCache cache)
          Constructor
 
Method Summary
protected  void addAttribute(WSUser user, java.lang.String attrName, java.lang.Object attrValue)
           
protected  void buildPriority(java.lang.String priStr, WSUser user)
          Give a priority string (see buildUser comment), add the CARDIN(maximum urgency of 10), LODS, LODX, TALK attributes if they are in the schema map.
protected  WSUser buildUser(java.lang.String userStr, WSUser targetUser)
          Build a WSUser from the output of the "smc uid" command.
protected  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.
 Resource createPrototypeResource()
          Non-static version of staticCreatePrototypeResource()
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  java.lang.String getCardinMax(java.lang.String cardin)
          Parse out the cardin string returning an appropriate string for stuffing in a resource attribute.
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 delete create 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 check update 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)
          The capture list has three entries: - output from the immediate JRN command (abnornal or normal termination) - list output from JOUT (pretty useless) - details output from eprint 12 which seems to always be any errors
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.
protected  Script getLoginScript()
          Returns a script that will log the administrative user into the system and set up the shell if necessary.
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)
          The user gets updated in two phases - the first is the systems access rights (LODX, LODS, CARDIN, TALK), called the "priority" in GCOS land.
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)
          Tests whether a given attribute name is legal on the resource.
static void main(java.lang.String[] args)
           
protected  void startConnection()
          Starts a scripted connection up and logs into it.
static Resource staticCreatePrototypeResource()
          Creates a resource based on the prototype xml.
 
Methods inherited from class com.waveset.adapter.GenericScriptResourceAdapter
authenticate, checkCreateAccount, checkDeleteAccount, checkUpdateAccount, constructUserAttributeParameters, 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, 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

RA_CONN_TYPE

public static final java.lang.String RA_CONN_TYPE
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_LOGIN_USER

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

RA_FIRST_PASSWORD

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

RA_SECOND_PASSWORD

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

RA_MAST_PASSWORD

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

RA_PASSWORD_PROMPT

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

RA_TSS_COMMAND

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

RA_SYSTEM_NAME

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

RA_VOLSET

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

GCOS_ATTR_LODX

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

GCOS_ATTR_LODS

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

GCOS_ATTR_CARDIN

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

GCOS_ATTR_TALK

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

GCOS_ATTR_LLINKS

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

GCOS_ATTR_LLINKS_USED

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

GCOS_ATTR_RESOURCES

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

GCOS_ATTR_RESOURCES_USED

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

RA_LOGIN_SHELL_PROMPT

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

RA_CREATE_BATCH_COMMANDS

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

RA_TRACE

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

LOGIN_USER

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

LOGIN_PASSWORD

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

DISPLAY_USER

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

DISPLAY_PASSWORD

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

RESOURCE_NAME

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

RESOURCE_USER_FORM

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

RESOURCE_LOGIN_MODULE

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

GCOSResourceAdapter

public GCOSResourceAdapter()

GCOSResourceAdapter

public GCOSResourceAdapter(Resource res,
                           ObjectCache cache)
Constructor

Method Detail

createPrototypeResource

public Resource createPrototypeResource()
                                 throws WavesetException
Non-static version of staticCreatePrototypeResource()

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

staticCreatePrototypeResource

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

Throws:
WavesetException

getTestConnectionScript

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

Throws:
WavesetException

getTestConnectionResult

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

Throws:
WavesetException

getDeleteUserResult

protected void getDeleteUserResult(CaptureList captureList)
                            throws WavesetException
Description copied from class: GenericScriptResourceAdapter
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
Description copied from class: GenericScriptResourceAdapter
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

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. The capture list has three entries: - output from the immediate JRN command (abnornal or normal termination) - list output from JOUT (pretty useless) - details output from eprint 12 which seems to always be any errors If you change the capture list, you muct change the code in getCreateUserResult to deal with it.

Specified by:
getCreateUserScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getCreateUserResult

protected void getCreateUserResult(CaptureList captureList,
                                   WavesetResult result)
                            throws WavesetException
The capture list has three entries: - output from the immediate JRN command (abnornal or normal termination) - list output from JOUT (pretty useless) - details output from eprint 12 which seems to always be any errors

Specified by:
getCreateUserResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getAuthenticateResult

protected WavesetResult getAuthenticateResult(java.util.HashMap loginInfo,
                                              CaptureList captureList)
                                       throws WavesetException
Description copied from class: GenericScriptResourceAdapter
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

Specified by:
getAuthenticateResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getDisableUserScript

protected Script getDisableUserScript(WSUser user,
                                      java.lang.String password)
                               throws WavesetException
Description copied from class: GenericScriptResourceAdapter
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

getUpdateUserResult

protected void getUpdateUserResult(WSUser user,
                                   CaptureList captureList,
                                   WavesetResult result)
                            throws WavesetException
Description copied from class: GenericScriptResourceAdapter
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

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

getAuthenticateScript

protected Script getAuthenticateScript(java.util.HashMap loginInfo)
                                throws WavesetException
Description copied from class: GenericScriptResourceAdapter
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.

Specified by:
getAuthenticateScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getEnableUserResult

protected boolean getEnableUserResult(CaptureList captureList)
                               throws WavesetException
Description copied from class: GenericScriptResourceAdapter
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.

Specified by:
getEnableUserResult in class GenericScriptResourceAdapter
Throws:
WavesetException

constructUserAttributeParameter

protected java.lang.String constructUserAttributeParameter(java.lang.String key,
                                                           java.lang.String value)
Description copied from class: GenericScriptResourceAdapter
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.

Specified by:
constructUserAttributeParameter in class GenericScriptResourceAdapter

getUserScript

protected Script getUserScript(WSUser user)
                        throws WavesetException
Description copied from class: GenericScriptResourceAdapter
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

addAttribute

protected void addAttribute(WSUser user,
                            java.lang.String attrName,
                            java.lang.Object attrValue)

getCardinMax

protected java.lang.String getCardinMax(java.lang.String cardin)
Parse out the cardin string returning an appropriate string for stuffing in a resource attribute. Return "99" if no limit. This is parsing something like "C(14)" or just "C"


buildPriority

protected void buildPriority(java.lang.String priStr,
                             WSUser user)
Give a priority string (see buildUser comment), add the CARDIN(maximum urgency of 10), LODS, LODX, TALK attributes if they are in the schema map. Start by adding them with NO values, then update them if they are in the incoming priorities string.


buildUser

protected WSUser buildUser(java.lang.String userStr,
                           WSUser targetUser)
                    throws WavesetException
Build a WSUser from the output of the "smc uid" command. This should be a single line summary that looks like (without the header): user id priority password max # blocks resrcs resrcs blocks used used 77bob c(10) s x t &(1-!73ke]rf UNLMTD 0 99999. 0. FF 1 2 3 4 5 6 7 8 012345678901234567890123456789012345678901234567890123456789012345678901234567890 This user has CARDIN(maximum urgency of 10), LODS, LODX, TALK. The (10) is optional and appears rare. Bob has unlimited filespace (blocks), unlimited resources (resrcs in $), and has not been very active.

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

getLogoutScript

protected Script getLogoutScript()
                          throws WavesetException
Description copied from class: GenericScriptResourceAdapter
Returns a script that will log the administrative user out of the resource.

Specified by:
getLogoutScript in class GenericScriptResourceAdapter
Throws:
WavesetException

isAllowableUserAttribute

protected boolean isAllowableUserAttribute(java.lang.String name)
Description copied from class: GenericScriptResourceAdapter
Tests whether a given attribute name is legal on the resource.

Specified by:
isAllowableUserAttribute in class GenericScriptResourceAdapter

getAccountIteratorScript

protected Script getAccountIteratorScript()
Description copied from class: GenericScriptResourceAdapter
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.

Specified by:
getAccountIteratorScript in class GenericScriptResourceAdapter

getCheckDeleteAccountResult

protected WavesetResult getCheckDeleteAccountResult(CaptureList captureList)
                                             throws WavesetException
Validates the capture list returned from the delete create 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 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.

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

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

getAccountIteratorResult

protected AccountIterator getAccountIteratorResult(CaptureList captureList)
Description copied from class: GenericScriptResourceAdapter
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.

Specified by:
getAccountIteratorResult in class GenericScriptResourceAdapter

getUpdateUserScript

protected Script getUpdateUserScript(WSUser user,
                                     java.lang.String password)
                              throws WavesetException
The user gets updated in two phases - the first is the systems access rights (LODX, LODS, CARDIN, TALK), called the "priority" in GCOS land. The second is the rest of the attributes - password, resources, etc. Assumes that we are at the shell prompt and leaves us back there when done

Specified by:
getUpdateUserScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getDisableUserResult

protected boolean getDisableUserResult(CaptureList captureList)
                                throws WavesetException
Description copied from class: GenericScriptResourceAdapter
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.

Specified by:
getDisableUserResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getEnableUserScript

protected Script getEnableUserScript(WSUser user,
                                     java.lang.String password)
                              throws WavesetException
Description copied from class: GenericScriptResourceAdapter
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

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

getScriptedConnection

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

Specified by:
getScriptedConnection in class GenericScriptResourceAdapter
Throws:
WavesetException

startConnection

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

Overrides:
startConnection in class GenericScriptResourceAdapter
Throws:
WavesetException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception