|
||||||||||
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.MySQLResourceAdapter
The MySQLResourceAdapter provides very basic management of users for a MySQL installation. This adapter can create, update, and delete users as well as list and iterate over them. The only attribute that can change on an update is the password. All other attributes are created from the template or model user provided as a resource attribute.
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 | |
static java.lang.String |
code_id
|
static java.lang.String |
MYSQL_JDBC
Default JDBC driver for MySQL |
static java.lang.String |
MYSQL_URL
Default JDBC URL for MySQL |
static java.lang.String |
RA_DRIVER
Driver and URL information |
static java.lang.String |
RA_HOST
The name of the host used to communicate with the resource. |
static java.lang.String |
RA_PASSWORD
The password for the account name used to connect to the resource. |
static java.lang.String |
RA_PORT
The port on which to communicate to the resource. |
static java.lang.String |
RA_URL_PREFIX
|
static java.lang.String |
RA_USER
The account name used to connect to the resource. |
static java.lang.String |
RA_USERMODEL
The name of an existing user account that new users will be modeled after. |
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 | |
MySQLResourceAdapter()
|
|
MySQLResourceAdapter(Resource res,
ObjectCache cache)
|
Method Summary | |
WavesetResult |
authenticate(java.util.HashMap loginInfo)
Authenticate a user to the MySQL server. |
WavesetResult |
checkCreateAccount(WSUser user)
Checks to see if an account can be created.In this case, just check connectivity to the MySQL server. |
WavesetResult |
checkDeleteAccount(WSUser user)
Check to see if the account can be deleted. |
WavesetResult |
checkUpdateAccount(WSUser user)
Check to see if the account can be updated. |
Resource |
createPrototypeResource()
|
WSAttributes |
getAccountAttributes(java.lang.String accountIdentity)
Fetch any account attributes specified. |
AccountIterator |
getAccountIterator()
|
GenericObject |
getFeatures()
Doesn't support AccountIterator or listAllObjects of accounts. |
WSUser |
getUser(WSUser user)
Retrieve information about an account, and package it as a WSUser object. |
protected void |
realCreate(WSUser user,
WavesetResult result)
Creates an account on the MySQL server. |
protected void |
realDelete(WSUser user,
WavesetResult result)
The real work for user deletion gets done in this method. |
protected void |
realUpdate(WSUser user,
WavesetResult result)
Needs to be overridden by subclass if default updateAccounts() implementation is used. |
protected void |
startConnection()
Create a connection to the MySQL server. |
static Resource |
staticCreatePrototypeResource()
|
protected void |
stopConnection()
Drop the connection to the MySQL server. |
WavesetResult |
testConfiguration()
Checks connectivity to the MySQL server. |
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 MYSQL_JDBC
public static final java.lang.String MYSQL_URL
public static final java.lang.String RA_HOST
public static final java.lang.String RA_PORT
public static final java.lang.String RA_DRIVER
public static final java.lang.String RA_URL_PREFIX
public static final java.lang.String RA_USER
public static final java.lang.String RA_PASSWORD
public static final java.lang.String RA_USERMODEL
Constructor Detail |
public MySQLResourceAdapter(Resource res, ObjectCache cache)
public MySQLResourceAdapter()
Method Detail |
public static Resource staticCreatePrototypeResource() throws WavesetException
WavesetException
public Resource createPrototypeResource() throws WavesetException
createPrototypeResource
in interface ResourceAdapter
createPrototypeResource
in class ResourceAdapterBase
WavesetException
public WavesetResult checkCreateAccount(WSUser user) throws WavesetException
checkCreateAccount
in interface ResourceAdapter
checkCreateAccount
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
protected void realCreate(WSUser user, WavesetResult result) throws WavesetException
realCreate
in class ResourceAdapterBase
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
realDelete
in class ResourceAdapterBase
WavesetException
public AccountIterator getAccountIterator() throws WavesetException
getAccountIterator
in interface ResourceAdapter
getAccountIterator
in class ResourceAdapterBase
WavesetException
public WSAttributes getAccountAttributes(java.lang.String accountIdentity) throws WavesetException
getAccountAttributes
in interface ResourceAdapter
getAccountAttributes
in class ResourceAdapterBase
WavesetException
public WavesetResult authenticate(java.util.HashMap loginInfo) throws WavesetException
authenticate
in interface ResourceAdapter
authenticate
in class ResourceAdapterBase
loginInfo
- Specifies the username and password to authenticate with.
WavesetException
protected void startConnection() throws WavesetException
startConnection
in class ResourceAdapterBase
WavesetException
protected void stopConnection() throws WavesetException
stopConnection
in class ResourceAdapterBase
WavesetException
public GenericObject getFeatures()
getFeatures
in interface ResourceAdapter
getFeatures
in class ResourceAdapterBase
ResourceAdapter.Features
public WavesetResult testConfiguration() throws WavesetException
testConfiguration
in interface ResourceAdapter
testConfiguration
in class ResourceAdapterBase
WavesetException
- if connectivity can't be established
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |