|
||||||||||
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.NaturalResourceAdapter
Nested Class Summary |
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
|
protected static boolean |
_supportMultiValuedAttrs
|
static java.lang.String |
code_id
|
protected static java.lang.String |
COMMAND_PROMPT
|
protected static java.lang.String |
DEFAULT_LIBRARY_FIELD
|
protected static java.lang.String |
ENTER_KEY_LINE
|
protected static int |
ERROR_LINE
|
static java.lang.String |
NAT_ATTR_COPYLINKS
|
static java.lang.String |
NAT_ATTR_COPYUSER
|
static java.lang.String |
NAT_ATTR_DEFAULT_LIBRARY
|
static java.lang.String |
NAT_ATTR_GROUPS
|
static java.lang.String |
NAT_ATTR_NAME
|
static java.lang.String |
NAT_ATTR_PASSWORD
|
static java.lang.String |
NAT_ATTR_USERID
|
static java.lang.String |
NAT_FIELD_USERS
|
protected static java.lang.String |
PASSWORD_FIELD
|
static java.lang.String |
RA_AFFINITY_LIST
The account name used to connect to the resource. |
static java.lang.String |
RA_DELETE
|
static java.lang.String |
RA_HOST
Resource attributes are the common names that will be visible in the GUI that will prompt the user for values. |
static java.lang.String |
RA_IDLETIMEOUT
|
static java.lang.String |
RA_LISTALLOBJECTS_ATTR_PARSE
|
static java.lang.String |
RA_LISTUSER_ATTR_PARSE
|
static java.lang.String |
RA_LISTUSER_GROUPS_ATTR_PARSE
|
static java.lang.String |
RA_MAXCONNS
|
static java.lang.String |
RA_PORT
The port on which to communicate to the resource. |
static java.lang.String |
RA_PROPS
|
static java.lang.String |
RA_STARTUPCMD
|
static java.lang.String |
RA_SYSTEM
|
static java.lang.String |
RA_TIMEOUT
|
static java.lang.String |
RA_TN3270E
|
protected static int |
SCAN_END_COL
|
protected static int |
SCAN_END_ROW
|
protected static char |
SCAN_FOUND_CHAR
|
protected static int |
SCAN_START_COL
|
protected static int |
SCAN_START_ROW
|
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 | |
NaturalResourceAdapter()
|
|
NaturalResourceAdapter(Resource res,
ObjectCache cache)
|
Method Summary | |
protected java.lang.String |
addEol(java.lang.String s,
java.lang.String eol,
int width)
|
protected void |
addUserToGroup(WSUser user,
java.lang.String group,
WavesetResult result)
|
protected void |
addUserToGroups(WSUser user,
java.util.ArrayList groups,
WavesetResult result)
|
protected void |
addUserToGroups(WSUser user,
WavesetResult result)
|
WavesetResult |
authenticate(java.util.HashMap loginInfo)
Authenticates the user against the resource. |
WavesetResult |
checkCreateAccount(WSUser user)
Checks to see if an account can be created. |
WavesetResult |
checkDeleteAccount(WSUser user)
|
WavesetResult |
checkUpdateAccount(WSUser user)
|
java.lang.String |
createIdentity(WSUser user)
Override base class' createIdentity to always uppercase the identity since Natural will upper case the user ID anyway. |
Resource |
createPrototypeResource()
|
protected java.util.ArrayList |
doList(java.lang.String type)
|
protected boolean |
editGroup(java.lang.String group)
|
protected int |
findUserInGroup(java.lang.String identity,
java.lang.String group)
Returns the position on the screen marking the 'S' where the user was found in the group. |
WSAttributes |
getAccountAttributes(java.lang.String accountIdentity)
This method is obsolete. |
AccountIterator |
getAccountIterator()
|
java.util.List |
getAffinityList()
|
GenericObject |
getFeatures()
Doesn't support AccountIterator. |
protected java.util.ArrayList |
getGroups(WSUser user)
Returns null if the groups attribute isn't on the user. |
java.lang.String |
getHost()
|
protected HostAccess |
getHostAccess()
|
int |
getIdleTimeout()
|
java.lang.String |
getKey()
|
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)
|
protected void |
quoteValue(java.lang.StringBuffer b,
java.lang.String value)
|
protected java.util.ArrayList |
readUserGroups(java.lang.String identity)
|
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)
Create a new user account on the resource This method is called by createAccounts (the multiuser create method). |
protected void |
realDelete(WSUser user,
WavesetResult result)
Needs to be overridden by subclass if default deleteAccounts() implementation is used. |
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 void |
removeUserFromGroup(java.lang.String identity,
java.lang.String group,
WavesetResult result)
|
protected void |
removeUserFromGroups(java.lang.String identity,
java.util.ArrayList groups,
WavesetResult result)
|
protected WSAttributes |
reverseMap(java.util.Map map)
|
protected void |
setFromResource()
|
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. |
protected void |
updateGroups(WSUser user,
WavesetResult result)
|
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 static final boolean _supportMultiValuedAttrs
protected static final int ERROR_LINE
protected static final int SCAN_START_ROW
protected static final int SCAN_START_COL
protected static final int SCAN_END_ROW
protected static final int SCAN_END_COL
protected static final char SCAN_FOUND_CHAR
protected static final java.lang.String COMMAND_PROMPT
protected static final java.lang.String PASSWORD_FIELD
protected static final java.lang.String DEFAULT_LIBRARY_FIELD
protected static final java.lang.String ENTER_KEY_LINE
protected HostAccess _hostAccess
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_SYSTEM
public static final java.lang.String RA_STARTUPCMD
public static final java.lang.String RA_TIMEOUT
public static final java.lang.String RA_IDLETIMEOUT
public static final java.lang.String RA_TN3270E
public static final java.lang.String RA_PROPS
public static final java.lang.String RA_DELETE
public static final java.lang.String RA_MAXCONNS
public static final java.lang.String RA_LISTUSER_ATTR_PARSE
public static final java.lang.String RA_LISTUSER_GROUPS_ATTR_PARSE
public static final java.lang.String RA_LISTALLOBJECTS_ATTR_PARSE
public static final java.lang.String NAT_ATTR_PASSWORD
public static final java.lang.String NAT_ATTR_GROUPS
public static final java.lang.String NAT_ATTR_USERID
public static final java.lang.String NAT_ATTR_NAME
public static final java.lang.String NAT_ATTR_COPYUSER
public static final java.lang.String NAT_ATTR_COPYLINKS
public static final java.lang.String NAT_ATTR_DEFAULT_LIBRARY
public static final java.lang.String NAT_FIELD_USERS
Constructor Detail |
public NaturalResourceAdapter(Resource res, ObjectCache cache) throws WavesetException
public NaturalResourceAdapter() 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
protected void setFromResource()
setFromResource
in class ResourceAdapterBase
public java.lang.String createIdentity(WSUser user) throws WavesetException
createIdentity
in interface ResourceAdapter
createIdentity
in class ResourceAdapterBase
WavesetException
protected WSUser realGetUser(WSUser user) throws WavesetException
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.
Returns "null" if there is no account that corresponds to the user.
getUser
in interface ResourceAdapter
getUser
in class ResourceAdapterBase
WavesetException
protected WSAttributes reverseMap(java.util.Map map) throws WavesetException
WavesetException
public WavesetResult checkCreateAccount(WSUser user) throws WavesetException
checkCreateAccount
in interface ResourceAdapter
checkCreateAccount
in class ResourceAdapterBase
WavesetException
protected void realCreate(WSUser user, WavesetResult result) throws WavesetException
realCreate
in class ResourceAdapterBase
WavesetException
protected void realCreateOrUpdate(WSUser user, WavesetResult result, java.lang.String operation) throws WavesetException
WavesetException
protected void addUserToGroups(WSUser user, WavesetResult result) throws WavesetException
WavesetException
protected void addUserToGroups(WSUser user, java.util.ArrayList groups, WavesetResult result) throws WavesetException
WavesetException
protected void addUserToGroup(WSUser user, java.lang.String group, WavesetResult result) throws WavesetException
WavesetException
protected java.util.ArrayList getGroups(WSUser user) throws WavesetException
WavesetException
protected boolean editGroup(java.lang.String group) throws WavesetException
WavesetException
protected int findUserInGroup(java.lang.String identity, java.lang.String group) throws WavesetException
WavesetException
protected void updateGroups(WSUser user, WavesetResult result) throws WavesetException
WavesetException
protected java.util.ArrayList readUserGroups(java.lang.String identity) throws WavesetException
WavesetException
protected void removeUserFromGroups(java.lang.String identity, java.util.ArrayList groups, WavesetResult result) throws WavesetException
WavesetException
protected void removeUserFromGroup(java.lang.String identity, java.lang.String group, WavesetResult result) throws WavesetException
WavesetException
public WavesetResult checkUpdateAccount(WSUser user) throws WavesetException
checkUpdateAccount
in interface ResourceAdapter
checkUpdateAccount
in class ResourceAdapterBase
WavesetException
protected void realUpdate(WSUser user, WavesetResult result) throws WavesetException
ResourceAdapterBase
realUpdate
in class ResourceAdapterBase
WavesetException
public WavesetResult checkDeleteAccount(WSUser user) throws WavesetException
checkDeleteAccount
in interface ResourceAdapter
checkDeleteAccount
in class ResourceAdapterBase
WavesetException
protected void realDelete(WSUser user, WavesetResult result) throws WavesetException
ResourceAdapterBase
realDelete
in class ResourceAdapterBase
WavesetException
public WSAttributes getAccountAttributes(java.lang.String accountIdentity) throws WavesetException
ResourceAdapter
getAccountAttributes
in interface ResourceAdapter
getAccountAttributes
in class ResourceAdapterBase
WavesetException
public AccountIterator getAccountIterator() throws WavesetException
getAccountIterator
in interface ResourceAdapter
getAccountIterator
in class ResourceAdapterBase
WavesetException
public WavesetResult authenticate(java.util.HashMap loginInfo) throws WavesetException
ResourceAdapter
authenticate
in interface ResourceAdapter
authenticate
in class ResourceAdapterBase
WavesetException
protected java.util.ArrayList doList(java.lang.String type) throws WavesetException
WavesetException
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
protected void startConnection() throws WavesetException
ResourceAdapterBase
startConnection
in class ResourceAdapterBase
WavesetException
protected void stopConnection() throws WavesetException
ResourceAdapterBase
stopConnection
in class ResourceAdapterBase
WavesetException
protected void quoteValue(java.lang.StringBuffer b, java.lang.String value)
protected java.lang.String addEol(java.lang.String s, java.lang.String eol, int width)
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 java.util.Properties getProperties()
getProperties
in interface HostAccessLogin
public int getMaxConnections()
getMaxConnections
in interface HostAccessLogin
public GenericObject getFeatures()
getFeatures
in interface ResourceAdapter
getFeatures
in class ResourceAdapterBase
ResourceAdapter.Features
protected HostAccess getHostAccess()
getHostAccess
in class HostAccessResourceAdapter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |