|
||||||||||
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.UnixResourceAdapter
com.waveset.adapter.NISResourceAdapter
Resource adapter for NIS The NIS usermod/useradd/userdel commands use flags (-u, -g, etc) to specify the user attributes. These flags have been mapped in a hashmap, see SVIDResourceAdapter.paramToFlagMap.
Nested Class Summary | |
protected class |
NISResourceAdapter.AccountIter
AccountIterator implementation that can be built by construction from the output of "awk -F: '{print $1}' /etc/passwd". |
Nested classes inherited from class com.waveset.adapter.GenericScriptResourceAdapter |
GenericScriptResourceAdapter.AcctIter |
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 |
CLASS_NAME
|
static java.lang.String |
code_id
|
static java.lang.String |
LOGIN_PASSWORD
|
static java.lang.String |
LOGIN_USER
|
static java.lang.String |
RA_LOGIN_SHELL_PROMPT
|
static java.lang.String |
RA_MAKE_DIR
|
static java.lang.String |
RA_ROOT_PASSWORD
|
static java.lang.String |
RA_ROOT_SHELL_PROMPT
|
static java.lang.String |
RA_ROOT_USER
|
static java.lang.String |
RA_SKEL_DIR
|
static java.lang.String |
RA_USERADD_CREATE_GROUP
Resource attribute name of the variable used to set whether the Red Hat useradd command is to create a group with the same name as the user being added to the system. |
static java.lang.String |
RA_YPPUSH
|
static java.lang.String |
RESOURCE_NAME
|
static java.lang.String |
RESOURCE_USER_FORM
|
static java.lang.String |
USER_COMMENT
|
static java.lang.String |
USER_DIR
|
static java.lang.String |
USER_EXPIRE
|
static java.lang.String |
USER_GROUP
|
static java.lang.String |
USER_INACTIVE
|
static java.lang.String |
USER_SECONDARY_GROUP
|
static java.lang.String |
USER_SHELL
|
static java.lang.String |
USER_UID
|
Fields inherited from class com.waveset.adapter.GenericScriptResourceAdapter |
conn, RA_BLOCK_FETCH_TIMEOUT, RA_CONN_MAX, RA_CONN_TIMEOUT, RA_CONN_TYPE, RA_HOST, RA_LOGIN_PASSWORD, RA_LOGIN_USER, RA_PORT, 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 | |
NISResourceAdapter()
Constructor with empty param list. |
|
NISResourceAdapter(Resource res,
ObjectCache cache)
Constructor with params. |
Method Summary | |
protected void |
changeGroupMembers(java.lang.String group,
java.lang.String users,
Script script)
|
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() |
static java.util.Collection |
divideString(java.lang.String stringToDivide,
char delim,
boolean trimTokens)
A utility method that breaks up a String into an Collection of Strings by cutting at each delimiter. |
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 WavesetResult |
getConnectionTestResult(CaptureList captureList)
Evaluates capture list from execution of generic test connection script. |
protected Script |
getConnectionTestScript()
Creates a script to test the connection, does NOT login or logout. |
protected WavesetResult |
getCreateGroupResult(CaptureList captureList)
|
protected Script |
getCreateGroupScript(java.lang.String groupName,
GenericObject attrs,
java.util.Map options,
boolean isSaveAs)
Generates a script that will create a group on 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 Script |
getDeleteGroupScript(GenericObject object,
java.util.Map options)
Generates a script that will delete a group 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 GenericObject |
getGetGroupResult(java.lang.String groupName,
java.util.List attrsToGet,
CaptureList captureList)
|
protected Script |
getGetGroupScript(java.lang.String objectId,
java.util.List attrsToGet,
java.util.Map options)
Returns a script which will retrieve the attributes of a group account. |
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. |
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 into the system and set up the shell if necessary. |
protected WavesetResult |
getRenameGroupResult(GenericObject object,
CaptureList captureList)
|
protected Script |
getRenameGroupScript(GenericObject object)
Returns a script which will rename a group. |
protected WavesetResult |
getScanningResult(CaptureList captureList,
java.util.Map scanArgsIn)
Based on the result of the scan routine's capturelist and the arguments passed into the routine, generate some output. |
protected Script |
getScanningScript(java.util.Map scanArgs)
Generates a script that will return a list of all the users and interesting attributes. |
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 |
getUid(WSUser user)
Ascertain the UID (user name) from the WSUser obj. |
protected WavesetResult |
getUpdateGroupResult(GenericObject object,
CaptureList captureList)
|
protected Script |
getUpdateGroupScript(GenericObject object)
Returns a script which will update a group. |
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 boolean |
isAllowableUserAttribute(java.lang.String name)
Reports whether a given attribute name is legal on the resource. |
protected boolean |
isYppush()
|
protected void |
startConnection()
Starts a scripted connection up and logs into it. |
static Resource |
staticCreatePrototypeResource()
|
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 RESOURCE_NAME
public static final java.lang.String CLASS_NAME
public static final java.lang.String RESOURCE_USER_FORM
public static final java.lang.String LOGIN_USER
public static final java.lang.String LOGIN_PASSWORD
public static final java.lang.String RA_LOGIN_SHELL_PROMPT
public static final java.lang.String RA_ROOT_USER
public static final java.lang.String RA_ROOT_PASSWORD
public static final java.lang.String RA_ROOT_SHELL_PROMPT
public static final java.lang.String RA_SKEL_DIR
public static final java.lang.String RA_MAKE_DIR
public static final java.lang.String RA_USERADD_CREATE_GROUP
public static final java.lang.String RA_YPPUSH
public static final java.lang.String USER_UID
public static final java.lang.String USER_COMMENT
public static final java.lang.String USER_DIR
public static final java.lang.String USER_SHELL
public static final java.lang.String USER_GROUP
public static final java.lang.String USER_SECONDARY_GROUP
public static final java.lang.String USER_INACTIVE
public static final java.lang.String USER_EXPIRE
Constructor Detail |
public NISResourceAdapter()
public NISResourceAdapter(Resource res, ObjectCache cache)
Method Detail |
protected java.lang.String constructUserAttributeParameter(java.lang.String key, java.lang.String value)
constructUserAttributeParameter
in class GenericScriptResourceAdapter
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 getLoginUserAttrName()
public java.lang.String getLoginPasswordAttrName()
public GenericObject getFeatures()
getFeatures
in interface ResourceAdapter
getFeatures
in class GenericScriptResourceAdapter
ResourceAdapter.Features
protected boolean isAllowableUserAttribute(java.lang.String name)
isAllowableUserAttribute
in class GenericScriptResourceAdapter
protected java.lang.String getUid(WSUser user)
protected void startConnection() throws WavesetException
startConnection
in class UnixResourceAdapter
WavesetException
protected Script getLoginScript() throws WavesetException
getLoginScript
in class GenericScriptResourceAdapter
WavesetException
protected Script getLogoutScript() throws WavesetException
getLogoutScript
in class GenericScriptResourceAdapter
WavesetException
protected Script getConnectionTestScript() throws WavesetException
getConnectionTestScript
in class UnixResourceAdapter
WavesetException
protected WavesetResult getConnectionTestResult(CaptureList captureList) throws WavesetException
getConnectionTestResult
in class UnixResourceAdapter
WavesetException
protected Script getTestConnectionScript() throws WavesetException
WavesetException
protected WavesetResult getTestConnectionResult(CaptureList captureList) throws WavesetException
WavesetException
protected Script getCheckCreateAccountScript() throws WavesetException
getCheckCreateAccountScript
in class GenericScriptResourceAdapter
WavesetException
protected WavesetResult getCheckCreateAccountResult(CaptureList captureList) throws WavesetException
getCheckCreateAccountResult
in class GenericScriptResourceAdapter
WavesetException
protected Script getCheckUpdateAccountScript() throws WavesetException
getCheckUpdateAccountScript
in class GenericScriptResourceAdapter
WavesetException
protected WavesetResult getCheckUpdateAccountResult(CaptureList captureList) throws WavesetException
getCheckUpdateAccountResult
in class GenericScriptResourceAdapter
WavesetException
protected Script getCheckDeleteAccountScript() throws WavesetException
getCheckDeleteAccountScript
in class GenericScriptResourceAdapter
WavesetException
protected WavesetResult getCheckDeleteAccountResult(CaptureList captureList) throws WavesetException
getCheckDeleteAccountResult
in class GenericScriptResourceAdapter
WavesetException
protected Script getCreateUserScript(WSUser user) throws WavesetException
getCreateUserScript
in class UnixResourceAdapter
WavesetException
protected void getCreateUserResult(CaptureList captureList, WavesetResult result) throws WavesetException
getCreateUserResult
in class GenericScriptResourceAdapter
WavesetException
protected Script getUpdateUserScript(WSUser user, java.lang.String password) throws WavesetException
getUpdateUserScript
in class UnixResourceAdapter
WavesetException
protected void getUpdateUserResult(WSUser user, CaptureList captureList, WavesetResult result) throws WavesetException
getUpdateUserResult
in class GenericScriptResourceAdapter
WavesetException
protected Script getDeleteUserScript(WSUser user) throws WavesetException
getDeleteUserScript
in class UnixResourceAdapter
WavesetException
protected void getDeleteUserResult(CaptureList captureList) throws WavesetException
getDeleteUserResult
in class GenericScriptResourceAdapter
WavesetException
protected Script getEnableUserScript(WSUser user, java.lang.String password) throws WavesetException
getEnableUserScript
in class GenericScriptResourceAdapter
WavesetException
protected boolean getEnableUserResult(CaptureList captureList) throws WavesetException
getEnableUserResult
in class GenericScriptResourceAdapter
WavesetException
protected Script getDisableUserScript(WSUser user, java.lang.String password) throws WavesetException
getDisableUserScript
in class GenericScriptResourceAdapter
WavesetException
protected boolean getDisableUserResult(CaptureList captureList) throws WavesetException
getDisableUserResult
in class GenericScriptResourceAdapter
WavesetException
protected Script getAuthenticateScript(java.util.HashMap loginInfo) throws WavesetException
getAuthenticateScript
in class GenericScriptResourceAdapter
WavesetException
protected WavesetResult getAuthenticateResult(java.util.HashMap loginInfo, CaptureList captureList) throws WavesetException
getAuthenticateResult
in class GenericScriptResourceAdapter
WavesetException
protected void changeGroupMembers(java.lang.String group, java.lang.String users, Script script) throws WavesetException
WavesetException
protected AccountIterator getAccountIteratorResult(CaptureList captureList)
getAccountIteratorResult
in class GenericScriptResourceAdapter
protected Script getAccountIteratorScript()
GenericScriptResourceAdapter
getAccountIteratorScript
in class GenericScriptResourceAdapter
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 WSUser getUserResult(CaptureList captureList, WSUser targetUser) throws WavesetException
GenericScriptResourceAdapter
getUserResult
in class GenericScriptResourceAdapter
WavesetException
protected Script getUserScript(WSUser user) throws WavesetException
getUserScript
in class GenericScriptResourceAdapter
WavesetException
protected Script getGetGroupScript(java.lang.String objectId, java.util.List attrsToGet, java.util.Map options) throws WavesetException
getGetGroupScript
in class UnixResourceAdapter
WavesetException
protected GenericObject getGetGroupResult(java.lang.String groupName, java.util.List attrsToGet, CaptureList captureList) throws WavesetException
getGetGroupResult
in class UnixResourceAdapter
WavesetException
protected Script getCreateGroupScript(java.lang.String groupName, GenericObject attrs, java.util.Map options, boolean isSaveAs) throws WavesetException
getCreateGroupScript
in class UnixResourceAdapter
WavesetException
protected WavesetResult getCreateGroupResult(CaptureList captureList) throws WavesetException
getCreateGroupResult
in class UnixResourceAdapter
WavesetException
protected Script getUpdateGroupScript(GenericObject object) throws WavesetException
getUpdateGroupScript
in class UnixResourceAdapter
WavesetException
protected WavesetResult getUpdateGroupResult(GenericObject object, CaptureList captureList) throws WavesetException
getUpdateGroupResult
in class UnixResourceAdapter
WavesetException
protected Script getRenameGroupScript(GenericObject object) throws WavesetException
getRenameGroupScript
in class UnixResourceAdapter
WavesetException
protected WavesetResult getRenameGroupResult(GenericObject object, CaptureList captureList) throws WavesetException
getRenameGroupResult
in class UnixResourceAdapter
WavesetException
protected Script getDeleteGroupScript(GenericObject object, java.util.Map options) throws WavesetException
getDeleteGroupScript
in class UnixResourceAdapter
WavesetException
public static java.util.Collection divideString(java.lang.String stringToDivide, char delim, boolean trimTokens)
protected Script getScanningScript(java.util.Map scanArgs) throws WavesetException
getScanningScript
in class GenericScriptResourceAdapter
WavesetException
protected WavesetResult getScanningResult(CaptureList captureList, java.util.Map scanArgsIn) throws WavesetException
GenericScriptResourceAdapter
getScanningResult
in class GenericScriptResourceAdapter
WavesetException
protected boolean isYppush()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |