|
||||||||||
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.JdbcResourceAdapter
com.waveset.adapter.SybaseResourceAdapter
Nested Class Summary | |
static class |
SybaseResourceAdapter.SybaseAccountIterator
The implementation of the AccountIterator returned by getAccountIterator. |
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 |
AA_GROUP
The current group assigned to this account. |
static java.lang.String |
AA_ROLES
The current role(s) assigned to this account. |
static java.lang.String |
code_id
|
static java.lang.String |
DEFAULT_DRIVER
The default driver. |
static java.lang.String |
DEFAULT_TEMPLATE
The default connect URL template. |
static int |
ERR_INVALID_USER
Sybase error code indicating that a user does not exist. |
static java.lang.String |
RA_GROUP
The optional group to assign to the user object. |
static java.lang.String |
RA_ROLES
The optional role(s) to assign to accounts. |
Fields inherited from class com.waveset.adapter.JdbcResourceAdapter |
RA_DATABASE, RA_DRIVER, RA_HOST, RA_PASSWORD, RA_PORT, RA_QUOTING, RA_URL_PREFIX, RA_URL_TEMPLATE, RA_USER |
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 | |
SybaseResourceAdapter()
Create an adapater instance, without a resource. |
|
SybaseResourceAdapter(Resource res,
ObjectCache cache)
Create an adapter instance for a resource. |
Method Summary | |
WavesetResult |
authenticate(java.util.HashMap loginInfo)
Check to see if a user account and password is valid. |
WSUser |
buildUser(java.lang.String id)
Build the base user object given an id. |
WavesetResult |
checkCreateAccount(WSUser user)
Check to see if an account can be created. |
WavesetResult |
checkDeleteAccount(WSUser user)
Check account deletion. |
WavesetResult |
checkUpdateAccount(WSUser user)
Check the ability to perform an account update. |
Resource |
createPrototypeResource()
Create the prototype instance. |
void |
createRole(java.lang.String name)
|
void |
deleteLogins(java.lang.String pattern)
The account iterator interface uses sp_helpuser since we only expose "real" accounts, not just logins. |
WavesetResult |
disableAccounts(WSUser[] users)
|
WavesetResult |
enableAccounts(WSUser[] users)
|
WSAttributes |
getAccountAttributes(java.lang.String accountIdentity)
Deprecated method, use getUser instead. |
AccountIterator |
getAccountIterator()
Return an iterator that will iterate over all the accounts on a resource. |
java.lang.String |
getColumn(java.sql.ResultSet result,
int col)
Get a string from a result set, trimming trailing blanks. |
WSUser |
getUser(WSUser idUser)
Public adapter method to get the current user information. |
void |
println(java.lang.String msg)
|
protected void |
realCreate(WSUser user,
WavesetResult result)
Create the account for real. |
protected void |
realDelete(WSUser user,
WavesetResult result)
Delete the account for real. |
protected void |
realUpdate(WSUser user,
WavesetResult result)
Do the account update for real. |
WavesetResult |
setAccountLock(WSUser[] users,
boolean lock)
|
void |
startConnection()
Needs to be overridden by subclass if default createAccounts() implementation is used. |
static Resource |
staticCreatePrototypeResource()
Create the prototype instance. |
void |
stopConnection()
Needs to be overridden by subclass if default createAccounts() implementation is used. |
boolean |
supportsAccountDisable()
Return true if this resource supports some form of native account disable. |
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_GROUP
public static final java.lang.String RA_ROLES
public static final java.lang.String AA_ROLES
public static final java.lang.String AA_GROUP
public static final java.lang.String DEFAULT_DRIVER
public static final java.lang.String DEFAULT_TEMPLATE
public static final int ERR_INVALID_USER
Constructor Detail |
public SybaseResourceAdapter(Resource res, ObjectCache cache)
public SybaseResourceAdapter()
Method Detail |
public static Resource staticCreatePrototypeResource() throws WavesetException
WavesetException
public Resource createPrototypeResource() throws WavesetException
createPrototypeResource
in interface ResourceAdapter
createPrototypeResource
in class ResourceAdapterBase
WavesetException
public void startConnection() throws WavesetException
ResourceAdapterBase
startConnection
in class ResourceAdapterBase
WavesetException
public void stopConnection() throws WavesetException
ResourceAdapterBase
stopConnection
in class ResourceAdapterBase
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
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
This will get complex when we support roles. Role modifications are not updates to the user object, we have to update the membership lists of each affected role.
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 java.lang.String getColumn(java.sql.ResultSet result, int col) throws java.sql.SQLException
java.sql.SQLException
public WSUser getUser(WSUser idUser) throws WavesetException
getUser
in interface ResourceAdapter
getUser
in class ResourceAdapterBase
WavesetException
public WSUser buildUser(java.lang.String id)
public WSAttributes getAccountAttributes(java.lang.String accountIdentity) throws WavesetException
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
Note that because of the distinction between an "login object" and a "securuty account", you may be able to login to Sybase but still not be able to do anything within the database.
We're only checking for valid logins, we don't care if there is a security account since its possible they might want to set up a database just to handle authentication.
authenticate
in interface ResourceAdapter
authenticate
in class ResourceAdapterBase
WavesetException
public boolean supportsAccountDisable()
supportsAccountDisable
in interface ResourceAdapter
supportsAccountDisable
in class ResourceAdapterBase
public WavesetResult disableAccounts(WSUser[] users) throws WavesetException
disableAccounts
in interface ResourceAdapter
disableAccounts
in class ResourceAdapterBase
WavesetException
public WavesetResult enableAccounts(WSUser[] users) throws WavesetException
enableAccounts
in interface ResourceAdapter
enableAccounts
in class ResourceAdapterBase
WavesetException
public WavesetResult setAccountLock(WSUser[] users, boolean lock) throws WavesetException
WavesetException
public void createRole(java.lang.String name) throws WavesetException
WavesetException
public void deleteLogins(java.lang.String pattern) throws WavesetException
WavesetException
public void println(java.lang.String msg)
println
in class JdbcResourceAdapter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |