com.waveset.adapter.sample
Class SkeletonActiveSyncResourceAdapter

java.lang.Object
  extended bycom.waveset.adapter.ResourceAdapterBase
      extended bycom.waveset.adapter.sample.SkeletonActiveSyncResourceAdapter
All Implemented Interfaces:
ActiveSync, ResourceAdapter

public class SkeletonActiveSyncResourceAdapter
extends ResourceAdapterBase
implements ActiveSync

Active Sync only adapter, for reference purposes only.


Nested Class Summary
 
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 code_id
           
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_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
 
Constructor Summary
SkeletonActiveSyncResourceAdapter()
           
 
Method Summary
 WavesetResult authenticate(java.util.HashMap loginInfo)
          Implementation currently required, but will not be invoked
 WavesetResult checkCreateAccount(WSUser user)
          Implementation currently required, but will not be invoked
 WavesetResult checkDeleteAccount(WSUser user)
          Implementation currently required, but will not be invoked
 WavesetResult checkUpdateAccount(WSUser user)
          Implementation currently required, but will not be invoked
 Resource createPrototypeResource()
           
 java.lang.Object getAttributeValue(java.lang.String name)
          This is implemented in sources to get attributes.
 GenericObject getFeatures()
          Expose features supported by the Resource Adapter.
protected  java.util.List getUpdateRows(java.util.Map lastProcessedRow)
          todo - implement this method.
 void init()
          Initialize the source adapter.
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.
 void setAttributeValue(java.lang.String name, java.lang.Object value)
          This is implemented in sources to set attributes.
 void shutdown()
          Called once when the adapter is unloaded.
static Resource staticCreatePrototypeResource()
           
 
Methods inherited from class com.waveset.adapter.ResourceAdapterBase
checkForNoPasswordInSchema, checkSyntax, createAccount, createAccounts, createIdentity, createObject, deleteAccount, deleteAccount, deleteAccounts, deleteObject, disableAccount, disableAccounts, dnsEqual, dnsEqual, enableAccount, enableAccounts, executeResourceAttributeJavascriptAction, fillInResourceInfo, fillInResourceInfo, getAccountAttributes, getAccountIterator, 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, getUser, getWSAttrByMapName, getWSAttrByMapName, getWSAttrFromMap, handleActionResult, handleJavascriptActionResult, isAccountAttributeSecret, isExcludedAccount, isExcludedAccount, isFeatureEnabled, isSupported, isTestMode, listAllObjects, listAllObjects, listObjects, listObjects, listObjectsOfType, lookupAction, lookupAction, lookupActions, namesEqual, objectClassesMatchType, println, realCreate, realDelete, realDisable, realEnable, realUpdate, restoreResourceObjectClassAttr, run, run, runResourceAttributeJavascriptAction, scan, setCache, setContext, setDisabled, setFromResource, setResource, setResourceObjectClassAttr, setResourceOptionAttrs, startConnection, startConnectionWrapper, stopConnection, supportsAccountActions, supportsAccountDisable, supportsActions, supportsCaseInsensitiveAccountIds, supportsContainerObjectTypes, supportsExcludedAccounts, supportsResourceAccount, supportsScanning, testConfiguration, updateAccount, updateAccounts, updateObject, 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
 

Field Detail

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

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
Constructor Detail

SkeletonActiveSyncResourceAdapter

public SkeletonActiveSyncResourceAdapter()
Method Detail

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

getAttributeValue

public java.lang.Object getAttributeValue(java.lang.String name)
                                   throws WavesetException
This is implemented in sources to get attributes. Since this is a source with a resource, just pass the call through.

Specified by:
getAttributeValue in interface ActiveSync
Throws:
WavesetException

setAttributeValue

public void setAttributeValue(java.lang.String name,
                              java.lang.Object value)
                       throws WavesetException
This is implemented in sources to set attributes. Since this is a source with a resource, just pass the call 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 may not be called.

Specified by:
shutdown in interface ActiveSync

getUpdateRows

protected java.util.List getUpdateRows(java.util.Map lastProcessedRow)
todo - implement this method. Called by poll(), this is what gathers the changes on the resource.

Parameters:
lastProcessedRow - Map identifying the last change processed, used to limit the rows returned (if supported).
Returns:
a List of Maps, each containing what you need to build an IAPI and update a user or other object

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.


checkCreateAccount

public WavesetResult checkCreateAccount(WSUser user)
                                 throws WavesetException
Implementation currently required, but will not be invoked

Specified by:
checkCreateAccount in interface ResourceAdapter
Specified by:
checkCreateAccount in class ResourceAdapterBase
Throws:
WavesetException

checkUpdateAccount

public WavesetResult checkUpdateAccount(WSUser user)
                                 throws WavesetException
Implementation currently required, but will not be invoked

Specified by:
checkUpdateAccount in interface ResourceAdapter
Specified by:
checkUpdateAccount in class ResourceAdapterBase
Throws:
WavesetException

checkDeleteAccount

public WavesetResult checkDeleteAccount(WSUser user)
                                 throws WavesetException
Implementation currently required, but will not be invoked

Specified by:
checkDeleteAccount in interface ResourceAdapter
Specified by:
checkDeleteAccount in class ResourceAdapterBase
Throws:
WavesetException

authenticate

public WavesetResult authenticate(java.util.HashMap loginInfo)
                           throws WavesetException
Implementation currently required, but will not be invoked

Specified by:
authenticate in interface ResourceAdapter
Specified by:
authenticate in class ResourceAdapterBase
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
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