|
||||||||||
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
com.waveset.adapter.SimulatedResourceAdapter
Nested Class Summary | |
static class |
SimulatedResourceAdapter.ExtendedResourceCache
|
static class |
SimulatedResourceAdapter.ResourceObjects
A class maintaining a collection of "resource objects" managed by a particular resource. |
static class |
SimulatedResourceAdapter.State
|
Nested classes inherited from class com.waveset.adapter.XMLResourceAdapter |
XMLResourceAdapter.AcctIter, XMLResourceAdapter.ResourceCache |
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
|
static java.lang.String |
code_id
|
static java.lang.String |
INVALID_PORT
Special value for the "port" resource attribute we will recognize and throw an exception. |
static java.lang.String |
RESOURCE_TYPE
|
Fields inherited from class com.waveset.adapter.XMLResourceAdapter |
_caches, DISABLED_ATTRIBUTE |
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 | |
SimulatedResourceAdapter()
Create a basic addapter. |
|
SimulatedResourceAdapter(Resource res,
ObjectCache cache)
Create an adapter for a particular resource, allowed to obtain objects from an object cache. |
Method Summary | |
WavesetResult |
createObject(java.lang.String type,
java.lang.String id,
java.util.Map attributes,
java.util.Map options)
Why pass a Map of attributes here, should pass in a GenericObject like we returned from getObject. |
Resource |
createPrototypeResource()
Create the prototype resource. |
protected GenericObject |
findCachedUser(XMLResourceAdapter.ResourceCache cache,
WSUser user)
|
GenericObject |
getAccount(WSUser user)
Convert a WSUser passed down from the Provisioner into a GenericObject for storage. |
protected static XMLResourceAdapter.ResourceCache |
getCache(Resource resource,
boolean caseInsensitive)
Return the cache for a particular resource, loading it it isn't resident. |
protected XMLResourceAdapter.ResourceCache |
getCachedData()
|
GenericObject |
getFeatures()
Features we support. |
static GenericObject |
getNativeAccount(Resource res,
java.lang.String accountId)
Return the internal representation of an account. |
GenericObject |
getObject(java.lang.String type,
java.lang.String objectId,
java.util.Map attrsToGet,
java.util.Map options)
In attrsToGet, suggest just passing a List rather than a Map. |
GenericObject |
getObjectSchema(java.lang.String type,
java.lang.String scope)
Return the schema of objects we support. |
java.util.List |
getResourceAccounts(java.util.List attributes)
|
static SimulatedResourceAdapter.State |
getState(Resource resource)
|
static SimulatedResourceAdapter.State |
getState(java.lang.String name)
Special static method to return the State for a particular resource, which can then be modified at runtime. |
WSUser |
getUser(GenericObject geo)
Convert GenericObject, expected to have been created by getAccount() above back into a WSUser. |
java.util.ArrayList |
listAllObjects(java.lang.String type,
java.util.Map options,
java.lang.String runAsUser,
EncryptedData runAsPassword)
This method will return a list of object names of the specified object type. |
static void |
nativeDelete(Resource res,
java.lang.String accountId)
Delete an account on a resource without Lighthouse awareness. |
static void |
nativeDisable(Resource res,
java.lang.String accountId)
|
static void |
nativeEnable(Resource res,
java.lang.String accountId)
|
static void |
nativeUpdate(Resource res,
GenericObject account)
Update an account on a resource, the object should have been obtained with getNativeAccount. |
void |
prepare(java.lang.String op)
Overload of the one in XMLResourceAdapter that inserts our simulations. |
void |
println(java.lang.String msg)
|
protected void |
realCreate(WSUser user,
WavesetResult result)
Create a new account. |
void |
removeAllAccounts()
Removes all users from the resource. |
protected void |
removeCachedUser(XMLResourceAdapter.ResourceCache cache,
WSUser user)
|
WavesetResult |
run(ResourceAction resAction,
java.util.Map args)
Run an arbitrary resource action. |
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. |
boolean |
supportsResourceAccount()
Returns true if the resource adapter supports modifications to the resource account. |
WavesetResult |
updateObject(java.lang.String type,
java.lang.String id,
java.util.Map attributes,
java.util.Map options)
Why pass a Map of attributes here, should pass in a GenericObject like we returned from getObject. |
WavesetResult |
updateResourceAccount(GenericObject account)
|
Methods inherited from class com.waveset.adapter.XMLResourceAdapter |
accountsToXml, authenticate, checkCreateAccount, checkDeleteAccount, checkUpdateAccount, clearCaches, createAccounts, createIdentity, deleteAccounts, disableAccounts, enableAccounts, flushCaches, getAccountAttributes, getAccountAttributes, getAccountIterator, getAllAccounts, getCache, getIdentity, getPath, getUser, realDelete, realDisable, realEnable, realUpdate, setAutoFlush, updateAccounts |
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 CLASS
public static final java.lang.String RESOURCE_TYPE
public static final java.lang.String INVALID_PORT
Constructor Detail |
public SimulatedResourceAdapter()
public SimulatedResourceAdapter(Resource res, ObjectCache cache)
Method Detail |
public void setResource(Resource res)
setResource
in interface ResourceAdapter
setResource
in class XMLResourceAdapter
public static Resource staticCreatePrototypeResource() throws WavesetException
WavesetException
public Resource createPrototypeResource() throws WavesetException
createPrototypeResource
in interface ResourceAdapter
createPrototypeResource
in class XMLResourceAdapter
WavesetException
public GenericObject getFeatures()
getFeatures
in interface ResourceAdapter
getFeatures
in class XMLResourceAdapter
public boolean supportsAccountDisable()
ResourceAdapter
supportsAccountDisable
in interface ResourceAdapter
supportsAccountDisable
in class XMLResourceAdapter
public boolean supportsResourceAccount() throws WavesetException
supportsResourceAccount
in interface ResourceAdapter
supportsResourceAccount
in class ResourceAdapterBase
WavesetException
public boolean supportsCaseInsensitiveAccountIds()
ResourceAdapterBase
supportsCaseInsensitiveAccountIds
in interface ResourceAdapter
supportsCaseInsensitiveAccountIds
in class XMLResourceAdapter
protected static XMLResourceAdapter.ResourceCache getCache(Resource resource, boolean caseInsensitive) throws WavesetException
WavesetException
protected XMLResourceAdapter.ResourceCache getCachedData() throws WavesetException
getCachedData
in class XMLResourceAdapter
WavesetException
protected GenericObject findCachedUser(XMLResourceAdapter.ResourceCache cache, WSUser user) throws WavesetException
findCachedUser
in class XMLResourceAdapter
WavesetException
protected void removeCachedUser(XMLResourceAdapter.ResourceCache cache, WSUser user) throws WavesetException
removeCachedUser
in class XMLResourceAdapter
WavesetException
public static SimulatedResourceAdapter.State getState(java.lang.String name)
public static SimulatedResourceAdapter.State getState(Resource resource) throws WavesetException
WavesetException
public void prepare(java.lang.String op) throws WavesetException
prepare
in class XMLResourceAdapter
WavesetException
public void println(java.lang.String msg)
protected void realCreate(WSUser user, WavesetResult result) throws WavesetException
XMLResourceAdapter
realCreate
in class XMLResourceAdapter
WavesetException
public static void nativeDelete(Resource res, java.lang.String accountId) throws WavesetException
WavesetException
public static void nativeDisable(Resource res, java.lang.String accountId) throws WavesetException
WavesetException
public static void nativeEnable(Resource res, java.lang.String accountId) throws WavesetException
WavesetException
public static GenericObject getNativeAccount(Resource res, java.lang.String accountId) throws WavesetException
WavesetException
public static void nativeUpdate(Resource res, GenericObject account) throws WavesetException
WavesetException
public GenericObject getObjectSchema(java.lang.String type, java.lang.String scope) throws WavesetException
WavesetException
public java.util.ArrayList listAllObjects(java.lang.String type, java.util.Map options, java.lang.String runAsUser, EncryptedData runAsPassword) throws WavesetException
ResourceAdapter
listAllObjects
in interface ResourceAdapter
listAllObjects
in class ResourceAdapterBase
type
- -
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 GenericObject getObject(java.lang.String type, java.lang.String objectId, java.util.Map attrsToGet, java.util.Map options) throws WavesetException
WavesetException
public WavesetResult createObject(java.lang.String type, java.lang.String id, java.util.Map attributes, java.util.Map options) throws WavesetException
WavesetException
public WavesetResult updateObject(java.lang.String type, java.lang.String id, java.util.Map attributes, java.util.Map options) throws WavesetException
WavesetException
public WavesetResult run(ResourceAction resAction, java.util.Map args) throws WavesetException
run
in interface ResourceAdapter
run
in class ResourceAdapterBase
resAction
- The action to executeargs
- Additional args, can be null.
WavesetException
public java.util.List getResourceAccounts(java.util.List attributes) throws WavesetException
getResourceAccounts
in interface ResourceAdapter
getResourceAccounts
in class ResourceAdapterBase
WavesetException
public WavesetResult updateResourceAccount(GenericObject account) throws WavesetException
updateResourceAccount
in interface ResourceAdapter
updateResourceAccount
in class ResourceAdapterBase
WavesetException
public GenericObject getAccount(WSUser user) throws WavesetException
XMLResourceAdapter
getAccount
in class XMLResourceAdapter
WavesetException
public WSUser getUser(GenericObject geo)
XMLResourceAdapter
getUser
in class XMLResourceAdapter
public void removeAllAccounts() throws WavesetException
WavesetException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |