|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.adapter.ResourceAdapterBase
com.waveset.adapter.GenericScriptResourceAdapter
com.waveset.adapter.VMSResourceAdapter
Resource adapter supporting VMS 7.2 (and possibly other versions) by using shell script commands through a scripted telnet connection.
Nested Class Summary | |
protected class |
VMSResourceAdapter.AcctIter
AccountIterator implementation that can be built by construction from the output of "lsuser ALL". |
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 |
LOGIN_PASSWORD
|
static java.lang.String |
LOGIN_USER
|
protected java.lang.String |
loginPass
|
protected ScriptToken.WaitFor |
loginPromptErrorWaitToken
|
protected ScriptToken.WaitFor |
loginPromptWaitToken
|
protected java.lang.String |
loginShellPrompt
|
protected java.lang.String |
loginUser
|
static java.lang.String |
RA_CONN_TYPE
|
static java.lang.String |
RA_HOST
|
static java.lang.String |
RA_LISTUSER_ATTR_PARSE
|
static java.lang.String |
RA_LOGIN_PASSWORD
|
static java.lang.String |
RA_LOGIN_SHELL_PROMPT
|
static java.lang.String |
RA_LOGIN_USER
|
static java.lang.String |
RA_PORT
|
static java.lang.String |
RESOURCE_NAME
|
static java.lang.String |
RESOURCE_USER_FORM
|
protected ScriptToken.WaitFor |
UAFContinuationPromptErrorWaitToken
|
protected ScriptToken.WaitFor |
UAFPromptErrorWaitToken
|
protected ScriptToken.WaitFor |
UAFPromptWaitToken
|
Fields inherited from class com.waveset.adapter.GenericScriptResourceAdapter |
conn, RA_BLOCK_FETCH_TIMEOUT, RA_CONN_MAX, RA_CONN_TIMEOUT, 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 |
Constructor Summary | |
VMSResourceAdapter()
No argument constructor. |
|
VMSResourceAdapter(Resource res,
ObjectCache cache)
Constructor |
Method Summary | |
void |
addCopyLoginScriptToScript(Script script,
WSUser user,
boolean isUpdate)
Add login script copy to the script. |
void |
addCreateDirToScript(Script script,
WSUser user,
boolean isUpdate)
Add directory creation to the script. |
protected java.lang.String |
addUIC(WSUser user,
java.lang.String userAttrParms)
|
protected WSUser |
buildUser(java.lang.String userStr,
WSUser targetUser)
Build a WSUser from the output of the VMS "show user" 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() |
void |
deleteDirectory(java.lang.String device,
java.lang.String directory)
Deletes a directory on the given device and directory. |
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 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)
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()
Expose features supported by the Resource Adapter. |
protected java.util.ArrayList |
getListAllObjectsResult(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 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 java.lang.String |
getUIC(WSUser user)
|
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 update 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 void |
init()
Initialize the resource fields. |
protected boolean |
isAllowableUserAttribute(java.lang.String name)
Reports whether a given attribute name is legal on the resource. |
static void |
main(java.lang.String[] args)
|
java.lang.Object |
nextUICMember(java.util.Map args)
Returns the next member number for the given UIC group. |
protected java.lang.String |
removeInitialSpace(java.lang.String s)
Utility method returns a string with initial spaces stripped. |
protected void |
setFromResource()
|
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 the resource can enable and disable accounts. |
protected void |
VMSReverseMap(WSUser user,
java.util.Map map)
|
protected void |
VMSReverseMapAttr(WSUser user,
java.lang.String attr,
java.lang.Object value)
Map from a VMS resource tag to a waveset attribute and add them to the user. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
public static final java.lang.String RA_LOGIN_PASSWORD
public static final java.lang.String RA_LOGIN_SHELL_PROMPT
public static final java.lang.String RA_LOGIN_USER
public static final java.lang.String RA_PORT
public static final java.lang.String RA_CONN_TYPE
public static final java.lang.String RA_HOST
public static final java.lang.String RA_LISTUSER_ATTR_PARSE
public static final java.lang.String LOGIN_USER
public static final java.lang.String LOGIN_PASSWORD
public static final java.lang.String DISPLAY_USER
public static final java.lang.String DISPLAY_PASSWORD
public static final java.lang.String RESOURCE_NAME
public static final java.lang.String RESOURCE_USER_FORM
protected java.lang.String loginUser
protected java.lang.String loginPass
protected java.lang.String loginShellPrompt
protected ScriptToken.WaitFor loginPromptWaitToken
protected ScriptToken.WaitFor loginPromptErrorWaitToken
protected ScriptToken.WaitFor UAFPromptWaitToken
protected ScriptToken.WaitFor UAFPromptErrorWaitToken
protected ScriptToken.WaitFor UAFContinuationPromptErrorWaitToken
Constructor Detail |
public VMSResourceAdapter() throws WavesetException
public VMSResourceAdapter(Resource res, ObjectCache cache) throws WavesetException
Method Detail |
public static Resource staticCreatePrototypeResource() throws WavesetException
WavesetException
protected void setFromResource()
setFromResource
in class ResourceAdapterBase
protected void init() throws WavesetException
WavesetException
protected java.lang.String constructUserAttributeParameter(java.lang.String key, java.lang.String value)
constructUserAttributeParameter
in class GenericScriptResourceAdapter
public Resource createPrototypeResource() throws WavesetException
createPrototypeResource
in interface ResourceAdapter
createPrototypeResource
in class ResourceAdapterBase
WavesetException
protected AccountIterator getAccountIteratorResult(CaptureList captureList)
getAccountIteratorResult
in class GenericScriptResourceAdapter
protected Script getAccountIteratorScript()
getAccountIteratorScript
in class GenericScriptResourceAdapter
protected java.util.ArrayList getListAllObjectsResult(CaptureList captureList) throws WavesetException
WavesetException
protected Script getListAllObjectsScript(java.lang.String resObjType, java.util.Map options, java.lang.String runAsUser, EncryptedData runAsPassword) throws WavesetException
getListAllObjectsScript
in class GenericScriptResourceAdapter
WavesetException
protected WavesetResult getAuthenticateResult(java.util.HashMap loginInfo, CaptureList captureList) throws WavesetException
getAuthenticateResult
in class GenericScriptResourceAdapter
WavesetException
protected Script getAuthenticateScript(java.util.HashMap loginInfo) throws WavesetException
getAuthenticateScript
in class GenericScriptResourceAdapter
WavesetException
protected WavesetResult getCheckCreateAccountResult(CaptureList captureList) throws WavesetException
getCheckCreateAccountResult
in class GenericScriptResourceAdapter
WavesetException
protected Script getCheckCreateAccountScript() throws WavesetException
getCheckCreateAccountScript
in class GenericScriptResourceAdapter
WavesetException
protected WavesetResult getCheckDeleteAccountResult(CaptureList captureList) throws WavesetException
getCheckDeleteAccountResult
in class GenericScriptResourceAdapter
WavesetException
protected Script getCheckDeleteAccountScript() throws WavesetException
getCheckDeleteAccountScript
in class GenericScriptResourceAdapter
WavesetException
protected WavesetResult getCheckUpdateAccountResult(CaptureList captureList) throws WavesetException
getCheckUpdateAccountResult
in class GenericScriptResourceAdapter
WavesetException
protected Script getCheckUpdateAccountScript() throws WavesetException
getCheckUpdateAccountScript
in class GenericScriptResourceAdapter
WavesetException
protected java.lang.String getConnectionType() throws WavesetException
getConnectionType
in class GenericScriptResourceAdapter
WavesetException
protected void getCreateUserResult(CaptureList captureList, WavesetResult result) throws WavesetException
getCreateUserResult
in class GenericScriptResourceAdapter
WavesetException
protected Script getCreateUserScript(WSUser user) throws WavesetException
getCreateUserScript
in class GenericScriptResourceAdapter
WavesetException
protected void getDeleteUserResult(CaptureList captureList) throws WavesetException
getDeleteUserResult
in class GenericScriptResourceAdapter
WavesetException
protected Script getDeleteUserScript(WSUser user) throws WavesetException
getDeleteUserScript
in class GenericScriptResourceAdapter
WavesetException
protected boolean getDisableUserResult(CaptureList captureList) throws WavesetException
getDisableUserResult
in class GenericScriptResourceAdapter
WavesetException
protected Script getDisableUserScript(WSUser user, java.lang.String password) throws WavesetException
getDisableUserScript
in class GenericScriptResourceAdapter
WavesetException
protected boolean getEnableUserResult(CaptureList captureList) throws WavesetException
getEnableUserResult
in class GenericScriptResourceAdapter
WavesetException
protected Script getEnableUserScript(WSUser user, java.lang.String password) throws WavesetException
getEnableUserScript
in class GenericScriptResourceAdapter
WavesetException
protected Script getLoginScript() throws WavesetException
getLoginScript
in class GenericScriptResourceAdapter
WavesetException
protected Script getLogoutScript() throws WavesetException
getLogoutScript
in class GenericScriptResourceAdapter
WavesetException
protected ScriptedConnection getScriptedConnection() throws WavesetException
getScriptedConnection
in class GenericScriptResourceAdapter
WavesetException
protected WavesetResult getTestConnectionResult(CaptureList captureList) throws WavesetException
WavesetException
protected Script getTestConnectionScript() throws WavesetException
WavesetException
protected java.lang.String getUIC(WSUser user)
protected void getUpdateUserResult(WSUser user, CaptureList captureList, WavesetResult result) throws WavesetException
getUpdateUserResult
in class GenericScriptResourceAdapter
WavesetException
protected java.lang.String addUIC(WSUser user, java.lang.String userAttrParms)
public void addCreateDirToScript(Script script, WSUser user, boolean isUpdate) throws WavesetException
WavesetException
public void addCopyLoginScriptToScript(Script script, WSUser user, boolean isUpdate) throws WavesetException
WavesetException
protected Script getUpdateUserScript(WSUser user, java.lang.String password) throws WavesetException
getUpdateUserScript
in class GenericScriptResourceAdapter
WavesetException
protected WSUser getUserResult(CaptureList captureList, WSUser targetUser) throws WavesetException
getUserResult
in class GenericScriptResourceAdapter
WavesetException
protected Script getUserScript(WSUser user) throws WavesetException
getUserScript
in class GenericScriptResourceAdapter
WavesetException
protected java.lang.String removeInitialSpace(java.lang.String s)
protected boolean isAllowableUserAttribute(java.lang.String name)
isAllowableUserAttribute
in class GenericScriptResourceAdapter
protected void startConnection() throws WavesetException
startConnection
in class GenericScriptResourceAdapter
WavesetException
public boolean supportsAccountDisable()
supportsAccountDisable
in interface ResourceAdapter
supportsAccountDisable
in class ResourceAdapterBase
protected void VMSReverseMap(WSUser user, java.util.Map map) throws WavesetException
WavesetException
protected void VMSReverseMapAttr(WSUser user, java.lang.String attr, java.lang.Object value)
protected WSUser buildUser(java.lang.String userStr, WSUser targetUser) throws WavesetException
WavesetException
public void deleteDirectory(java.lang.String device, java.lang.String directory) throws WavesetException
WavesetException
public java.lang.Object nextUICMember(java.util.Map args) throws WavesetException
WavesetException
public GenericObject getFeatures()
ResourceAdapterBase
getFeatures
in interface ResourceAdapter
getFeatures
in class GenericScriptResourceAdapter
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |