|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.adapter.ResourceAdapterBase
com.waveset.adapter.SiebelCRMResourceAdapter
Resource adapter written for managing a Siebel server. The adapter utilizes the SiebelDataBean Java API for managing the Siebel server. A majority of the adapter implementation concentrates on mapping IdM's notion of Resource Objects, and Resource Accounts to Siebel Business Components and the SiebelBusComp API. Please consult your Siebel documentation for more information. This adapter may require permission to set the file.encoding System property. If so, under JDK 1.4 you will need the following line in the java.policy file:
grant codeBase "file:${catalina.home}/webapps/lighthouse/WEB-INF/lib/-" { permission java.util.PropertyPermission "file.encoding", "read,write"; };
Nested Class Summary | |
protected class |
SiebelCRMResourceAdapter.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 |
code_id
|
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 |
PARENT_COMP_ID
Reserved acct attribute name used to indicate the parent component's id |
static java.lang.String |
POSITION
|
static java.lang.String |
RA_ACCOUNT_FILTER
|
static java.lang.String |
RA_ADVANCED_NAV_RULE
|
static java.lang.String |
RA_APPLICATION_OBJ_MGR
|
static java.lang.String |
RA_BUSINESS_COMPONENT_NAME
|
static java.lang.String |
RA_BUSINESS_COMPONENT_SEARCH_ATTR
|
static java.lang.String |
RA_BUSINESS_OBJECT_NAME
|
static java.lang.String |
RA_CODE_PAGE
|
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_NAME_ATTRIB_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_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, displayInfoCode, RA_BLOCKCOUNT, RA_LOGIN_ACTION, RA_LOGOFF_ACTION, RA_MULTI_VALUED_ATTRS, RA_TEST_MODE |
Constructor Summary | |
SiebelCRMResourceAdapter()
|
|
SiebelCRMResourceAdapter(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. |
WavesetResult |
createObjectInternal(GenericObject object,
java.util.Map options)
|
Resource |
createPrototypeResource()
|
WavesetResult |
deleteObject(GenericObject object,
java.util.Map options)
Deletes the requested objectId of the requested objectType from the resource. |
WavesetResult |
deleteObjectInternal(GenericObject object,
java.util.Map options)
|
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 resourceObjectType,
java.lang.String objectId,
java.util.List attrsToGet,
java.util.Map options)
Returns the requested object from the resource |
GenericObject |
getObjectInternal(java.lang.String resourceObjectType,
com.waveset.adapter.SiebelCRMResourceAdapter.Locator locator,
java.util.List attrsToGet,
java.util.Map options)
|
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 resourceObjectType,
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 resourceObjectType,
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 fullAttrName,
java.util.List attrValue,
java.lang.String primaryValue)
Utility method to set a MVG attribute on a SiebelBusComp. |
protected void |
setPickListSiebelAttribute(SiebelBusComp busComp,
java.lang.String fullAttrName,
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. |
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. |
WavesetResult |
updateObjectInternal(GenericObject object,
java.util.Map options)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
public static final java.lang.String CLASS
public static final java.lang.String RESOURCE_NAME
public static final java.lang.String RESOURCE_USER_FORM
public static final java.lang.String RESOURCE_LOGIN_MODULE
public static final java.lang.String EMPLOYEE
public static final java.lang.String EMLOYEE_NAME
public static final java.lang.String CONTACT
public static final java.lang.String CONTACT_NAME
public static final java.lang.String RESPONSIBILITY
public static final java.lang.String POSITION
public static final java.lang.String NAME
public static final java.lang.String UPDATED
public static final java.lang.String RA_HOST
public static final java.lang.String RA_PORT
public static final java.lang.String RA_USER
public static final java.lang.String RA_PASSWORD
public static final java.lang.String RA_SIEBEL_URL
public static final java.lang.String RA_ENTERPRISE_SERVER
public static final java.lang.String RA_SIEBEL_SERVER
public static final java.lang.String RA_BUSINESS_COMPONENT_NAME
public static final java.lang.String RA_BUSINESS_OBJECT_NAME
public static final java.lang.String RA_BUSINESS_COMPONENT_SEARCH_ATTR
public static final java.lang.String RA_ADVANCED_NAV_RULE
public static final java.lang.String RA_APPLICATION_OBJ_MGR
public static final java.lang.String RA_NAME_ATTRIB_RULE
public static final java.lang.String RA_PICKLIST_ATTRIB_RULE
public static final java.lang.String RA_FILE_ENCODING
public static final java.lang.String RA_CODE_PAGE
public static final java.lang.String FILTER_SUFFIX
public static final java.lang.String RA_ACCOUNT_FILTER
public static final java.lang.String RA_POSITION_FILTER
public static final java.lang.String LOGIN_USER
public static final java.lang.String LOGIN_PASSWORD
public static final java.lang.String PARENT_COMP_ID
protected ActiveSyncUtil _util
Constructor Detail |
public SiebelCRMResourceAdapter(Resource res, ObjectCache cache)
public SiebelCRMResourceAdapter()
Method Detail |
public static Resource staticCreatePrototypeResource() throws WavesetException
WavesetException
public Resource createPrototypeResource() throws WavesetException
createPrototypeResource
in interface ResourceAdapter
createPrototypeResource
in class ResourceAdapterBase
WavesetException
public GenericObject getFeatures()
getFeatures
in interface ResourceAdapter
getFeatures
in class ResourceAdapterBase
ResourceAdapter.Features
public boolean supportsExcludedAccounts()
supportsExcludedAccounts
in interface ResourceAdapter
supportsExcludedAccounts
in class ResourceAdapterBase
public static boolean isSiebel6()
public SiebelDataBean getSiebelDataBean() throws WavesetException
WavesetException
protected java.lang.String formatTemplateUrl(java.lang.String template) throws WavesetException
% literal % h host p port e Siebel Enterprise Server o Siebel Application Object Manager s Siebe Server
WavesetException
public SiebelDataBean getSiebelDataBean(java.lang.String user, EncryptedData ePassword) throws WavesetException
WavesetException
public void logoff(SiebelDataBean dataBean)
dataBean
- public WavesetResult testConfiguration() throws WavesetException
testConfiguration
in interface ResourceAdapter
testConfiguration
in class ResourceAdapterBase
WavesetException
public java.util.List listObjects(java.lang.String objectType, java.util.Map options) throws WavesetException
listObjects
in interface ResourceAdapter
listObjects
in class ResourceAdapterBase
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:
WavesetException
public java.util.ArrayList listAllObjects(java.lang.String objectType, java.util.Map options, java.lang.String runAsUser, EncryptedData runAsPassword) throws WavesetException
listAllObjects
in interface ResourceAdapter
listAllObjects
in class ResourceAdapterBase
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 optionsrunAsUser
- -
(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.
WavesetException
public GenericObject getObject(java.lang.String resourceObjectType, java.lang.String objectId, java.util.List attrsToGet, java.util.Map options) throws WavesetException
getObject
in interface ResourceAdapter
getObject
in class ResourceAdapterBase
objectId
- - the name of the Siebel objectattrsToGet
- - a list of attribute names supported by the specified objectType
to be returned with the objectoptions
- - not currently used since the objectId/objectType provide a unique
identifier of the object being requestedresourceObjectType
- - a valid object type defined in the resource's
WavesetException
public GenericObject getObjectInternal(java.lang.String resourceObjectType, com.waveset.adapter.SiebelCRMResourceAdapter.Locator locator, java.util.List attrsToGet, java.util.Map options) throws WavesetException
WavesetException
public WavesetResult createObject(GenericObject object, java.util.Map options) throws WavesetException
createObject
in interface ResourceAdapter
createObject
in class ResourceAdapterBase
options
- - not currently used.object
- - a GenericObject containing the objectType, objectId, and
list of attributes to be set on the new object
WavesetException
public WavesetResult createObjectInternal(GenericObject object, java.util.Map options) throws WavesetException
WavesetException
public WavesetResult updateObject(GenericObject object, java.util.Map options) throws WavesetException
updateObject
in interface ResourceAdapter
updateObject
in class ResourceAdapterBase
options
- - not currently used.object
- - a GenericObject containing the objectType, objectId, and
list of new and changed attributes to be set on the object
WavesetException
public WavesetResult updateObjectInternal(GenericObject object, java.util.Map options) throws WavesetException
WavesetException
public WavesetResult deleteObject(GenericObject object, java.util.Map options) throws WavesetException
deleteObject
in interface ResourceAdapter
deleteObject
in class ResourceAdapterBase
options
- - not currently used because the objectId and objectType parameters
uniquely identify the object to delete.
WavesetException
public WavesetResult deleteObjectInternal(GenericObject object, java.util.Map options) throws WavesetException
WavesetException
protected GenericObject mapSiebelAttributes(java.lang.String resourceObjectType, java.lang.String objectId, java.util.List attrsToGet, SiebelBusComp busComp, GenericObject attrs) throws SiebelException, WavesetException
resourceObjectType
- - 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.
SiebelException,
- WavesetException
SiebelException
WavesetException
protected SiebelBusComp setSiebelAttributes(java.lang.String objectType, java.lang.String objectId, SiebelBusComp busComp, GenericObject attrs) throws WavesetException
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.
SiebelException
WavesetException
protected void setMVGSiebelAttribute(SiebelBusComp busComp, java.lang.String fullAttrName, java.util.List attrValue, java.lang.String primaryValue) throws SiebelException, WavesetException
busComp
- The Siebel business component to be written to.attrValue
- The value to be set to the MVG attribute.
SiebelException
WavesetException
protected void setPickListSiebelAttribute(SiebelBusComp busComp, java.lang.String fullAttrName, java.lang.String value) throws SiebelException, WavesetException
busComp
- The Siebel business component to be written to.value
- The value to be written to the pick list attribute.
SiebelException
WavesetException
public WavesetResult checkCreateAccount(WSUser user) throws WavesetException
checkCreateAccount
in interface ResourceAdapter
checkCreateAccount
in class ResourceAdapterBase
WavesetException
public WavesetResult checkUpdateAccount(WSUser user) throws WavesetException
checkUpdateAccount
in interface ResourceAdapter
checkUpdateAccount
in class ResourceAdapterBase
WavesetException
public WavesetResult checkDeleteAccount(WSUser user) throws WavesetException
checkDeleteAccount
in interface ResourceAdapter
checkDeleteAccount
in class ResourceAdapterBase
WavesetException
public WSUser getUser(WSUser user) throws WavesetException
getUser
in interface ResourceAdapter
getUser
in class ResourceAdapterBase
WavesetException
protected void realCreate(WSUser user, WavesetResult result) throws WavesetException
realCreate
in class ResourceAdapterBase
WavesetException
protected void realUpdate(WSUser user, WavesetResult result) throws WavesetException
realUpdate
in class ResourceAdapterBase
WavesetException
protected void realDelete(WSUser user, WavesetResult result) throws WavesetException
realDelete
in class ResourceAdapterBase
WavesetException
public AccountIterator getAccountIterator() throws WavesetException
getAccountIterator
in interface ResourceAdapter
getAccountIterator
in class ResourceAdapterBase
WavesetException
public WavesetResult authenticate(java.util.HashMap loginInfo) throws WavesetException
authenticate
in interface ResourceAdapter
authenticate
in class ResourceAdapterBase
WavesetException
protected void startConnection() throws WavesetException
startConnection
in class ResourceAdapterBase
WavesetException
protected void stopConnection() throws WavesetException
stopConnection
in class ResourceAdapterBase
WavesetException
protected java.util.ArrayList listAllSiebelObjects(SiebelDataBean dataBean, java.lang.String type) throws WavesetException
dataBean
- The connection to the Siebel server to make the call through.type
- The type of object to be listed.
WavesetException
protected java.util.ArrayList listAllSiebelObjects(SiebelDataBean dataBean, java.lang.String resourceObjectType, java.util.List attrsToGet, java.lang.String searchFilter) throws WavesetException
dataBean
- The connection to the Siebel server to make the call through.attrsToGet
- The attributes to retrieve for the given object.searchFilter
- Optionally filter the results with a search specification.
WavesetException
public void init() throws java.lang.Exception
ActiveSync
init
in interface ActiveSync
java.lang.Exception
public java.lang.Object getAttributeValue(java.lang.String name) throws WavesetException
ActiveSync
getAttributeValue
in interface ActiveSync
WavesetException
public void setAttributeValue(java.lang.String name, java.lang.Object value) throws WavesetException
setAttributeValue
in interface ActiveSync
WavesetException
public void shutdown()
ActiveSync
shutdown
in interface ActiveSync
public int poll()
ActiveSync
poll
in interface ActiveSync
protected boolean processUser(WSUser user)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |