|
||||||||||
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.HostAccessResourceAdapter
com.waveset.adapter.ScriptedHostResourceAdapter
The ScriptedHostResourceAdapter is an application-agnostic mainframe adapter. The real logic of how to provision the custom host application is delegated to Rhino Javascripts provided by the customer.
Nested Class Summary | |
static interface |
ScriptedHostResourceAdapter.ObjectIterator
|
static class |
ScriptedHostResourceAdapter.ScriptedAccountIterator
|
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 | |
protected HostAccess |
_hostAccess
Wrapper around IBM SecureWay Host Access Class Library to provide 3270 emulation access to a mainframe |
protected java.util.Properties |
_properties
Properties to set for the 3270 emulation, primarily used to enable tracing |
static java.lang.String |
code_id
|
static java.lang.String |
DIRECT_MAP_MODE
Possible values for RA_ATTR_MAP_MODE |
static java.lang.String |
RA_ACCT_ITER_ACTION
|
static java.lang.String |
RA_AFFINITY_LIST
The account name used to connect to the resource. |
static java.lang.String |
RA_ATTR_MAP_MODE
|
static java.lang.String |
RA_CREATE_USER_ACTION
|
static java.lang.String |
RA_DELETE_USER_ACTION
|
static java.lang.String |
RA_DISABLE_USER_ACTION
|
static java.lang.String |
RA_ENABLE_USER_ACTION
|
static java.lang.String |
RA_GET_USER_ACTION
The list of resource attributes which will hold the name of a ResourceAction to accomplish the respective provisioning method. |
static java.lang.String |
RA_HOST
|
static java.lang.String |
RA_IDLETIMEOUT
|
static java.lang.String |
RA_LIST_TIMEOUT
|
static java.lang.String |
RA_LISTALL_ACTION
|
static java.lang.String |
RA_MAX_CONNECTIONS
Maximum connections which can be maintained simultaneously for each user in the User Affinity list |
static java.lang.String |
RA_PORT
The port on which to communicate to the resource. |
static java.lang.String |
RA_PROPS
Additional 3270 session properties |
static java.lang.String |
RA_SUPPORTS_PASSWORDS
A boolean ("true" or "false") used to toggle the PASSWORD feature |
static java.lang.String |
RA_TIMEOUT
|
static java.lang.String |
RA_UPDATE_USER_ACTION
|
static java.lang.String |
RA_UPPERCASE_IDENTITY
If true, always convert the identity to uppercase |
static java.lang.String |
STRING_MAP_MODE
|
Fields inherited from class com.waveset.adapter.HostAccessResourceAdapter |
HOST_ACCESS_GLOBAL_NAME, JAVASCRIPT_GLOBALS_ACTION_PROPERTY, USER_ATTRS_GLOBAL_NAME, USER_IDENTITY_GLOBAL_NAME |
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 | |
ScriptedHostResourceAdapter()
|
|
ScriptedHostResourceAdapter(Resource res,
ObjectCache cache)
|
Method Summary | |
protected java.lang.String |
addEol(java.lang.String s,
java.lang.String eol,
int width)
Add a specified EOL character to lines. |
WavesetResult |
authenticate(java.util.HashMap loginInfo)
Authenticates the user against the resource. |
static java.lang.Exception |
buildJavascriptException(java.lang.Throwable throwable)
|
WavesetResult |
checkCreateAccount(WSUser user)
|
WavesetResult |
checkDeleteAccount(WSUser user)
|
WavesetResult |
checkUpdateAccount(WSUser user)
|
java.lang.String |
createIdentity(WSUser user)
Override createIdentity() to uppercase the identity if RA_UPPERCASE_IDENTITY is true. |
Resource |
createPrototypeResource()
|
protected boolean |
errorReported(java.lang.String resp,
java.lang.String[] errorMessages)
|
static void |
formatError(WavesetResult result,
java.lang.Throwable throwable)
|
WSAttributes |
getAccountAttributes(java.lang.String accountIdentity)
This method is obsolete. |
AccountIterator |
getAccountIterator()
|
java.util.List |
getAffinityList()
|
AttrParse |
getAttrParseObject(java.lang.String attrParseName)
|
GenericObject |
getFeatures()
Expose features supported by the Resource Adapter. |
java.lang.String |
getHost()
|
protected HostAccess |
getHostAccess()
|
int |
getIdleTimeout()
|
java.lang.String |
getKey()
|
int |
getListTimeout()
|
int |
getMaxConnections()
|
java.lang.String |
getPort()
|
java.util.Properties |
getProperties()
|
int |
getRequestTimeout()
|
java.lang.String |
getUser()
|
WSUser |
getUser(WSUser user)
Retrieve information about an account, and package it as a WSUser object. |
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. |
void |
login(HostAccess hostAccess)
|
void |
login(HostAccess hostAccess,
ServerAffinity affinity)
|
void |
logoff(HostAccess hostAccess)
|
static void |
main(java.lang.String[] argv)
|
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 |
realCreateOrUpdate(WSUser user,
WavesetResult result,
java.lang.String operation)
This method is called by realCreate and realUpdate |
protected void |
realDelete(WSUser user,
WavesetResult result)
Needs to be overridden by subclass if default deleteAccounts() implementation is used. |
void |
realDisable(WSUser user,
WavesetResult result)
|
void |
realEnable(WSUser user,
WavesetResult result)
|
protected WSUser |
realGetUser(WSUser user)
|
protected void |
realUpdate(WSUser user,
WavesetResult result)
Needs to be overridden by subclass if default updateAccounts() implementation is used. |
protected WSAttributes |
reverseMap(java.util.Map map)
Convert the host attribute map into WSAttributes |
protected void |
startConnection()
Needs to be overridden by subclass if default createAccounts() implementation is used. |
static Resource |
staticCreatePrototypeResource()
|
protected void |
stopConnection()
Needs to be overridden by subclass if default createAccounts() implementation is used. |
boolean |
supportsAccountDisable()
Indicates whether or not this resource supports account disable. |
boolean |
supportsExcludedAccounts()
|
WavesetResult |
testConfiguration()
Default implementation of test method, calls check create. |
Methods inherited from class com.waveset.adapter.HostAccessResourceAdapter |
filterAndParseData, formatOutputStr, getResourceId, lookupAndRunJavascriptAction, parseDataFromFile, readDataFile, run, runAfterJavascriptAction, runBeforeJavascriptAction, runJavascript, runJavascriptAction, runResourceAttributeJavascriptAction, supportsActions, verifyUsers |
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
protected HostAccess _hostAccess
protected java.util.Properties _properties
public static final java.lang.String RA_HOST
public static final java.lang.String RA_PORT
public static final java.lang.String RA_AFFINITY_LIST
public static final java.lang.String RA_TIMEOUT
public static final java.lang.String RA_IDLETIMEOUT
public static final java.lang.String RA_LIST_TIMEOUT
public static final java.lang.String RA_MAX_CONNECTIONS
public static final java.lang.String RA_PROPS
public static final java.lang.String RA_UPPERCASE_IDENTITY
public static final java.lang.String RA_ATTR_MAP_MODE
public static final java.lang.String DIRECT_MAP_MODE
public static final java.lang.String STRING_MAP_MODE
public static final java.lang.String RA_SUPPORTS_PASSWORDS
public static final java.lang.String RA_GET_USER_ACTION
public static final java.lang.String RA_CREATE_USER_ACTION
public static final java.lang.String RA_UPDATE_USER_ACTION
public static final java.lang.String RA_DELETE_USER_ACTION
public static final java.lang.String RA_DISABLE_USER_ACTION
public static final java.lang.String RA_ENABLE_USER_ACTION
public static final java.lang.String RA_LISTALL_ACTION
public static final java.lang.String RA_ACCT_ITER_ACTION
Constructor Detail |
public ScriptedHostResourceAdapter(Resource res, ObjectCache cache) throws WavesetException
public ScriptedHostResourceAdapter() throws WavesetException
Method Detail |
public static Resource staticCreatePrototypeResource() throws WavesetException
WavesetException
public Resource createPrototypeResource() throws WavesetException
createPrototypeResource
in interface ResourceAdapter
createPrototypeResource
in class ResourceAdapterBase
WavesetException
public java.lang.String createIdentity(WSUser user) throws WavesetException
createIdentity
in interface ResourceAdapter
createIdentity
in class ResourceAdapterBase
WavesetException
public WSUser getUser(WSUser user) throws WavesetException
Information required to identify the resource account is supplied in another WSUser object.
The returned user object will resemble the source object, but will have its account attribute list filled in.
getUser
in interface ResourceAdapter
getUser
in class ResourceAdapterBase
WavesetException
public AccountIterator getAccountIterator() throws WavesetException
getAccountIterator
in interface ResourceAdapter
getAccountIterator
in class ResourceAdapterBase
WavesetException
protected void realCreate(WSUser user, WavesetResult result) throws WavesetException
realCreate
in class ResourceAdapterBase
WavesetException
protected void realDelete(WSUser user, WavesetResult result) throws WavesetException
ResourceAdapterBase
realDelete
in class ResourceAdapterBase
WavesetException
public void realDisable(WSUser user, WavesetResult result) throws WavesetException
realDisable
in class ResourceAdapterBase
WavesetException
public void realEnable(WSUser user, WavesetResult result) throws WavesetException
realEnable
in class ResourceAdapterBase
WavesetException
protected void realUpdate(WSUser user, WavesetResult result) throws WavesetException
ResourceAdapterBase
realUpdate
in class ResourceAdapterBase
WavesetException
protected WSUser realGetUser(WSUser user) throws WavesetException
WavesetException
protected void realCreateOrUpdate(WSUser user, WavesetResult result, java.lang.String operation) throws WavesetException
WavesetException
protected WSAttributes reverseMap(java.util.Map map) throws WavesetException
map
- Map of host field names and values
WavesetException
public static void formatError(WavesetResult result, java.lang.Throwable throwable)
public static java.lang.Exception buildJavascriptException(java.lang.Throwable throwable)
protected boolean errorReported(java.lang.String resp, java.lang.String[] errorMessages)
public WavesetResult checkCreateAccount(WSUser user) throws WavesetException
checkCreateAccount
in interface ResourceAdapter
checkCreateAccount
in class ResourceAdapterBase
WavesetException
public WavesetResult checkUpdateAccount(WSUser user) throws WavesetException
checkUpdateAccount
in interface ResourceAdapter
checkUpdateAccount
in class ResourceAdapterBase
WavesetException
public WavesetResult checkDeleteAccount(WSUser user) throws WavesetException
checkDeleteAccount
in interface ResourceAdapter
checkDeleteAccount
in class ResourceAdapterBase
WavesetException
public WSAttributes getAccountAttributes(java.lang.String accountIdentity) throws WavesetException
ResourceAdapter
getAccountAttributes
in interface ResourceAdapter
getAccountAttributes
in class ResourceAdapterBase
WavesetException
public WavesetResult authenticate(java.util.HashMap loginInfo) throws WavesetException
ResourceAdapter
authenticate
in interface ResourceAdapter
authenticate
in class ResourceAdapterBase
WavesetException
protected void startConnection() throws WavesetException
ResourceAdapterBase
startConnection
in class ResourceAdapterBase
WavesetException
protected void stopConnection() throws WavesetException
ResourceAdapterBase
stopConnection
in class ResourceAdapterBase
WavesetException
public GenericObject getFeatures()
getFeatures
in interface ResourceAdapter
getFeatures
in class ResourceAdapterBase
ResourceAdapter.Features
protected java.lang.String addEol(java.lang.String s, java.lang.String eol, int width)
s
- input stringeol
- end-of-line separator used to wrap lineswidth
- maximum length before wrapping
public boolean supportsAccountDisable()
ResourceAdapter
supportsAccountDisable
in interface ResourceAdapter
supportsAccountDisable
in class ResourceAdapterBase
public java.util.ArrayList listAllObjects(java.lang.String resourceObjectType, java.util.Map options, java.lang.String runAsUser, EncryptedData runAsPassword) throws WavesetException
ResourceAdapter
listAllObjects
in interface ResourceAdapter
listAllObjects
in class ResourceAdapterBase
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 optionsrunAsUser
- - (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.
WavesetException
public boolean supportsExcludedAccounts()
supportsExcludedAccounts
in interface ResourceAdapter
supportsExcludedAccounts
in class ResourceAdapterBase
public WavesetResult testConfiguration() throws WavesetException
ResourceAdapterBase
testConfiguration
in interface ResourceAdapter
testConfiguration
in class ResourceAdapterBase
WavesetException
public AttrParse getAttrParseObject(java.lang.String attrParseName) throws WavesetException
WavesetException
public void login(HostAccess hostAccess) throws java.lang.Exception
login
in interface HostAccessLogin
java.lang.Exception
public void login(HostAccess hostAccess, ServerAffinity affinity) throws java.lang.Exception
login
in interface HostAccessLogin
java.lang.Exception
public void logoff(HostAccess hostAccess) throws java.lang.Exception
logoff
in interface HostAccessLogin
java.lang.Exception
public java.lang.String getHost() throws java.lang.Exception
getHost
in interface HostAccessLogin
java.lang.Exception
public java.lang.String getPort() throws java.lang.Exception
getPort
in interface HostAccessLogin
java.lang.Exception
public java.lang.String getUser() throws java.lang.Exception
getUser
in interface HostAccessLogin
java.lang.Exception
public java.util.List getAffinityList() throws java.lang.Exception
getAffinityList
in interface HostAccessLogin
java.lang.Exception
public java.lang.String getKey() throws java.lang.Exception
getKey
in interface HostAccessLogin
java.lang.Exception
public int getRequestTimeout() throws java.lang.Exception
getRequestTimeout
in interface HostAccessLogin
java.lang.Exception
public int getIdleTimeout() throws java.lang.Exception
getIdleTimeout
in interface HostAccessLogin
java.lang.Exception
public int getListTimeout() throws java.lang.Exception
java.lang.Exception
public java.util.Properties getProperties()
getProperties
in interface HostAccessLogin
public int getMaxConnections()
getMaxConnections
in interface HostAccessLogin
protected HostAccess getHostAccess()
getHostAccess
in class HostAccessResourceAdapter
public static void main(java.lang.String[] argv) throws java.lang.Throwable
java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |