|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.adapter.ResourceAdapterProxy
Proxy for ResourceAdapter instances - used to implement common behavior across all adapters where possible. KY: Expanded to enforce resource-level account feature disabling (Bug #6192 9/2005) See the implementation of getFeatures() and isSupported(). Also, added in specific checks here to make sure that the proxy denies any attempt to perform an operation which requires any of the following features: - account.CREATE - account.UPDATE - account.DELETE - account.LOGIN - account.RENAME - account.DISABLE - account.ENABLE
Nested Class Summary | |
class |
ResourceAdapterProxy.ExclusionCheckingAccountIterator
|
Nested classes inherited from class com.waveset.adapter.ResourceAdapter |
ResourceAdapter.ActionResult, ResourceAdapter.Features, ResourceAdapter.ObjectType |
Field Summary | |
static java.lang.String |
CLASS
|
Constructor Summary | |
ResourceAdapterProxy(ResourceAdapter delegate)
|
Method Summary | |
WavesetResult |
authenticate(java.util.HashMap loginInfo)
Authenticates the user against the resource. |
WavesetResult |
checkCreateAccount(WSUser user)
|
WavesetResult |
checkDeleteAccount(WSUser user)
|
WavesetResult |
checkUpdateAccount(WSUser user)
|
WavesetResult |
createAccount(WSUser user)
|
WavesetResult |
createAccounts(WSUser[] users)
|
java.lang.String |
createIdentity(WSUser user)
|
WavesetResult |
createObject(GenericObject object,
java.util.Map options)
Creates the specified objectId of type objectType using the list of attributes provided. |
Resource |
createPrototypeResource()
|
WavesetResult |
deleteAccount(WSUser user)
|
WavesetResult |
deleteAccount(WSUser user,
long timeout)
Delete the resource account specified by the input WSUser. |
WavesetResult |
deleteAccounts(WSUser[] users)
|
WavesetResult |
deleteObject(GenericObject object,
java.util.Map options)
Deletes the requested objectId of the requested objectType from the resource |
WavesetResult |
disableAccount(WSUser user)
|
WavesetResult |
disableAccounts(WSUser[] users)
|
WavesetResult |
enableAccount(WSUser user)
|
WavesetResult |
enableAccounts(WSUser[] users)
|
WSAttributes |
getAccountAttributes(java.lang.String accountIdentity)
This method is obsolete. |
AccountIterator |
getAccountIterator()
|
AccountIterator |
getAccountIterator(long timeout)
|
AccountIterator |
getAccountIterator(java.util.Map filterParams)
Like getAccountIterator but takes a Map param. |
java.util.List |
getAllAccounts()
|
java.lang.String |
getBaseContextAttrName()
Deprecated. As of 4.0 use getBaseContexts() . |
GenericObject |
getBaseContextObject(java.lang.String baseContext)
|
java.util.List |
getBaseContexts()
Needs to be overridden by subclass in order to support browsing and editing of resource objects |
ResourceAdapter |
getDelegate()
Accessor in the event a reference to the delegate is needed, e.g. |
GenericObject |
getFeatures()
Expose features supported by the Resource Adapter. |
GenericObject |
getObject(java.lang.String objectType,
java.lang.String objectId,
java.util.List attrsToGet,
java.util.Map options)
Returns the requested objectId of the requested objectType from the resource |
Resource |
getResource()
|
java.util.List |
getResourceAccounts(java.util.List attributes)
|
WSUser |
getUser(WSUser user)
Retrieves account information from the resource for the specified WSUser and returns a new WSUser based on the information from the resource. |
WSUser |
getUser(WSUser user,
long timeout)
|
static boolean |
isExcludedAccount(java.lang.String account,
java.util.Map accountAttributes,
ResourceOperation operation,
Rule excludedRule)
Returns true if the resource account is to be excluded in listings as determined by the optional rule. |
boolean |
isSupported(java.lang.String feature)
|
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. |
java.util.ArrayList |
listAllObjects(java.lang.String objectType,
java.util.Map options,
java.lang.String runAsUser,
EncryptedData runAsPassword,
long timeout)
|
java.util.List |
listObjects(java.util.Map options)
Returns a list of all object types supported by the resource adapter that match based on the specified options. |
java.util.List |
listObjects(java.lang.String objectType,
java.util.Map options)
|
java.util.List |
listObjectsOfType(java.lang.String objectType,
java.util.Map options)
List objects of the specified object type that match the search criteria specified in @param options. |
boolean |
namesEqual(java.lang.String name1,
java.lang.String name2)
|
WavesetResult |
run(ResourceAction action)
Runs a ResourceAction - The implementation almost always calls run(ResourceAction, Map) with a null Map. |
WavesetResult |
run(ResourceAction action,
java.util.Map args)
Runs a ResourceAction with additional args; could be null. |
WavesetResult |
scan(java.util.Map parameters)
|
void |
setCache(ObjectCache cache)
|
void |
setContext(LighthouseContext context)
|
void |
setResource(Resource res)
|
void |
setResourceObjectClassAttr(java.lang.String objectType,
boolean primary)
Set the object class attr value. |
boolean |
supportsAccountDisable()
Indicates whether or not this resource supports account disable. |
boolean |
supportsActions()
|
boolean |
supportsCaseInsensitiveAccountIds()
|
boolean |
supportsContainerObjectTypes()
|
boolean |
supportsExcludedAccounts()
The proxy adds support for ExcludedAccounts to all resources. |
boolean |
supportsResourceAccount()
|
boolean |
supportsScanning()
|
WavesetResult |
testConfiguration()
Test method. |
WavesetResult |
updateAccount(WSUser user)
|
WavesetResult |
updateAccounts(WSUser[] users)
|
WavesetResult |
updateObject(GenericObject object,
java.util.Map options)
Updates the specified objectId of type objectType using the list of attributes provided. |
WavesetResult |
updateResourceAccount(GenericObject account)
|
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 CLASS
Constructor Detail |
public ResourceAdapterProxy(ResourceAdapter delegate)
Method Detail |
public ResourceAdapter getDelegate()
public void setResource(Resource res)
setResource
in interface ResourceAdapter
public void setCache(ObjectCache cache)
setCache
in interface ResourceAdapter
public void setContext(LighthouseContext context)
setContext
in interface ResourceAdapter
public Resource getResource()
getResource
in interface ResourceAdapter
public Resource createPrototypeResource() throws WavesetException
createPrototypeResource
in interface ResourceAdapter
WavesetException
public WavesetResult checkCreateAccount(WSUser user) throws WavesetException
checkCreateAccount
in interface ResourceAdapter
WavesetException
public WavesetResult createAccount(WSUser user) throws WavesetException
createAccount
in interface ResourceAdapter
WavesetException
public WavesetResult createAccounts(WSUser[] users) throws WavesetException
createAccounts
in interface ResourceAdapter
WavesetException
public WavesetResult checkUpdateAccount(WSUser user) throws WavesetException
checkUpdateAccount
in interface ResourceAdapter
WavesetException
public WavesetResult updateAccount(WSUser user) throws WavesetException
updateAccount
in interface ResourceAdapter
WavesetException
public WavesetResult updateAccounts(WSUser[] users) throws WavesetException
updateAccounts
in interface ResourceAdapter
WavesetException
public WavesetResult checkDeleteAccount(WSUser user) throws WavesetException
checkDeleteAccount
in interface ResourceAdapter
WavesetException
public WavesetResult deleteAccount(WSUser user) throws WavesetException
deleteAccount
in interface ResourceAdapter
WavesetException
public WavesetResult deleteAccount(WSUser user, long timeout) throws WavesetException, java.lang.InterruptedException
deleteAccount
in interface ResourceAdapter
timeout
- how many milliseconds to wait
java.lang.InterruptedException
- if the operation does not complete
within the specified timeout.
WavesetException
public WavesetResult deleteAccounts(WSUser[] users) throws WavesetException
deleteAccounts
in interface ResourceAdapter
WavesetException
public WavesetResult disableAccount(WSUser user) throws WavesetException
disableAccount
in interface ResourceAdapter
WavesetException
public WavesetResult disableAccounts(WSUser[] users) throws WavesetException
disableAccounts
in interface ResourceAdapter
WavesetException
public WavesetResult enableAccount(WSUser user) throws WavesetException
enableAccount
in interface ResourceAdapter
WavesetException
public WavesetResult enableAccounts(WSUser[] users) throws WavesetException
enableAccounts
in interface ResourceAdapter
WavesetException
public boolean supportsAccountDisable()
supportsAccountDisable
in interface ResourceAdapter
public WSUser getUser(WSUser user) throws WavesetException
getUser
in interface ResourceAdapter
WavesetException
public WSUser getUser(WSUser user, long timeout) throws WavesetException, java.lang.InterruptedException
getUser
in interface ResourceAdapter
timeout
- how many milliseconds to wait
java.lang.InterruptedException
- if the operation does not complete within the specified timeout.
WavesetException
public WavesetResult authenticate(java.util.HashMap loginInfo) throws WavesetException
authenticate
in interface ResourceAdapter
WavesetException
public WSAttributes getAccountAttributes(java.lang.String accountIdentity) throws WavesetException
getAccountAttributes
in interface ResourceAdapter
WavesetException
public java.util.List getAllAccounts() throws WavesetException
getAllAccounts
in interface ResourceAdapter
WavesetException
public AccountIterator getAccountIterator() throws WavesetException
getAccountIterator
in interface ResourceAdapter
WavesetException
public AccountIterator getAccountIterator(long timeout) throws WavesetException, java.lang.InterruptedException
getAccountIterator
in interface ResourceAdapter
timeout
- how many milliseconds to wait
java.lang.InterruptedException
- if the operation does not complete
within the specified timeout.
WavesetException
public AccountIterator getAccountIterator(java.util.Map filterParams) throws WavesetException
getAccountIterator
in interface ResourceAdapter
WavesetException
public java.lang.String createIdentity(WSUser user) throws WavesetException
createIdentity
in interface ResourceAdapter
WavesetException
public WavesetResult scan(java.util.Map parameters) throws WavesetException
scan
in interface ResourceAdapter
WavesetException
public boolean supportsScanning() throws WavesetException
supportsScanning
in interface ResourceAdapter
WavesetException
public boolean supportsContainerObjectTypes() throws WavesetException
supportsContainerObjectTypes
in interface ResourceAdapter
WavesetException
public boolean supportsResourceAccount() throws WavesetException
supportsResourceAccount
in interface ResourceAdapter
WavesetException
public java.lang.String getBaseContextAttrName() throws WavesetException
getBaseContexts()
.
getBaseContextAttrName
in interface ResourceAdapter
WavesetException
public java.util.List getBaseContexts() throws WavesetException
getBaseContexts
in interface ResourceAdapter
WavesetException
public GenericObject getBaseContextObject(java.lang.String baseContext) throws WavesetException
getBaseContextObject
in interface ResourceAdapter
WavesetException
public void setResourceObjectClassAttr(java.lang.String objectType, boolean primary)
setResourceObjectClassAttr
in interface ResourceAdapter
public GenericObject getObject(java.lang.String objectType, java.lang.String objectId, java.util.List attrsToGet, java.util.Map options) throws WavesetException
getObject
in interface ResourceAdapter
objectId
- - a valid fully qualified object identifier on this resource
(e.g. "dn")attrsToGet
- - a list of attribute names supported by the specified objectType
to be returned with the objectoptions
- - not currently used since the objectId/objectType provide a unique
identifier of the object being requestedobjectType
- - a valid object type defined in the resource's WavesetException
public WavesetResult createObject(GenericObject object, java.util.Map options) throws WavesetException
createObject
in interface ResourceAdapter
options
- - several options can be specified which control the behavior of the search
for referenced objects (e.g. group members)
They include:
object
- - a GenericObject containing the objectType, objectId, and list of attributes
to be set on the new object
WavesetException
public WavesetResult updateObject(GenericObject object, java.util.Map options) throws WavesetException
updateObject
in interface ResourceAdapter
options
- - several options can be specified which control the behavior of the search
for referenced objects (e.g. group members)
They include:
object
- - a GenericObject containing the objectType, objectId, and list of new
and changed attributes to be set on the object
WavesetException
public WavesetResult deleteObject(GenericObject object, java.util.Map options) throws WavesetException
deleteObject
in interface ResourceAdapter
object
- options
- - not currently used since the objectId/objectType provide a unique
identifier of the object being deleted
section
WavesetException
public java.util.List listObjectsOfType(java.lang.String objectType, java.util.Map options) throws WavesetException
listObjectsOfType
in interface ResourceAdapter
WavesetException
public java.util.List listObjects(java.util.Map options) throws WavesetException
listObjects
in interface ResourceAdapter
WavesetException
listObjects(String, java.util.Map).
public java.util.List listObjects(java.lang.String objectType, java.util.Map options) throws WavesetException
listObjects
in interface ResourceAdapter
objectType
- the name of an object class that is
valid for the resource specified by the value of option "resId".
If objectType
is null, this method will list objects
of the types specified in the resource's
options
- control the behavior of the search.
Supported options include:
WavesetException
and
'ed or or
'ed together.
If not specified, this method will construct a search filter
using the specified objectType.,
runAsUser
.
Required in order to authenticate with resource
so that we can to execute the list request as the specified user.
What is the format? Is it encrypted and base-64-encoded,
as returned by EncyptedData.toString()
?
public java.util.ArrayList listAllObjects(java.lang.String objectType, java.util.Map options, java.lang.String runAsUser, EncryptedData runAsPassword) throws WavesetException
listAllObjects
in interface ResourceAdapter
WavesetException
public java.util.ArrayList listAllObjects(java.lang.String objectType, java.util.Map options, java.lang.String runAsUser, EncryptedData runAsPassword, long timeout) throws WavesetException, java.lang.InterruptedException
listAllObjects
in interface ResourceAdapter
timeout
- how many milliseconds to wait
java.lang.InterruptedException
- if the operation does not complete
within the specified timeout.
WavesetException
public java.util.List getResourceAccounts(java.util.List attributes) throws WavesetException
getResourceAccounts
in interface ResourceAdapter
attributes
- a list of attribute names whose values are to
be returned with the account object.
WavesetException
public WavesetResult updateResourceAccount(GenericObject account) throws WavesetException
updateResourceAccount
in interface ResourceAdapter
WavesetException
public boolean supportsActions()
supportsActions
in interface ResourceAdapter
public boolean supportsCaseInsensitiveAccountIds()
supportsCaseInsensitiveAccountIds
in interface ResourceAdapter
false
.public boolean supportsExcludedAccounts()
supportsExcludedAccounts
in interface ResourceAdapter
public boolean namesEqual(java.lang.String name1, java.lang.String name2)
namesEqual
in interface ResourceAdapter
public WavesetResult run(ResourceAction action) throws WavesetException
ResourceAdapter
run
in interface ResourceAdapter
action
-
WavesetException
ResourceAdapter.run(com.waveset.object.ResourceAction, java.util.Map)
public WavesetResult run(ResourceAction action, java.util.Map args) throws WavesetException
ResourceAdapter
run
in interface ResourceAdapter
action
- the action to runargs
- passed to the action script; can be null
WavesetException
public GenericObject getFeatures()
getFeatures
in interface ResourceAdapter
ResourceAdapter.Features
public boolean isSupported(java.lang.String feature)
isSupported
in interface ResourceAdapter
public WavesetResult testConfiguration() throws WavesetException
testConfiguration
in interface ResourceAdapter
WavesetException
public static boolean isExcludedAccount(java.lang.String account, java.util.Map accountAttributes, ResourceOperation operation, Rule excludedRule) throws WavesetException
account
- Account ID - should be lower case if resource supports case insensitive account IDs.accountAttributes
- Optional map of accountAttributesoperation
- Optional ResourceOperationexcludedRule
- Optional rule to evaluate - false is returned if rule is null.
WavesetException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |