com.waveset.adapter
Class SiebelResourceAdapter

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

public class SiebelResourceAdapter
extends ResourceAdapterBase
implements ActiveSync


Nested Class Summary
protected  class SiebelResourceAdapter.AcctIter
           
 
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
protected  ActiveSyncUtil _util
           
static java.lang.String CLASS
           
static java.lang.String CONTACT
           
static java.lang.String CONTACT_NAME
           
static java.lang.String EMLOYEE_NAME
           
static java.lang.String EMPLOYEE
           
static java.lang.String FILTER_SUFFIX
           
static java.lang.String LOGIN_PASSWORD
           
static java.lang.String LOGIN_USER
           
static java.lang.String NAME
           
static java.lang.String POSITION
           
static java.lang.String RA_ACCOUNT_OBJECT
           
static java.lang.String RA_APPLICATION_OBJ_MGR
           
static java.lang.String RA_CODE_PAGE
           
static java.lang.String RA_COMP_TYPE_RULE
           
static java.lang.String RA_EMPLOYEE_FILTER
           
static java.lang.String RA_ENTERPRISE_SERVER
           
static java.lang.String RA_FILE_ENCODING
           
static java.lang.String RA_HOST
           
static java.lang.String RA_MVG_ATTRIB_RULE
           
static java.lang.String RA_NAME_ATTRIB_RULE
           
static java.lang.String RA_OBJ_TYPE_RULE
           
static java.lang.String RA_PASSWORD
           
static java.lang.String RA_PICKLIST_ATTRIB_RULE
           
static java.lang.String RA_PORT
           
static java.lang.String RA_POSITION_FILTER
           
static java.lang.String RA_SIEBEL_SERVER
           
static java.lang.String RA_SIEBEL_URL
           
static java.lang.String RA_SINGLETON_MVG_ATTRIB_RULE
           
static java.lang.String RA_USER
           
static java.lang.String RESOURCE_LOGIN_MODULE
           
static java.lang.String RESOURCE_NAME
           
static java.lang.String RESOURCE_USER_FORM
           
static java.lang.String RESPONSIBILITY
           
static java.lang.String UPDATED
           
 
Fields inherited from class com.waveset.adapter.ResourceAdapterBase
_cache, _context, _excludedAccountsRule, _excludedAccountsRuleInited, _listAllObjectsAttrParse, _listAllObjectsAttrParseName, _listUserAttrParse, _listUserAttrParseName, _listUserGroupsAttrParse, _listUserGroupsAttrParseName, _resource, _thread, _trace, code_id, 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, code_id, 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
SiebelResourceAdapter()
           
SiebelResourceAdapter(Resource res, ObjectCache cache)
           
 
Method Summary
 WavesetResult authenticate(java.util.HashMap loginInfo)
          Authenticates the user against the Siebel user, by attempting to login to the SiebelDataBean using the supplied login info.
 WavesetResult checkCreateAccount(WSUser user)
           
 WavesetResult checkDeleteAccount(WSUser user)
           
 WavesetResult checkUpdateAccount(WSUser user)
           
 WavesetResult createObject(GenericObject object, java.util.Map options)
          Creates the specified object 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  java.lang.String formatTemplateUrl(java.lang.String template)
          Format a URL given a template.
 AccountIterator getAccountIterator()
           
 java.lang.Object getAttributeValue(java.lang.String name)
          Get or set an attribute value for the ActiveSync.
 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 object from the resource
 SiebelDataBean getSiebelDataBean()
          Creates a connected instance of the SiebelDataBean using the credential specified in the resource definition XML.
 SiebelDataBean getSiebelDataBean(java.lang.String user, EncryptedData ePassword)
          Creates a connected instance of the SiebelDataBean using the passed in credentials and information contained within the Resource definition XML.
 WSUser getUser(WSUser user)
          Retrieves account information from the Sieble resource for the specified WSUser and returns a new WSUser based on the information from the resource.
 void init()
          initialize yourself.
static boolean isSiebel6()
          Utility method to determine if the SiebelDataBean within this JVM's classpath comes from Siebel version 6 or version 7.
 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.
protected  java.util.ArrayList listAllSiebelObjects(SiebelDataBean dataBean, java.lang.String type)
          Utility method to run a query to list all siebel object names of a given type.
protected  java.util.ArrayList listAllSiebelObjects(SiebelDataBean dataBean, java.lang.String type, java.util.List attrsToGet, java.lang.String searchFilter)
          Utility method to run a query to list all siebel objects of a given type.
 java.util.List listObjects(java.lang.String objectType, java.util.Map options)
          Returns a list of objects matching the requested objectType and options
 void logoff(SiebelDataBean dataBean)
          Logoff a connected SiebelDataBean.
protected  GenericObject mapSiebelAttributes(java.lang.String objectType, java.lang.String objectId, java.util.List attrsToGet, SiebelBusComp busComp, GenericObject attrs)
          Maps the attributes contained within a SiebelBusComp to a Lighthouse GenericObject.
 int poll()
          The poll method.
protected  boolean processUser(WSUser user)
          Called for each active sync update discovered
protected  void realCreate(WSUser user, WavesetResult result)
          Create a new user account on the resource.
protected  void realDelete(WSUser user, WavesetResult result)
          Delete a user account on the resource.
protected  void realUpdate(WSUser user, WavesetResult result)
          Update a user account on the resource.
 void setAttributeValue(java.lang.String name, java.lang.Object value)
           
protected  void setMVGSiebelAttribute(SiebelBusComp busComp, java.lang.String attrName, java.lang.Object attrValue)
          Utility method to set a MVG attribute on a SiebelBusComp.
protected  void setPickListSiebelAttribute(SiebelBusComp busComp, java.lang.String attrName, java.lang.String value)
          Utility method to set a pick list attribute on a SiebelBusComp
protected  SiebelBusComp setSiebelAttributes(java.lang.String objectType, java.lang.String objectId, SiebelBusComp busComp, GenericObject attrs)
          Maps the attributes contained within a Lighthouse GenericObject to a Siebel Business Component.
protected  void setSingleMVGSiebelAttribute(SiebelBusComp busComp, java.lang.String attrName, java.lang.String attrValue)
           
 void shutdown()
          shutdown
protected  void startConnection()
          Does nothing since the SiebelDataBean manages an internal connection pool.
static Resource staticCreatePrototypeResource()
           
protected  void stopConnection()
          Does nothing since the SiebelDataBean manages an internal connection pool.
 boolean supportsExcludedAccounts()
           
 WavesetResult testConfiguration()
          Method called when the "test connection" button of menu item is hit on the adapter configuration page.
 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, getAccountAttributes, 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, 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, listObjects, listObjectsOfType, lookupAction, lookupAction, lookupActions, namesEqual, objectClassesMatchType, println, realDisable, realEnable, restoreResourceObjectClassAttr, run, run, runResourceAttributeJavascriptAction, scan, setCache, setContext, setDisabled, setFromResource, setResource, setResourceObjectClassAttr, setResourceOptionAttrs, startConnectionWrapper, supportsAccountActions, supportsAccountDisable, supportsActions, supportsCaseInsensitiveAccountIds, supportsContainerObjectTypes, supportsResourceAccount, supportsScanning, 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
 

Field Detail

CLASS

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

RESOURCE_NAME

public static final java.lang.String RESOURCE_NAME
See Also:
Constant Field Values

RESOURCE_USER_FORM

public static final java.lang.String RESOURCE_USER_FORM
See Also:
Constant Field Values

RESOURCE_LOGIN_MODULE

public static final java.lang.String RESOURCE_LOGIN_MODULE
See Also:
Constant Field Values

EMPLOYEE

public static final java.lang.String EMPLOYEE
See Also:
Constant Field Values

EMLOYEE_NAME

public static final java.lang.String EMLOYEE_NAME
See Also:
Constant Field Values

CONTACT

public static final java.lang.String CONTACT
See Also:
Constant Field Values

CONTACT_NAME

public static final java.lang.String CONTACT_NAME
See Also:
Constant Field Values

RESPONSIBILITY

public static final java.lang.String RESPONSIBILITY
See Also:
Constant Field Values

POSITION

public static final java.lang.String POSITION
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

UPDATED

public static final java.lang.String UPDATED
See Also:
Constant Field Values

RA_HOST

public static final java.lang.String RA_HOST
See Also:
Constant Field Values

RA_PORT

public static final java.lang.String RA_PORT
See Also:
Constant Field Values

RA_USER

public static final java.lang.String RA_USER
See Also:
Constant Field Values

RA_PASSWORD

public static final java.lang.String RA_PASSWORD
See Also:
Constant Field Values

RA_SIEBEL_URL

public static final java.lang.String RA_SIEBEL_URL
See Also:
Constant Field Values

RA_ENTERPRISE_SERVER

public static final java.lang.String RA_ENTERPRISE_SERVER
See Also:
Constant Field Values

RA_SIEBEL_SERVER

public static final java.lang.String RA_SIEBEL_SERVER
See Also:
Constant Field Values

RA_APPLICATION_OBJ_MGR

public static final java.lang.String RA_APPLICATION_OBJ_MGR
See Also:
Constant Field Values

RA_ACCOUNT_OBJECT

public static final java.lang.String RA_ACCOUNT_OBJECT
See Also:
Constant Field Values

RA_OBJ_TYPE_RULE

public static final java.lang.String RA_OBJ_TYPE_RULE
See Also:
Constant Field Values

RA_COMP_TYPE_RULE

public static final java.lang.String RA_COMP_TYPE_RULE
See Also:
Constant Field Values

RA_NAME_ATTRIB_RULE

public static final java.lang.String RA_NAME_ATTRIB_RULE
See Also:
Constant Field Values

RA_MVG_ATTRIB_RULE

public static final java.lang.String RA_MVG_ATTRIB_RULE
See Also:
Constant Field Values

RA_SINGLETON_MVG_ATTRIB_RULE

public static final java.lang.String RA_SINGLETON_MVG_ATTRIB_RULE
See Also:
Constant Field Values

RA_PICKLIST_ATTRIB_RULE

public static final java.lang.String RA_PICKLIST_ATTRIB_RULE
See Also:
Constant Field Values

RA_FILE_ENCODING

public static final java.lang.String RA_FILE_ENCODING
See Also:
Constant Field Values

RA_CODE_PAGE

public static final java.lang.String RA_CODE_PAGE
See Also:
Constant Field Values

FILTER_SUFFIX

public static final java.lang.String FILTER_SUFFIX
See Also:
Constant Field Values

RA_EMPLOYEE_FILTER

public static final java.lang.String RA_EMPLOYEE_FILTER
See Also:
Constant Field Values

RA_POSITION_FILTER

public static final java.lang.String RA_POSITION_FILTER
See Also:
Constant Field Values

LOGIN_USER

public static final java.lang.String LOGIN_USER
See Also:
Constant Field Values

LOGIN_PASSWORD

public static final java.lang.String LOGIN_PASSWORD
See Also:
Constant Field Values

_util

protected ActiveSyncUtil _util
Constructor Detail

SiebelResourceAdapter

public SiebelResourceAdapter(Resource res,
                             ObjectCache cache)

SiebelResourceAdapter

public SiebelResourceAdapter()
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

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

supportsExcludedAccounts

public boolean supportsExcludedAccounts()
Specified by:
supportsExcludedAccounts in interface ResourceAdapter
Overrides:
supportsExcludedAccounts in class ResourceAdapterBase

isSiebel6

public static boolean isSiebel6()
Utility method to determine if the SiebelDataBean within this JVM's classpath comes from Siebel version 6 or version 7.

Returns:
true if the adapter is using the version 6 API.

getSiebelDataBean

public SiebelDataBean getSiebelDataBean()
                                 throws WavesetException
Creates a connected instance of the SiebelDataBean using the credential specified in the resource definition XML.

Throws:
WavesetException

formatTemplateUrl

protected java.lang.String formatTemplateUrl(java.lang.String template)
                                      throws WavesetException
Format a URL given a template. Recognized template characters are:
   %  literal %
   h  host
   p  port
   e  Siebel Enterprise Server
   o  Siebel Application Object Manager
   s  Siebe Server
 

Throws:
WavesetException

getSiebelDataBean

public SiebelDataBean getSiebelDataBean(java.lang.String user,
                                        EncryptedData ePassword)
                                 throws WavesetException
Creates a connected instance of the SiebelDataBean using the passed in credentials and information contained within the Resource definition XML.

Throws:
WavesetException

logoff

public void logoff(SiebelDataBean dataBean)
Logoff a connected SiebelDataBean.

Parameters:
dataBean -

testConfiguration

public WavesetResult testConfiguration()
                                throws WavesetException
Method called when the "test connection" button of menu item is hit on the adapter configuration page. The connection is tested by instantiating the SiebelDataBean and attempting to login with the credentials specified in the adapter configuration.

Specified by:
testConfiguration in interface ResourceAdapter
Overrides:
testConfiguration in class ResourceAdapterBase
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.
  1. "siebelSearchFilter" - optional specification, specifiecs the the search expression to be applied to the the Siebel Business component that is being listed. The syntax is descripbed in "Siebel Object Interfaces Reference" and "Siebel Tools Reference - Appendex E".
  2. "searchAttrsToGet" - the list of objectType specific attribute names to get per object
  3. "runAsUser" - user name this request is to be run as. If not specified, defaults to resource proxy admin user.
  4. "runAsPassword" - password of runAsUser. Required to authenticate with resource in order to run the list request as the specified user
Throws:
WavesetException

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
Overrides:
listAllObjects in class ResourceAdapterBase
Parameters:
objectType - - 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 options
runAsUser - - (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.
Returns:
a list of all object names of a specified type.
Throws:
WavesetException

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 object from the resource

Specified by:
getObject in interface ResourceAdapter
Overrides:
getObject in class ResourceAdapterBase
Parameters:
objectId - - the name of the Siebel object
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 object using the list of attributes provided.

Specified by:
createObject in interface ResourceAdapter
Overrides:
createObject in class ResourceAdapterBase
Parameters:
options - - not currently used.
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
Overrides:
updateObject in class ResourceAdapterBase
Parameters:
options - - not currently used.
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
Overrides:
deleteObject in class ResourceAdapterBase
Parameters:
options - - not currently used because the objectId and objectType parameters uniquely identify the object to delete.
Throws:
WavesetException

mapSiebelAttributes

protected GenericObject mapSiebelAttributes(java.lang.String objectType,
                                            java.lang.String objectId,
                                            java.util.List attrsToGet,
                                            SiebelBusComp busComp,
                                            GenericObject attrs)
                                     throws SiebelException,
                                            WavesetException
Maps the attributes contained within a SiebelBusComp to a Lighthouse GenericObject.

Parameters:
objectType - - The type of object contained within the SiebelBusComp.
objectId - - The name of the object contained within the SiebelBusComp.
attrsToGet - - A List of Strings containing the attribute names that need to be copied from the SiebelBusComp to the Lighthouse GenericObject. The Siebel API has not introspection mechanism to discover the attributes contained with the object. Consequently, no attributes will be copied if none are specified.
busComp - - The Siebel business componeent containing the attributes to be copied.
attrs - - The Lighthouse GenericObject to copy the attributes into. If null, a GenericObject will be instantiated and returned.
Returns:
The GenericObject containing the attributes.
Throws:
SiebelException, - WavesetException
SiebelException
WavesetException

setSiebelAttributes

protected SiebelBusComp setSiebelAttributes(java.lang.String objectType,
                                            java.lang.String objectId,
                                            SiebelBusComp busComp,
                                            GenericObject attrs)
                                     throws WavesetException
Maps the attributes contained within a Lighthouse GenericObject to a Siebel Business Component.

Parameters:
objectType - - The type of object contained within the SiebelBusComp.
objectId - - The name of the object contained within the SiebelBusComp.
busComp - - The Siebel business componeent to have attributes written to.
attrs - - The Lighthouse GenericObject to copy the attributes from.
Returns:
The modified SiebelBusComp
Throws:
SiebelException
WavesetException

setMVGSiebelAttribute

protected void setMVGSiebelAttribute(SiebelBusComp busComp,
                                     java.lang.String attrName,
                                     java.lang.Object attrValue)
                              throws SiebelException,
                                     WavesetException
Utility method to set a MVG attribute on a SiebelBusComp.

Parameters:
busComp - The Siebel business component to be written to.
attrName - The name of the MVG attribute.
attrValue - The value to be set to the MVG attribute.
Throws:
SiebelException
WavesetException

setSingleMVGSiebelAttribute

protected void setSingleMVGSiebelAttribute(SiebelBusComp busComp,
                                           java.lang.String attrName,
                                           java.lang.String attrValue)
                                    throws SiebelException,
                                           WavesetException
Throws:
SiebelException
WavesetException

setPickListSiebelAttribute

protected void setPickListSiebelAttribute(SiebelBusComp busComp,
                                          java.lang.String attrName,
                                          java.lang.String value)
                                   throws SiebelException,
                                          WavesetException
Utility method to set a pick list attribute on a SiebelBusComp

Parameters:
busComp - The Siebel business component to be written to.
attrName - The name of the pick list attribute.
value - The value to be written to the pick list attribute.
Throws:
SiebelException
WavesetException

checkCreateAccount

public WavesetResult checkCreateAccount(WSUser user)
                                 throws WavesetException
Specified by:
checkCreateAccount in interface ResourceAdapter
Specified by:
checkCreateAccount 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

checkDeleteAccount

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

getUser

public WSUser getUser(WSUser user)
               throws WavesetException
Retrieves account information from the Sieble 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
Overrides:
getUser 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

realUpdate

protected void realUpdate(WSUser user,
                          WavesetResult result)
                   throws WavesetException
Update a user account on the resource.

Overrides:
realUpdate in class ResourceAdapterBase
Throws:
WavesetException

realDelete

protected void realDelete(WSUser user,
                          WavesetResult result)
                   throws WavesetException
Delete a user account on the resource.

Overrides:
realDelete in class ResourceAdapterBase
Throws:
WavesetException

getAccountIterator

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

authenticate

public WavesetResult authenticate(java.util.HashMap loginInfo)
                           throws WavesetException
Authenticates the user against the Siebel user, by attempting to login to the SiebelDataBean using the supplied login info. 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
Specified by:
authenticate in class ResourceAdapterBase
Throws:
WavesetException

startConnection

protected void startConnection()
                        throws WavesetException
Does nothing since the SiebelDataBean manages an internal connection pool.

Overrides:
startConnection in class ResourceAdapterBase
Throws:
WavesetException

stopConnection

protected void stopConnection()
                       throws WavesetException
Does nothing since the SiebelDataBean manages an internal connection pool.

Overrides:
stopConnection in class ResourceAdapterBase
Throws:
WavesetException

listAllSiebelObjects

protected java.util.ArrayList listAllSiebelObjects(SiebelDataBean dataBean,
                                                   java.lang.String type)
                                            throws WavesetException
Utility method to run a query to list all siebel object names of a given type.

Parameters:
dataBean - The connection to the Siebel server to make the call through.
type - The type of object to be listed.
Returns:
A List of object names returned from the query.
Throws:
WavesetException

listAllSiebelObjects

protected java.util.ArrayList listAllSiebelObjects(SiebelDataBean dataBean,
                                                   java.lang.String type,
                                                   java.util.List attrsToGet,
                                                   java.lang.String searchFilter)
                                            throws WavesetException
Utility method to run a query to list all siebel objects of a given type.

Parameters:
dataBean - The connection to the Siebel server to make the call through.
type - The type of object to be listed.
attrsToGet - The attributes to retrieve for the given object.
searchFilter - Optionally filter the results with a search specification.
Returns:
A List of GenericObjects representing the given Siebel objects and their attributes if attrsToGet was specified. If attrsToGet is null, then the List only contains the object names.
Throws:
WavesetException

init

public void init()
          throws java.lang.Exception
Description copied from interface: ActiveSync
initialize yourself. throw exception if initialization failed

Specified by:
init in interface ActiveSync
Throws:
java.lang.Exception

getAttributeValue

public java.lang.Object getAttributeValue(java.lang.String name)
                                   throws WavesetException
Description copied from interface: ActiveSync
Get or set an attribute value for the ActiveSync. Setting an attribute value only changes the in-memory copy of the attribute, not the persistent value. Set is typically only used for status or scheduling updates.

Specified by:
getAttributeValue in interface ActiveSync
Throws:
WavesetException

setAttributeValue

public void setAttributeValue(java.lang.String name,
                              java.lang.Object value)
                       throws WavesetException
Specified by:
setAttributeValue in interface ActiveSync
Throws:
WavesetException

shutdown

public void shutdown()
Description copied from interface: ActiveSync
shutdown

Specified by:
shutdown in interface ActiveSync

poll

public int poll()
Description copied from interface: ActiveSync
The poll method. Called at a configurable interval, this
  1. polls the remote resource for changes,
  2. converts them to IAPI calls, and
  3. posts them back to the server.

Specified by:
poll in interface ActiveSync
Returns:
0 if no work done, n if n calls processed.

processUser

protected boolean processUser(WSUser user)
Called for each active sync update discovered