com.waveset.adapter
Class ResourceAdapterProxy

java.lang.Object
  extended bycom.waveset.adapter.ResourceAdapterProxy
All Implemented Interfaces:
ResourceAdapter

public final class ResourceAdapterProxy
extends java.lang.Object
implements ResourceAdapter

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
           
 
Fields inherited from interface com.waveset.adapter.ResourceAdapter
CHANGE_PASSWORD_LOCATION, code_id, DISABLE, ENABLE, EXPIRE_PASSWORD, GUID, IGNORE_ATTR, NEW_ACCOUNT_ID, OP_DAYS_INACTIVE, OP_DISABLED, OP_DORMANT, OP_EXPIRED, OP_EXPIREDPWD, OP_INACTIVE, OP_LOCKED, OP_NO_PASSWORD_SET, OP_NOOWNERSHIP, OP_NOPASSWORDREQ, OP_NUMINACTIVEDAYS, OP_NUMPWDAYS, OP_PWNUMDAYS, RA_BASE_CTX, RA_DISPLAY_NAME_ATTR, RA_NEW_OBJECT_ID, RA_NEW_OBJECT_NAME, RA_OBJECT_ATTRIBUTES, RA_OBJECT_CLASS, RA_OBJECT_ID, RA_OBJECT_TYPE, RA_OP_TYPE, RA_RENAME_OP, RA_REQUESTOR, RA_SAVEAS_OP, RA_SEARCH_ATTRIBUTE_NAMES, RA_SEARCH_ATTRS_TO_GET, RA_SEARCH_CONTEXT, RA_SEARCH_FILTER, RA_SEARCH_RUN_AS_PASSWORD, RA_SEARCH_RUN_AS_USER, RA_SEARCH_SCOPE, RA_SEARCH_SCOPE_OBJECT, RA_SEARCH_SCOPE_ONE_LEVEL, RA_SEARCH_SCOPE_SUBTREE, RA_SEARCH_TIME_LIMIT, RESET_PASSWORD, SYSTEM_ATTRIBUTES, UNLOCK, WS_USER_PASSWORD
 
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

CLASS

public static final java.lang.String CLASS
See Also:
Constant Field Values
Constructor Detail

ResourceAdapterProxy

public ResourceAdapterProxy(ResourceAdapter delegate)
Method Detail

getDelegate

public ResourceAdapter getDelegate()
Accessor in the event a reference to the delegate is needed, e.g. for downcasting in existing code.

Returns:
ResourceAdapter instance to which the proxy delegates.

setResource

public void setResource(Resource res)
Specified by:
setResource in interface ResourceAdapter

setCache

public void setCache(ObjectCache cache)
Specified by:
setCache in interface ResourceAdapter

setContext

public void setContext(LighthouseContext context)
Specified by:
setContext in interface ResourceAdapter

getResource

public Resource getResource()
Specified by:
getResource in interface ResourceAdapter

createPrototypeResource

public Resource createPrototypeResource()
                                 throws WavesetException
Specified by:
createPrototypeResource in interface ResourceAdapter
Throws:
WavesetException

checkCreateAccount

public WavesetResult checkCreateAccount(WSUser user)
                                 throws WavesetException
Specified by:
checkCreateAccount in interface ResourceAdapter
Throws:
WavesetException

createAccount

public WavesetResult createAccount(WSUser user)
                            throws WavesetException
Specified by:
createAccount in interface ResourceAdapter
Throws:
WavesetException

createAccounts

public WavesetResult createAccounts(WSUser[] users)
                             throws WavesetException
Specified by:
createAccounts in interface ResourceAdapter
Throws:
WavesetException

checkUpdateAccount

public WavesetResult checkUpdateAccount(WSUser user)
                                 throws WavesetException
Specified by:
checkUpdateAccount in interface ResourceAdapter
Throws:
WavesetException

updateAccount

public WavesetResult updateAccount(WSUser user)
                            throws WavesetException
Specified by:
updateAccount in interface ResourceAdapter
Throws:
WavesetException

updateAccounts

public WavesetResult updateAccounts(WSUser[] users)
                             throws WavesetException
Specified by:
updateAccounts in interface ResourceAdapter
Throws:
WavesetException

checkDeleteAccount

public WavesetResult checkDeleteAccount(WSUser user)
                                 throws WavesetException
Specified by:
checkDeleteAccount in interface ResourceAdapter
Throws:
WavesetException

deleteAccount

public WavesetResult deleteAccount(WSUser user)
                            throws WavesetException
Specified by:
deleteAccount in interface ResourceAdapter
Throws:
WavesetException

deleteAccount

public WavesetResult deleteAccount(WSUser user,
                                   long timeout)
                            throws WavesetException,
                                   java.lang.InterruptedException
Delete the resource account specified by the input WSUser.

Specified by:
deleteAccount in interface ResourceAdapter
Parameters:
timeout - how many milliseconds to wait
Throws:
java.lang.InterruptedException - if the operation does not complete within the specified timeout.
WavesetException

deleteAccounts

public WavesetResult deleteAccounts(WSUser[] users)
                             throws WavesetException
Specified by:
deleteAccounts in interface ResourceAdapter
Throws:
WavesetException

disableAccount

public WavesetResult disableAccount(WSUser user)
                             throws WavesetException
Specified by:
disableAccount in interface ResourceAdapter
Throws:
WavesetException

disableAccounts

public WavesetResult disableAccounts(WSUser[] users)
                              throws WavesetException
Specified by:
disableAccounts in interface ResourceAdapter
Throws:
WavesetException

enableAccount

public WavesetResult enableAccount(WSUser user)
                            throws WavesetException
Specified by:
enableAccount in interface ResourceAdapter
Throws:
WavesetException

enableAccounts

public WavesetResult enableAccounts(WSUser[] users)
                             throws WavesetException
Specified by:
enableAccounts in interface ResourceAdapter
Throws:
WavesetException

supportsAccountDisable

public boolean supportsAccountDisable()
Indicates whether or not this resource supports account disable. If it does not, the provisioning engine will attempt to simulate disable by generating random passwords. If we end up with more of these "can you do this" methods, we might want to generalize it into a more extensible way to describe features and levels of support.

Specified by:
supportsAccountDisable in interface ResourceAdapter

getUser

public WSUser getUser(WSUser user)
               throws WavesetException
Retrieves account information from the resource for the specified WSUser and returns a new WSUser based on the information from the resource. Returns null if the account does not exist.

Specified by:
getUser in interface ResourceAdapter
Throws:
WavesetException

getUser

public WSUser getUser(WSUser user,
                      long timeout)
               throws WavesetException,
                      java.lang.InterruptedException
Specified by:
getUser in interface ResourceAdapter
Parameters:
timeout - how many milliseconds to wait
Returns:
a WSUser object representing the resource account (specified as the input WSUser). Returns null if the account does not exist.

Throws:
java.lang.InterruptedException - if the operation does not complete within the specified timeout.
WavesetException

authenticate

public WavesetResult authenticate(java.util.HashMap loginInfo)
                           throws WavesetException
Authenticates the user against the resource. If authentication is successful, the authenticated id will be returned. If more info is required to complete authentication the result will contain the required info

Specified by:
authenticate in interface ResourceAdapter
Throws:
WavesetException

getAccountAttributes

public WSAttributes getAccountAttributes(java.lang.String accountIdentity)
                                  throws WavesetException
This method is obsolete. ResourceAdapterBase provides a default implementation that throws a "not implemented" WavesetException.

Specified by:
getAccountAttributes in interface ResourceAdapter
Throws:
WavesetException

getAllAccounts

public java.util.List getAllAccounts()
                              throws WavesetException
Specified by:
getAllAccounts in interface ResourceAdapter
Throws:
WavesetException

getAccountIterator

public AccountIterator getAccountIterator()
                                   throws WavesetException
Specified by:
getAccountIterator in interface ResourceAdapter
Throws:
WavesetException

getAccountIterator

public AccountIterator getAccountIterator(long timeout)
                                   throws WavesetException,
                                          java.lang.InterruptedException
Specified by:
getAccountIterator in interface ResourceAdapter
Parameters:
timeout - how many milliseconds to wait
Returns:
an account iterator.

Throws:
java.lang.InterruptedException - if the operation does not complete within the specified timeout.
WavesetException

getAccountIterator

public AccountIterator getAccountIterator(java.util.Map filterParams)
                                   throws WavesetException
Like getAccountIterator but takes a Map param. Supported entries are:

"Search Filter String" : a String to put in the LDAP search filter. For standard object types (group, user), this will be appended in a string like (&(objectclass=class))

Specified by:
getAccountIterator in interface ResourceAdapter
Throws:
WavesetException

createIdentity

public java.lang.String createIdentity(WSUser user)
                                throws WavesetException
Specified by:
createIdentity in interface ResourceAdapter
Throws:
WavesetException

scan

public WavesetResult scan(java.util.Map parameters)
                   throws WavesetException
Specified by:
scan in interface ResourceAdapter
Throws:
WavesetException

supportsScanning

public boolean supportsScanning()
                         throws WavesetException
Specified by:
supportsScanning in interface ResourceAdapter
Throws:
WavesetException

supportsContainerObjectTypes

public boolean supportsContainerObjectTypes()
                                     throws WavesetException
Specified by:
supportsContainerObjectTypes in interface ResourceAdapter
Throws:
WavesetException

supportsResourceAccount

public boolean supportsResourceAccount()
                                throws WavesetException
Specified by:
supportsResourceAccount in interface ResourceAdapter
Throws:
WavesetException

getBaseContextAttrName

public java.lang.String getBaseContextAttrName()
                                        throws WavesetException
Deprecated. As of 4.0 use getBaseContexts().

Needs to be overridden by subclass in order to support browsing and editing of resource objects

Specified by:
getBaseContextAttrName in interface ResourceAdapter
Returns:
the name, if any, of the attribute used by the resource as the base context or the context to which all operations is bound
Throws:
WavesetException

getBaseContexts

public java.util.List getBaseContexts()
                               throws WavesetException
Needs to be overridden by subclass in order to support browsing and editing of resource objects

Specified by:
getBaseContexts in interface ResourceAdapter
Returns:
a list of the base context strings, if any. Return null if base contexts are not supported or defined.
Throws:
WavesetException

getBaseContextObject

public GenericObject getBaseContextObject(java.lang.String baseContext)
                                   throws WavesetException
Specified by:
getBaseContextObject in interface ResourceAdapter
Throws:
WavesetException

setResourceObjectClassAttr

public void setResourceObjectClassAttr(java.lang.String objectType,
                                       boolean primary)
Set the object class attr value.

Specified by:
setResourceObjectClassAttr in interface ResourceAdapter

getObject

public GenericObject getObject(java.lang.String objectType,
                               java.lang.String objectId,
                               java.util.List attrsToGet,
                               java.util.Map options)
                        throws WavesetException
Returns the requested objectId of the requested objectType from the resource

Specified by:
getObject in interface ResourceAdapter
Parameters:
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 object
options - - not currently used since the objectId/objectType provide a unique identifier of the object being requested
objectType - - a valid object type defined in the resource's section
Throws:
WavesetException

createObject

public WavesetResult createObject(GenericObject object,
                                  java.util.Map options)
                           throws WavesetException
Creates the specified objectId of type objectType using the list of attributes provided.

Specified by:
createObject in interface ResourceAdapter
Parameters:
options - - several options can be specified which control the behavior of the search for referenced objects (e.g. group members) They include:
    "searchContext" - the value of this option determines within what context to perform search (ResourceAdapter.RA_SEARCH_CONTEXT). If no value, will assume search should be done from logical top.
  1. "searchScope" - specifies whether the search should be done on the current object, only within the context of the specified "searchContainer", or in all subcontext within the specified "searchContainer" (ResourceAdapter.RA_SEARCH_SCOPE). Valid values are "object", "oneLevel", or "subTree" indicates that the search should be performed on all sub containers within the specified "searchContainer".
  2. "searchTimeLimit" - the timelimit in milliseconds a search should not exceed (ResourceAdapter.RA_SEARCH_TIME_LIMIT).
  3. "searchAttributeNames" - a list of one or more attribute names used as the component of the tuple when searching for referenced objects (Resource_Adapter.RA_SEARCH_ATTRIBUTES).
    object - - a GenericObject containing the objectType, objectId, and list of attributes to be set on the new object
    Throws:
    WavesetException

updateObject

public WavesetResult updateObject(GenericObject object,
                                  java.util.Map options)
                           throws WavesetException
Updates the specified objectId of type objectType using the list of attributes provided.

Specified by:
updateObject in interface ResourceAdapter
Parameters:
options - - several options can be specified which control the behavior of the search for referenced objects (e.g. group members) They include:
    "searchContext" - the value of this option determines within what context to perform search (ResourceAdapter.RA_SEARCH_CONTEXT). If no value, will assume search should be done from logical top.
  1. "searchScope" - specifies whether the search should be done on the current object, only within the context of the specified "searchContainer", or in all subcontext within the specified "searchContainer" (ResourceAdapter.RA_SEARCH_SCOPE). Valid values are "object", "oneLevel", or "subTree" indicates that the search should be performed on all sub containers within the specified "searchContainer".
  2. "searchTimeLimit" - the timelimit in milliseconds a search should not exceed (ResourceAdapter.RA_SEARCH_TIME_LIMIT).
  3. "searchAttributeNames" - a list of one or more attribute names used as the component of the tuple when searching for referenced objects (Resource_Adapter.RA_SEARCH_ATTRIBUTES).
    object - - a GenericObject containing the objectType, objectId, and list of new and changed attributes to be set on the object
    Throws:
    WavesetException

deleteObject

public WavesetResult deleteObject(GenericObject object,
                                  java.util.Map options)
                           throws WavesetException
Deletes the requested objectId of the requested objectType from the resource

Specified by:
deleteObject in interface ResourceAdapter
Parameters:
object -
options - - not currently used since the objectId/objectType provide a unique identifier of the object being deleted section
Throws:
WavesetException

listObjectsOfType

public java.util.List listObjectsOfType(java.lang.String objectType,
                                        java.util.Map options)
                                 throws WavesetException
List objects of the specified object type that match the search criteria specified in @param options.

Specified by:
listObjectsOfType in interface ResourceAdapter
Throws:
WavesetException

listObjects

public java.util.List listObjects(java.util.Map options)
                           throws WavesetException
Returns a list of all object types supported by the resource adapter that match based on the specified options.

Specified by:
listObjects in interface ResourceAdapter
Throws:
WavesetException
See Also:
listObjects(String, java.util.Map).

listObjects

public java.util.List listObjects(java.lang.String objectType,
                                  java.util.Map options)
                           throws WavesetException
Specified by:
listObjects in interface ResourceAdapter
Parameters:
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 section.

options - control the behavior of the search. Supported options include:
searchContext
the target context to search. If not specified, this method will attempt to get a value from RA_BASE_CONTEXT. If this method cannot obtain a context value, this method will search from logical top.
Returns:
a list of objects matching the requested objectType and options

Must be overridden by each subclass in order to support browsing and editing of resource objects.

Throws:
WavesetException
See Also:
searchFilter
an LDAP search filter as specified in RFC 1558. String value consists of one or more object tuples
  
either and'ed or or'ed together. If not specified, this method will construct a search filter using the specified objectType.
,
searchScope
specifies how deeply to search. Valid values are:
"object"
search only on the current object
"oneLevel"
search directly within the specified "searchContext"
"subTree"
search every subcontext beneath the specified "searchContext"
,
"searchTimeLimit"
the timelimit in milliseconds} a search should not exceed.,
"searchAttrsToGet"
the list of objectType-specific attribute names to return for each listed object. @see #RA_SEARCH_ATTRS_TO_GET
"runAsUser"
user name as which to run this method. If not specified, defaults to resource proxy admin user.
"runAsPassword"
password of 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()?


listAllObjects

public java.util.ArrayList listAllObjects(java.lang.String objectType,
                                          java.util.Map options,
                                          java.lang.String runAsUser,
                                          EncryptedData runAsPassword)
                                   throws WavesetException
This method will return a list of object names of the specified object type. If you need to be able to specify which attrs to return, use listObjects instead

Specified by:
listAllObjects in interface ResourceAdapter
Throws:
WavesetException

listAllObjects

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
Specified by:
listAllObjects in interface ResourceAdapter
Parameters:
timeout - how many milliseconds to wait
Returns:
a list containing names of objects of the specified type. If you need to be able to specify which attrs to return, use listObjects instead.

Throws:
java.lang.InterruptedException - if the operation does not complete within the specified timeout.
WavesetException

getResourceAccounts

public java.util.List getResourceAccounts(java.util.List attributes)
                                   throws WavesetException
Specified by:
getResourceAccounts in interface ResourceAdapter
Parameters:
attributes - a list of attribute names whose values are to be returned with the account object.
Returns:
a list of objects which are used to identify accounts used to connect to the resource. The returned objects also contain the values of the requested attributes.

Throws:
WavesetException

updateResourceAccount

public WavesetResult updateResourceAccount(GenericObject account)
                                    throws WavesetException
Specified by:
updateResourceAccount in interface ResourceAdapter
Throws:
WavesetException

supportsActions

public boolean supportsActions()
Specified by:
supportsActions in interface ResourceAdapter

supportsCaseInsensitiveAccountIds

public boolean supportsCaseInsensitiveAccountIds()
Specified by:
supportsCaseInsensitiveAccountIds in interface ResourceAdapter
Returns:
true if the resource adapter supports case-insensitive account Ids; otherwise false. The default is return true, since most resources do not allow case-sensitive user names.

Any adapter for a resource with case-sensitive account ids should override this method to return false.


supportsExcludedAccounts

public boolean supportsExcludedAccounts()
The proxy adds support for ExcludedAccounts to all resources.

Specified by:
supportsExcludedAccounts in interface ResourceAdapter
Returns:
true

namesEqual

public boolean namesEqual(java.lang.String name1,
                          java.lang.String name2)
Specified by:
namesEqual in interface ResourceAdapter
Returns:
true if name1 equals name2. The default implementation will do a simple string compare. However, for complex names (e.g. dn's ) associated with specific resource types (e.g. LDAP, NDS, AD, etc.) this method can be overridden to do necessary validation and normalization of both names prior to doing the string compare.

run

public WavesetResult run(ResourceAction action)
                  throws WavesetException
Description copied from interface: ResourceAdapter
Runs a ResourceAction - The implementation almost always calls run(ResourceAction, Map) with a null Map.

Specified by:
run in interface ResourceAdapter
Parameters:
action -
Returns:
The result of the action.
Throws:
WavesetException
See Also:
ResourceAdapter.run(com.waveset.object.ResourceAction, java.util.Map)

run

public WavesetResult run(ResourceAction action,
                         java.util.Map args)
                  throws WavesetException
Description copied from interface: ResourceAdapter
Runs a ResourceAction with additional args; could be null.

Specified by:
run in interface ResourceAdapter
Parameters:
action - the action to run
args - passed to the action script; can be null
Returns:
a result with the results of the action execution.
Throws:
WavesetException

getFeatures

public GenericObject getFeatures()
Expose features supported by the Resource Adapter. Note: ActiveSync is considered a facet, not a feature.

Specified by:
getFeatures in interface ResourceAdapter
Returns:
GenericObject containing Features, as both key and value, which are supported by this resource adapter.
See Also:
ResourceAdapter.Features

isSupported

public boolean isSupported(java.lang.String feature)
Specified by:
isSupported in interface ResourceAdapter

testConfiguration

public WavesetResult testConfiguration()
                                throws WavesetException
Test method. This method should check the configuration of the adapter, connecting to the host and validating that it has rights to do account create/update/delete actions.

Specified by:
testConfiguration in interface ResourceAdapter
Throws:
WavesetException

isExcludedAccount

public static boolean isExcludedAccount(java.lang.String account,
                                        java.util.Map accountAttributes,
                                        ResourceOperation operation,
                                        Rule excludedRule)
                                 throws WavesetException
Returns true if the resource account is to be excluded in listings as determined by the optional rule.

Parameters:
account - Account ID - should be lower case if resource supports case insensitive account IDs.
accountAttributes - Optional map of accountAttributes
operation - Optional ResourceOperation
excludedRule - Optional rule to evaluate - false is returned if rule is null.
Throws:
WavesetException