|
||||||||||
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.SQLServerResourceAdapter
Nested Class Summary | |
static class |
SQLServerResourceAdapter.SQLServerAccountIterator
The implementation of the AccountIterator returned by getAccountIterator. |
static class |
SQLServerResourceAdapter.SQLServerAccountIterator2
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_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 URL template |
static int |
ERR_INVALID_USER
SQL Server error code indicating that a user does not exist. |
static java.lang.String |
RA_DELETE_OWNER
Enables use of the sp_changeobjectowner to reassign objects owned by a user when it is deleted. |
static java.lang.String |
RA_ROLES
The optional role(s) to assign to accounts. |
static java.lang.String |
TYPE_NAME
|
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 | |
SQLServerResourceAdapter()
Create an adapater instance, without a resource. |
|
SQLServerResourceAdapter(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 |
execSQL(java.lang.String stmt)
Execute a SQL statement. |
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. |
WSUser |
getUser(WSUser user)
Public adapter method to get the current user information. |
java.util.ArrayList |
listAllObjects(java.lang.String objectType,
java.util.Map options,
java.lang.String runAsUser,
EncryptedData runAsPassword)
This method will return a list of object names of the specified object type. |
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. |
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. |
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 TYPE_NAME
public static final java.lang.String code_id
public static final java.lang.String RA_ROLES
public static final java.lang.String AA_ROLES
public static final java.lang.String RA_DELETE_OWNER
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 SQLServerResourceAdapter(Resource res, ObjectCache cache)
public SQLServerResourceAdapter()
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 WSUser getUser(WSUser user) 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 java.util.ArrayList listAllObjects(java.lang.String objectType, java.util.Map options, java.lang.String runAsUser, EncryptedData runAsPassword) throws WavesetException
ResourceAdapter
listAllObjects
in interface ResourceAdapter
listAllObjects
in class ResourceAdapterBase
objectType
- -
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(ObjectType.ACCOUNT, null, null, null)
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 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 SQL Server 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 void createRole(java.lang.String name) throws WavesetException
WavesetException
public void execSQL(java.lang.String stmt) throws WavesetException
WavesetException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |