com.waveset.adapter.sample
Class SkeletonStandardAndActiveSyncResourceAdapter
java.lang.Object
com.waveset.adapter.ResourceAdapterBase
com.waveset.adapter.sample.SkeletonStandardAndActiveSyncResourceAdapter
- All Implemented Interfaces:
- ActiveSync, ResourceAdapter
- public class SkeletonStandardAndActiveSyncResourceAdapter
- extends ResourceAdapterBase
- implements ActiveSync
Field Summary |
static java.lang.String |
code_id
|
static java.lang.String |
DISPLAY_PASSWORD
|
static java.lang.String |
DISPLAY_USER
|
static java.lang.String |
LOGIN_PASSWORD
|
static java.lang.String |
LOGIN_USER
Pass thru authentication variables. |
static java.lang.String |
RA_HOST
Resource attributes are the common names that will be visible in the
GUI that will prompt the user for values. |
static java.lang.String |
RA_NAME1
Additional resource attributes that need to be defined. |
static java.lang.String |
RA_NAME2
|
static java.lang.String |
RA_PASSWORD
|
static java.lang.String |
RA_PORT
The port on which to communicate to the resource. |
static java.lang.String |
RA_USER
The account name used to connect to the resource. |
static java.lang.String |
RESOURCE_NAME
|
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 |
Fields inherited from interface com.waveset.adapter.ActiveSync |
ACTIVE_SYNC_EVENT_RES_ATTRS_XML, ACTIVE_SYNC_STD_RES_ATTRS_XML, ATTR_IS_DELETED, DATE_FORMAT, DATE_TIME_FORMAT, RA_APPLY_META_VIEW, RA_ASSIGN_SOURCE_ON_CREATE, RA_CONFIRMATION_RULE, RA_CORRELATION_RULE, RA_CREATE_UNMATCHED, RA_DELETE_RULE, RA_FORM, RA_ID, RA_IDM_NAME_RULE, RA_LEGACY_EVENT_GEN, RA_LOG_LEVEL, RA_LOG_PATH, RA_LOG_SIZE, RA_MAX_AGE_LENGTH, RA_MAX_AGE_UNIT, RA_MAX_ARCHIVES, RA_NAME, RA_PARAMETERIZED_INPUT_FORM, RA_POPULATE_GLOBAL, RA_POSTPOLL_WORKFLOW, RA_PREPOLL_WORKFLOW, RA_PROCESS_RULE, RA_PROXY_ADMINISTRATOR, RA_RESET_TO_TODAY, RA_RESOLVE_PROCESS_RULE, RA_SCHEDULE_INTERVAL, RA_SCHEDULE_INTERVAL_COUNT, RA_SCHEDULE_START_DATE, RA_SCHEDULE_START_TIME, RA_SYNC_CONFIG_MODE, RA_SYNC_POST_PROCESS_FORM, RA_UPDATE_IF_DELETE, RA_USE_INPUT_FORM, TIME_FORMAT, TRACE_LEVEL_DEBUG, TRACE_LEVEL_ERROR, TRACE_LEVEL_INFO, TRACE_LEVEL_NONE, TRACE_LEVEL_WARNING |
Fields inherited from interface com.waveset.adapter.ResourceAdapter |
CHANGE_PASSWORD_LOCATION, 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 |
Method Summary |
WavesetResult |
authenticate(java.util.HashMap loginInfo)
Authenticates the user against the resource. |
WavesetResult |
checkCreateAccount(WSUser user)
Checks to see if an account can be created. |
WavesetResult |
checkDeleteAccount(WSUser user)
|
WavesetResult |
checkUpdateAccount(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 |
deleteObject(GenericObject object,
java.util.Map options)
Deletes the requested objectId of the requested objectType from the
resource |
protected WavesetResult |
doCreateOrUpdateObjectRequest(java.lang.String objectType,
java.lang.String objectId,
GenericObject attributes,
java.util.Map options,
java.lang.String cmd)
|
WSAttributes |
getAccountAttributes(java.lang.String accountIdentity)
This method is obsolete. |
AccountIterator |
getAccountIterator()
|
java.lang.Object |
getAttributeValue(java.lang.String name)
These are methods implemented in sources to get and set attributes. |
GenericObject |
getFeatures()
Expose features supported by the Resource Adapter. |
WSUser |
getUser(WSUser user)
Retrieve information about an account, and package it as
a WSUser object. |
void |
init()
Initialize the source adapter. |
java.util.List |
listObjects(java.lang.String objectType,
java.util.Map options)
Returns a list of objects matching the requested objectType and options |
protected void |
logUpdate(int level,
java.util.Map update,
WavesetResult result)
Log whatever we want to from an update. |
int |
poll()
Called at a configurable interval, this polls the remote
resource for changes, converts them to IAPI calls, and posts them
back to the server. |
protected int |
processUpdates(java.util.List list)
Take a list of Maps that are rows of the audit data and turn them
into IAPI calls. |
protected void |
realCreate(WSUser user,
WavesetResult result)
Create a new user account on the resource
This method is called by createAccounts (the multiuser create method). |
protected void |
realDelete(WSUser user,
WavesetResult result)
Needs to be overridden by subclass if default deleteAccounts()
implementation is used. |
protected void |
realDisable(WSUser user,
WavesetResult result)
|
protected void |
realEnable(WSUser user,
WavesetResult result)
|
protected void |
realUpdate(WSUser user,
WavesetResult result)
Needs to be overridden by subclass if default updateAccounts()
implementation is used. |
void |
setAttributeValue(java.lang.String name,
java.lang.Object value)
These are methods implemented in sources to get and set attributes. |
void |
shutdown()
Called once when the adapter is unloaded. |
protected void |
startConnection()
Needs to be overridden by subclass if default createAccounts()
implementation is used. |
static Resource |
staticCreatePrototypeResource()
|
protected void |
stopConnection()
Needs to be overridden by subclass if default createAccounts()
implementation is used. |
boolean |
supportsAccountDisable()
This method indicates to the server that this resource natively supports
account enable and disable. |
boolean |
supportsCaseInsensitiveAccountIds()
This method will return whether the resource adapter supports case
insensitive account Ids or not. |
WavesetResult |
updateObject(GenericObject object,
java.util.Map options)
Updates the specified objectId of type objectType using the list of
attributes provided. |
Methods inherited from class com.waveset.adapter.ResourceAdapterBase |
checkForNoPasswordInSchema, checkSyntax, createAccount, createAccounts, createIdentity, deleteAccount, deleteAccount, deleteAccounts, disableAccount, disableAccounts, dnsEqual, dnsEqual, enableAccount, enableAccounts, executeResourceAttributeJavascriptAction, fillInResourceInfo, fillInResourceInfo, getAccountIterator, getAccountIterator, getAction, getActionNotFoundErrorMessage, getActionNotFoundMessage, getActionRunAsPassword, getActionRunAsUser, getActionTimeout, getActionType, getAdapter, getAdapter, getAdapter, getAdapterProxy, getAdapterProxy, getAllAccounts, getAttrNameFromMapName, getAttrNameFromMapName, getAttrParse, getAttrTypeFromMapName, getAttrTypeFromMapName, getAUserName, getBaseContextAttrName, getBaseContextObject, getBaseContexts, getBlockSize, getContext, getExcludedAccountsRule, getIdentity, getListAllObjectsAttrParse, getListUserAttrParse, getListUserGroupsAttrParse, getObject, getOptionalBooleanResAttrVal, getOptionalBooleanResAttrVal, getOptionalEncryptedResAttrVal, getOptionalResAttrVal, getOptionalStringResAttrVal, getRequiredResAttr, getRequiredResAttr, getRequiredResAttrVal, getRequiredResAttrVal, getRequiredResAttrVals, getRequiredUserAttributeNames, getResAttrValActionOnUser, getResAttrVals, getResource, getResourceAccounts, getResourceInfo, getResourceObjectAttrValNameAttr, getResourceObjectClassAttr, getResourceObjectTypePrefix, getSchemaMap, getUser, getWSAttrByMapName, getWSAttrByMapName, getWSAttrFromMap, handleActionResult, handleJavascriptActionResult, isAccountAttributeSecret, isExcludedAccount, isExcludedAccount, isFeatureEnabled, isSupported, isTestMode, listAllObjects, listAllObjects, listObjects, listObjectsOfType, lookupAction, lookupAction, lookupActions, namesEqual, objectClassesMatchType, println, restoreResourceObjectClassAttr, run, run, runResourceAttributeJavascriptAction, scan, setCache, setContext, setDisabled, setFromResource, setResource, setResourceObjectClassAttr, setResourceOptionAttrs, startConnectionWrapper, supportsAccountActions, supportsActions, supportsContainerObjectTypes, supportsExcludedAccounts, supportsResourceAccount, supportsScanning, testConfiguration, updateAccount, updateAccounts, updateResourceAccount, updateResourceIdentity, vmStoreBoot, vmStoreGet, vmStoreInit, vmStoreLatch, vmStorePut |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
code_id
public static final java.lang.String code_id
- See Also:
- Constant Field Values
RA_HOST
public static final java.lang.String RA_HOST
- Resource attributes are the common names that will be visible in the
GUI that will prompt the user for values. For example, the GUI will
show "host" and have a box next to it for the user to enter a host
name.
The name of the host used to communicate with the resource.
- See Also:
- Constant Field Values
RA_PORT
public static final java.lang.String RA_PORT
- The port on which to communicate to the resource.
- See Also:
- Constant Field Values
RA_USER
public static final java.lang.String RA_USER
- The account name used to connect to the resource.
- See Also:
- Constant Field Values
RA_PASSWORD
public static final java.lang.String RA_PASSWORD
- See Also:
- Constant Field Values
RA_NAME1
public static final java.lang.String RA_NAME1
- Additional resource attributes that need to be defined.
- See Also:
- Constant Field Values
RA_NAME2
public static final java.lang.String RA_NAME2
- See Also:
- Constant Field Values
LOGIN_USER
public static final java.lang.String LOGIN_USER
- Pass thru authentication variables.
Pass thru authentication is a process where a user or administrator
can provide an account name and password which will be sent to the
resource to be validated.
The variables below are used to define the names of the various
pieces of the Lighthouse implementation.
- See Also:
- Constant Field Values
LOGIN_PASSWORD
public static final java.lang.String LOGIN_PASSWORD
- See Also:
- Constant Field Values
DISPLAY_USER
public static final java.lang.String DISPLAY_USER
- See Also:
- Constant Field Values
DISPLAY_PASSWORD
public static final java.lang.String DISPLAY_PASSWORD
- See Also:
- Constant Field Values
RESOURCE_NAME
public static final java.lang.String RESOURCE_NAME
- See Also:
- Constant Field Values
RESOURCE_TYPE
public static final java.lang.String RESOURCE_TYPE
- See Also:
- Constant Field Values
SkeletonStandardAndActiveSyncResourceAdapter
public SkeletonStandardAndActiveSyncResourceAdapter(Resource res,
ObjectCache cache)
SkeletonStandardAndActiveSyncResourceAdapter
public SkeletonStandardAndActiveSyncResourceAdapter()
staticCreatePrototypeResource
public static Resource staticCreatePrototypeResource()
throws WavesetException
- Throws:
WavesetException
createPrototypeResource
public Resource createPrototypeResource()
throws WavesetException
- Specified by:
createPrototypeResource
in interface ResourceAdapter
- Specified by:
createPrototypeResource
in class ResourceAdapterBase
- Throws:
WavesetException
supportsCaseInsensitiveAccountIds
public boolean supportsCaseInsensitiveAccountIds()
- This method will return whether the resource adapter supports case
insensitive account Ids or not. If the resource does support allow case
insensitive names, then this method should be removed as the default
implementation, in ResourceAdapterBase, returns true. If the resource
supports case sensitive names, then this method should be implemented
to return false.
- Specified by:
supportsCaseInsensitiveAccountIds
in interface ResourceAdapter
- Overrides:
supportsCaseInsensitiveAccountIds
in class ResourceAdapterBase
supportsAccountDisable
public boolean supportsAccountDisable()
- This method indicates to the server that this resource natively supports
account enable and disable. If the resource does not natively support
account enable and disable, then this method should be removed as the
default implementation, in ResourceAdapterBase, returns false.
- Specified by:
supportsAccountDisable
in interface ResourceAdapter
- Overrides:
supportsAccountDisable
in class ResourceAdapterBase
getUser
public WSUser getUser(WSUser user)
throws WavesetException
- Retrieve information about an account, and package it as
a WSUser object.
Information required to identify the resource account is supplied
in another WSUser object.
The returned user object will resemble the source object, but
will have its account attribute list filled in.
Returns "null" if there is no account that corresponds to the user.
- Specified by:
getUser
in interface ResourceAdapter
- Overrides:
getUser
in class ResourceAdapterBase
- Throws:
WavesetException
checkCreateAccount
public WavesetResult checkCreateAccount(WSUser user)
throws WavesetException
- Checks to see if an account can be created. Some of the things that
might be checked are as follows:
- can basic connectivity to the resource be established?
- Do the account attribute values comply with all (if any) resource
specific restrictions or policies that haven't been checked at a
higher level?
Currently there are 3 check methods: checkCreateAccount,
checkDeleteAccount and checkUpdate account. All three of these methods
could be performing similar actions, such as ensuring that the resource
is available. These common actions can be moved to a common function
such as doBasicCheck() which any/all check methods could call.
Then the individual check methods would do additional checks
to ensure that user accounts can be added, modified or deleted.
checkCreateAccount is not designed to ensure that the account
creation will succeed, only that the likelyhood of success is good.
checkCreateAccount does not need to check to see if the account already
exists. The provisioner method will follow checkCreateAccount with a
getUser call.
- Specified by:
checkCreateAccount
in interface ResourceAdapter
- Specified by:
checkCreateAccount
in class ResourceAdapterBase
- Throws:
WavesetException
realCreate
protected void realCreate(WSUser user,
WavesetResult result)
throws WavesetException
- Create a new user account on the resource
This method is called by createAccounts (the multiuser create method).
CreateAccounts will open a connection, call realCreate for each user
being created, then close the connection.
- Overrides:
realCreate
in class ResourceAdapterBase
- Throws:
WavesetException
checkUpdateAccount
public WavesetResult checkUpdateAccount(WSUser user)
throws WavesetException
- Specified by:
checkUpdateAccount
in interface ResourceAdapter
- Specified by:
checkUpdateAccount
in class ResourceAdapterBase
- Throws:
WavesetException
realUpdate
protected void realUpdate(WSUser user,
WavesetResult result)
throws WavesetException
- Description copied from class:
ResourceAdapterBase
- Needs to be overridden by subclass if default updateAccounts()
implementation is used.
- Overrides:
realUpdate
in class ResourceAdapterBase
- Throws:
WavesetException
checkDeleteAccount
public WavesetResult checkDeleteAccount(WSUser user)
throws WavesetException
- Specified by:
checkDeleteAccount
in interface ResourceAdapter
- Specified by:
checkDeleteAccount
in class ResourceAdapterBase
- Throws:
WavesetException
realDelete
protected void realDelete(WSUser user,
WavesetResult result)
throws WavesetException
- Description copied from class:
ResourceAdapterBase
- Needs to be overridden by subclass if default deleteAccounts()
implementation is used.
- Overrides:
realDelete
in class ResourceAdapterBase
- Throws:
WavesetException
realEnable
protected void realEnable(WSUser user,
WavesetResult result)
throws WavesetException
- Overrides:
realEnable
in class ResourceAdapterBase
- Throws:
WavesetException
realDisable
protected void realDisable(WSUser user,
WavesetResult result)
throws WavesetException
- Overrides:
realDisable
in class ResourceAdapterBase
- Throws:
WavesetException
getAccountAttributes
public WSAttributes getAccountAttributes(java.lang.String accountIdentity)
throws WavesetException
- Description copied from interface:
ResourceAdapter
- This method is obsolete. ResourceAdapterBase provides a default
implementation that throws a "not implemented" WavesetException.
- Specified by:
getAccountAttributes
in interface ResourceAdapter
- Overrides:
getAccountAttributes
in class ResourceAdapterBase
- Throws:
WavesetException
getAccountIterator
public AccountIterator getAccountIterator()
throws WavesetException
- Specified by:
getAccountIterator
in interface ResourceAdapter
- Overrides:
getAccountIterator
in class ResourceAdapterBase
- 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
- Overrides:
createObject
in class ResourceAdapterBase
- Parameters:
object
- - a GenericObject containing the objectType, objectId,
and list of attributes to be set on the new objectoptions
- - 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.
-
"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".
-
"searchTimeLimit" - the timelimit in milliseconds a
search should not exceed
(ResourceAdapter.RA_SEARCH_TIME_LIMIT).
-
"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).
- 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
- Overrides:
updateObject
in class ResourceAdapterBase
- Parameters:
object
- - a GenericObject containing the objectType, objectId,
and list of new and changed attributes to be set on the
objectoptions
- - 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.
-
"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".
-
"searchTimeLimit" - the timelimit in milliseconds a
search should not exceed
(ResourceAdapter.RA_SEARCH_TIME_LIMIT).
-
"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).
- Throws:
WavesetException
doCreateOrUpdateObjectRequest
protected WavesetResult doCreateOrUpdateObjectRequest(java.lang.String objectType,
java.lang.String objectId,
GenericObject attributes,
java.util.Map options,
java.lang.String cmd)
throws WavesetException
- 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
- Overrides:
deleteObject
in class ResourceAdapterBase
- Parameters:
object
- - Object to delete.options
- - Map containing objectType and objectId of object to
delete.
- Throws:
WavesetException
listObjects
public java.util.List listObjects(java.lang.String objectType,
java.util.Map options)
throws WavesetException
- Returns a list of objects matching the requested objectType and options
- Specified by:
listObjects
in interface ResourceAdapter
- Overrides:
listObjects
in class ResourceAdapterBase
- Parameters:
objectType
- - the name of a valid object class for this
specified "resId".options
- - several options can be specified which control the
behavior of the search. They include:
"searchContext" - the value of this option determines
within what context to perform search
(ResourceAdapter.RA_SEARCH_CONTEXT). If not specified,
will attempt to get a value from RA_BASE_CONTEXT. If
no value, will assume search should be done from
logical top.
-
"searchFilter" - optional specification, in LDAP search
filter format as specified in RFC 1558, of one or more
object tuples either
and'ed or or'ed together. If not specified, a filter
will be constructed using the specified objectType.
(ResourceAdapter.SEARCH_FILTER).
-
"searchScope" - specifies whether the search should be
done on the current object, only within the context of
the specified "searchContext", or in all subcontext
within the specified "searchContext"
(ResourceAdapter.RA_SEARCH_SCOPE). Valid values are
"object", "oneLevel", or "subTree" indicates that the
search should be performed on all sub contexts within
the specified "searchContext".
-
"searchTimeLimit" - the timelimit in milliseconds a
search should not exceed
(ResourceAdapter.RA_SEARCH_TIME_LIMIT).
-
"searchAttrsToGet" - the list of objectType specific
attribute names to get per object
-
"runAsUser" - user name this request is to be run as.
If not specified, defaults to resource proxy admin user.
-
"runAsPassword" - password of runAsUser. Required to
authenticate with resource in order to run the list
request as the specified user
- Throws:
WavesetException
authenticate
public WavesetResult authenticate(java.util.HashMap loginInfo)
throws WavesetException
- Authenticates the user against the resource. Return the authenticated id
if authentication succeeds.
The authenticate method is used to verify a user account and password are
valid. If the user account name does not exist on the resource, the
password does not match, or multiple matches exist, then throw an
exception.
If the resource has multiple contexts (for example LDAP or NDS), the
authenticate method should not stop when it finds the first match,
instead it should continue through the entire list. If it finds more
than one match, then an exception should be thrown.
- Specified by:
authenticate
in interface ResourceAdapter
- Specified by:
authenticate
in class ResourceAdapterBase
- Throws:
WavesetException
startConnection
protected void startConnection()
throws WavesetException
- Description copied from class:
ResourceAdapterBase
- Needs to be overridden by subclass if default createAccounts()
implementation is used.
- Overrides:
startConnection
in class ResourceAdapterBase
- Throws:
WavesetException
stopConnection
protected void stopConnection()
throws WavesetException
- Description copied from class:
ResourceAdapterBase
- Needs to be overridden by subclass if default createAccounts()
implementation is used.
- Overrides:
stopConnection
in class ResourceAdapterBase
- Throws:
WavesetException
getAttributeValue
public java.lang.Object getAttributeValue(java.lang.String name)
throws WavesetException
- These are methods implemented in sources to get and set attributes.
Since this is a source with a resource, just pass the calls through.
- Specified by:
getAttributeValue
in interface ActiveSync
- Throws:
WavesetException
setAttributeValue
public void setAttributeValue(java.lang.String name,
java.lang.Object value)
throws WavesetException
- These are methods implemented in sources to get and set attributes.
Since this is a source with a resource, just pass the calls through.
- Specified by:
setAttributeValue
in interface ActiveSync
- Throws:
WavesetException
init
public void init()
throws java.lang.Exception
- Initialize the source adapter. Throw exception if initialization failed
and the adapter will not be loaded. After init, poll() will be called
at each scheduling interval and shutdown() when the adapter is unloaded.
- Specified by:
init
in interface ActiveSync
- Throws:
java.lang.Exception
shutdown
public void shutdown()
- Called once when the adapter is unloaded. This is where you can cleanup
sockets, etc. If the server is just shutdown, though, this is not called.
- Specified by:
shutdown
in interface ActiveSync
processUpdates
protected int processUpdates(java.util.List list)
throws WavesetException,
com.waveset.adapter.iapi.IAPIException
- Take a list of Maps that are rows of the audit data and turn them
into IAPI calls.
- Parameters:
list
- - a List of Map objects from getUpdateRows.
- Throws:
WavesetException
com.waveset.adapter.iapi.IAPIException
poll
public int poll()
- Called at a configurable interval, this polls the remote
resource for changes, converts them to IAPI calls, and posts them
back to the server.
- Specified by:
poll
in interface ActiveSync
- Returns:
- 0 if no work done, n if n calls processed
logUpdate
protected void logUpdate(int level,
java.util.Map update,
WavesetResult result)
- Log whatever we want to from an update.
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
- Overrides:
getFeatures
in class ResourceAdapterBase
- Returns:
- GenericObject containing Features, as both key and value, which
are supported by this resource adapter.
- See Also:
ResourceAdapter.Features