|
||||||||||
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.XMLResourceAdapter
Nested Class Summary | |
class |
XMLResourceAdapter.AcctIter
|
static class |
XMLResourceAdapter.ResourceCache
Inner class holding a cache of accounts for a particular resource. |
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 static java.util.Map |
_caches
Account caches. |
static java.lang.String |
code_id
|
static java.lang.String |
DISABLED_ATTRIBUTE
The special attribute name we use to represent the disable status. |
static java.lang.String |
RESOURCE_TYPE
|
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 | |
XMLResourceAdapter()
Create a basic addapter. |
|
XMLResourceAdapter(Resource res,
ObjectCache cache)
Create an adapter for a particular resource, allowed to obtain objects from an object cache. |
Method Summary | |
java.lang.String |
accountsToXml()
|
WavesetResult |
authenticate(java.util.HashMap loginInfo)
Perform authentication with a set of credentials. |
WavesetResult |
checkCreateAccount(WSUser user)
Check create request. |
WavesetResult |
checkDeleteAccount(WSUser user)
Check account deletion. |
WavesetResult |
checkUpdateAccount(WSUser user)
Check the ability to update an account. |
static void |
clearCaches()
Clear all caches. |
WavesetResult |
createAccounts(WSUser[] users)
Create multiple accounts. |
java.lang.String |
createIdentity(WSUser user)
Overide ResourceAdapterBase's createIdentity to just return the user name as the identity. |
Resource |
createPrototypeResource()
Create the prototype resource. |
WavesetResult |
deleteAccounts(WSUser[] users)
Delete multiple accounts. |
WavesetResult |
disableAccounts(WSUser[] users)
Disable multiple accounts. |
WavesetResult |
enableAccounts(WSUser[] users)
Enable multiple accounts. |
protected GenericObject |
findCachedUser(XMLResourceAdapter.ResourceCache cache,
WSUser user)
|
static void |
flushCaches()
Manually flush all caches. |
GenericObject |
getAccount(WSUser user)
Convert a WSUser passed down from the Provisioner into a GenericObject for storage. |
WSAttributes |
getAccountAttributes(java.lang.String identity)
Obsolete interface, no longer supported. |
WSUser |
getAccountAttributes(WSUser src)
Obsolete interface, no longer supported. |
AccountIterator |
getAccountIterator()
jsl - changed this so we don't use the native HashMap iterator, but instead create a sorted list. |
java.util.List |
getAllAccounts()
Obsolete interface, no longer supported. |
protected static XMLResourceAdapter.ResourceCache |
getCache(Resource resource)
Return the cache for a particular resource, loading it it isn't resident. |
protected XMLResourceAdapter.ResourceCache |
getCachedData()
|
GenericObject |
getFeatures()
Features we support. |
java.lang.String |
getIdentity(WSUser user)
Overload of the one in BaseResourceAdapter that auto creates one for this resource. |
static java.lang.String |
getPath(Resource resource)
Derive the file path for this resource. |
WSUser |
getUser(GenericObject geo)
Convert GenericObject, expected to have been created by getAccount() above back into a WSUser. |
WSUser |
getUser(WSUser idUser)
Return a fully populated user from the resource if one exists. |
void |
prepare(java.lang.String op)
This will be called at the top of every adapter method. |
protected void |
realCreate(WSUser user,
WavesetResult result)
Create a new account. |
protected void |
realDelete(WSUser user,
WavesetResult result)
Delete an acocunt. |
protected void |
realDisable(WSUser user,
WavesetResult result)
Disable an account |
protected void |
realEnable(WSUser user,
WavesetResult result)
Enable an account |
protected void |
realUpdate(WSUser user,
WavesetResult result)
Update one account. |
protected void |
removeCachedUser(XMLResourceAdapter.ResourceCache cache,
WSUser user)
|
static void |
setAutoFlush(boolean b)
Enable or disable autoflush. |
void |
setResource(Resource res)
|
static Resource |
staticCreatePrototypeResource()
Create the prototype Resource. |
boolean |
supportsAccountDisable()
Indicates whether or not this resource supports account disable. |
boolean |
supportsCaseInsensitiveAccountIds()
This method will return whether the resource adapter supports case insensitive account Ids or not. |
WavesetResult |
updateAccounts(WSUser[] users)
Update multiple accounts. |
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_TYPE
public static final java.lang.String DISABLED_ATTRIBUTE
protected static java.util.Map _caches
The map is indexed by resource file path, the value is a Map of GenericObject objects.
Constructor Detail |
public XMLResourceAdapter()
public XMLResourceAdapter(Resource res, ObjectCache cache)
Method Detail |
public static Resource staticCreatePrototypeResource() throws WavesetException
WavesetException
public Resource createPrototypeResource() throws WavesetException
createPrototypeResource
in interface ResourceAdapter
createPrototypeResource
in class ResourceAdapterBase
WavesetException
public GenericObject getFeatures()
getFeatures
in interface ResourceAdapter
getFeatures
in class ResourceAdapterBase
ResourceAdapter.Features
public static void setAutoFlush(boolean b)
public static void flushCaches() throws WavesetException
WavesetException
public static void clearCaches()
public static java.lang.String getPath(Resource resource) throws WavesetException
WavesetException
protected static XMLResourceAdapter.ResourceCache getCache(Resource resource) throws WavesetException
WavesetException
protected XMLResourceAdapter.ResourceCache getCachedData() throws WavesetException
WavesetException
protected GenericObject findCachedUser(XMLResourceAdapter.ResourceCache cache, WSUser user) throws WavesetException
WavesetException
protected void removeCachedUser(XMLResourceAdapter.ResourceCache cache, WSUser user) throws WavesetException
WavesetException
public java.lang.String accountsToXml() throws WavesetException
WavesetException
public GenericObject getAccount(WSUser user) throws WavesetException
WavesetException
public WSUser getUser(GenericObject geo)
public void prepare(java.lang.String op) throws WavesetException
WavesetException
public java.lang.String getIdentity(WSUser user) throws WavesetException
Since we call this in every method, this seems to be a good place to check for the forced error.
getIdentity
in class ResourceAdapterBase
WavesetException
public java.lang.String createIdentity(WSUser user) throws WavesetException
createIdentity
in interface ResourceAdapter
createIdentity
in class ResourceAdapterBase
WavesetException
public WSUser getUser(WSUser idUser) throws WavesetException
getUser
in interface ResourceAdapter
getUser
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 createAccounts(WSUser[] users) throws WavesetException
createAccounts
in interface ResourceAdapter
createAccounts
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
realUpdate
in class ResourceAdapterBase
WavesetException
public WavesetResult updateAccounts(WSUser[] users) throws WavesetException
updateAccounts
in interface ResourceAdapter
updateAccounts
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 WavesetResult deleteAccounts(WSUser[] users) throws WavesetException
deleteAccounts
in interface ResourceAdapter
deleteAccounts
in class ResourceAdapterBase
WavesetException
protected void realDisable(WSUser user, WavesetResult result) throws WavesetException
realDisable
in class ResourceAdapterBase
WavesetException
public WavesetResult disableAccounts(WSUser[] users) throws WavesetException
disableAccounts
in interface ResourceAdapter
disableAccounts
in class ResourceAdapterBase
WavesetException
protected void realEnable(WSUser user, WavesetResult result) throws WavesetException
realEnable
in class ResourceAdapterBase
WavesetException
public WavesetResult enableAccounts(WSUser[] users) throws WavesetException
enableAccounts
in interface ResourceAdapter
enableAccounts
in class ResourceAdapterBase
WavesetException
public WavesetResult authenticate(java.util.HashMap loginInfo) throws WavesetException
authenticate
in interface ResourceAdapter
authenticate
in class ResourceAdapterBase
WavesetException
public boolean supportsCaseInsensitiveAccountIds()
ResourceAdapterBase
supportsCaseInsensitiveAccountIds
in interface ResourceAdapter
supportsCaseInsensitiveAccountIds
in class ResourceAdapterBase
public boolean supportsAccountDisable()
ResourceAdapter
supportsAccountDisable
in interface ResourceAdapter
supportsAccountDisable
in class ResourceAdapterBase
public void setResource(Resource res)
setResource
in interface ResourceAdapter
setResource
in class ResourceAdapterBase
public WSAttributes getAccountAttributes(java.lang.String identity) throws WavesetException
getAccountAttributes
in interface ResourceAdapter
getAccountAttributes
in class ResourceAdapterBase
WavesetException
public WSUser getAccountAttributes(WSUser src) throws WavesetException
WavesetException
public java.util.List getAllAccounts() throws WavesetException
getAllAccounts
in interface ResourceAdapter
getAllAccounts
in class ResourceAdapterBase
WavesetException
public AccountIterator getAccountIterator() throws WavesetException
getAccountIterator
in interface ResourceAdapter
getAccountIterator
in class ResourceAdapterBase
WavesetException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |