com.waveset.adapter
Class PeopleSoftCompIntfcAdapter

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

public class PeopleSoftCompIntfcAdapter
extends ResourceAdapterBase

Description: The PeopleSoft component interface Resource adapter. This adapter is used to read/write to PeopleSoft component interfaces. The Configuration object "PeopleSoft Component Interfaces" contains the component interface map. Each entry in the map is a component interface definition used as the metadata about the real component interface on PeopleSoft. Resource object types are currently minimally supported (listAllObjects and listObjects). Notice that the 'target' attribute of the ObjectFeature element is interpreted as the name of the component interface (from the component interface map) to use for the feature. If you want active sync capabilities, look at PeopleSoftComponentActiveSyncAdapter. If you want both active sync and read/write to component interfaces, create two (or more) adapters, PeopleSoftComponentActiveSyncAdapter for active sync and one instance of PeopleSoftCompIntfcAdapter for each component interface that you want to manage.


Nested Class Summary
static class PeopleSoftCompIntfcAdapter.JOAInvocationHandler
          An invocation handler for a dynamic proxy around an IObject which performs verbose tracing before and after the IObject invocation.
static class PeopleSoftCompIntfcAdapter.SearchLevel
          SearchLevel is used to heirarchically produce find search strings which allow you to a narrow down to a small set of results.
 
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  psft.pt8.joa.ISession _connection
          Our connection to PeopleSoft.
static java.lang.String code_id
           
static java.lang.String RA_DELETE_COMPONENT_INTF
           
static java.lang.String RA_HOST
          The name of the host used to communicate with the resource.
static java.lang.String RA_MAX_PS_LIST_ITEMS
           
static java.lang.String RA_PASSWORD
          The password to connect to the resource.
static java.lang.String RA_PORT
          The port on which to communicate to the resource.
static java.lang.String RA_READWRITE_COMPONENT_INTF
          The component interface, for 8.x servers
static java.lang.String RA_USER
          The account name to connect to the resource.
static java.lang.String RESOURCE_NAME
           
static java.lang.String RESOURCE_USER_FORM
           
 
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.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
PeopleSoftCompIntfcAdapter()
           
PeopleSoftCompIntfcAdapter(Resource res, ObjectCache cache)
           
 
Method Summary
 WavesetResult authenticate(java.util.HashMap loginInfo)
          Authenticates the user against the resource.
 WavesetResult checkCreateAccount(WSUser user)
           
 WavesetResult checkDeleteAccount(WSUser user)
           
 WavesetResult checkUpdateAccount(WSUser user)
           
 Resource createPrototypeResource()
           
protected  void errorHandler(WavesetResult result)
           
protected  boolean getAccountLocked(psft.pt8.joa.IObject fetchedUser)
           
protected  GenericObject getCompIntfcMap()
           
protected  psft.pt8.joa.IObject getComponentInterface(java.lang.String componentIntfcName)
           
 GenericObject getFeatures()
          Expose features supported by the Resource Adapter.
protected  psft.pt8.joa.ISession getSession()
           
 WSUser getUser(WSUser user)
          Retrieves account information from the resource for the specified WSUser and returns a new WSUser based on the information from the resource.
protected  WSUser getUserInternal(java.lang.String identity)
           
 java.util.ArrayList listAllObjects(java.lang.String resourceObjectType, java.util.Map options, java.lang.String runAsUser, EncryptedData runAsPassword)
          This method will return a list of object names of the specified object type.
 java.util.List listObjects(java.lang.String objectType, java.util.Map options)
          Default implementation calls older method listAllObjects(String, Map, String, EncryptedData), which does not support newer options (such as "searchContext" or "searchFilter").
protected  WSUser makeWavesetUser(psft.pt8.joa.IObject fetchedUser, java.lang.String keyAttrName)
          Make a waveset user from a fetched component interface, mapping all available fields from the schema map.
protected  void realCreate(WSUser user, WavesetResult result)
          Needs to be overridden by subclass if default createAccounts() implementation is used.
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.
protected  void setAccountLocked(WSUser user, boolean locked, WavesetResult result)
           
protected  void setCIFromWSUSer(WSUser user, psft.pt8.joa.IObject userObj, java.lang.String updateType, WavesetResult result)
           
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()
          If true, must implement realDisable() and realEnable().
 boolean supportsExcludedAccounts()
           
 WavesetResult testConfiguration()
          Method called when the "test connection" button of menu item is hit on the adapter.
 
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, getWSAttrByMapName, getWSAttrByMapName, getWSAttrFromMap, handleActionResult, handleJavascriptActionResult, isAccountAttributeSecret, isExcludedAccount, isExcludedAccount, isFeatureEnabled, isSupported, isTestMode, listAllObjects, listObjects, listObjectsOfType, lookupAction, lookupAction, lookupActions, namesEqual, objectClassesMatchType, println, restoreResourceObjectClassAttr, run, run, runResourceAttributeJavascriptAction, scan, setCache, setContext, setDisabled, setFromResource, setResource, setResourceObjectClassAttr, setResourceOptionAttrs, startConnectionWrapper, supportsAccountActions, supportsActions, supportsCaseInsensitiveAccountIds, supportsContainerObjectTypes, supportsResourceAccount, supportsScanning, 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
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 to connect to the resource.

See Also:
Constant Field Values

RA_PASSWORD

public static final java.lang.String RA_PASSWORD
The password to connect to the resource.

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

RA_MAX_PS_LIST_ITEMS

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

RA_READWRITE_COMPONENT_INTF

public static final java.lang.String RA_READWRITE_COMPONENT_INTF
The component interface, for 8.x servers

See Also:
Constant Field Values

RA_DELETE_COMPONENT_INTF

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

_connection

protected psft.pt8.joa.ISession _connection
Our connection to PeopleSoft. Managed by startConnection and stopConnection only.

Constructor Detail

PeopleSoftCompIntfcAdapter

public PeopleSoftCompIntfcAdapter(Resource res,
                                  ObjectCache cache)

PeopleSoftCompIntfcAdapter

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

getUser

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

Specified by:
getUser in interface ResourceAdapter
Overrides:
getUser in class ResourceAdapterBase
Throws:
WavesetException

realCreate

protected void realCreate(WSUser user,
                          WavesetResult result)
                   throws WavesetException
Description copied from class: ResourceAdapterBase
Needs to be overridden by subclass if default createAccounts() implementation is used.

Overrides:
realCreate 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

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

listAllObjects

public java.util.ArrayList listAllObjects(java.lang.String resourceObjectType,
                                          java.util.Map options,
                                          java.lang.String runAsUser,
                                          EncryptedData runAsPassword)
                                   throws WavesetException
Description copied from interface: ResourceAdapter
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:
resourceObjectType - - 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(ACCOUNT) 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 objects of a specified type.
Throws:
WavesetException

listObjects

public java.util.List listObjects(java.lang.String objectType,
                                  java.util.Map options)
                           throws WavesetException
Description copied from class: ResourceAdapterBase
Default implementation calls older method ResourceAdapterBase.listAllObjects(String, Map, String, EncryptedData), which does not support newer options (such as "searchContext" or "searchFilter").

Each ResourceAdapter subclass should override this default implementation as soon as possible with an implementation that supports the options specified in {#listObjects(ObjectType, Map)}.

Specified by:
listObjects in interface ResourceAdapter
Overrides:
listObjects in class ResourceAdapterBase
Throws:
WavesetException

supportsAccountDisable

public boolean supportsAccountDisable()
If true, must implement realDisable() and realEnable(). See below.

Specified by:
supportsAccountDisable in interface ResourceAdapter
Overrides:
supportsAccountDisable in class ResourceAdapterBase

supportsExcludedAccounts

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

realDisable

protected void realDisable(WSUser user,
                           WavesetResult result)
                    throws WavesetException
Overrides:
realDisable in class ResourceAdapterBase
Throws:
WavesetException

realEnable

protected void realEnable(WSUser user,
                          WavesetResult result)
                   throws WavesetException
Overrides:
realEnable in class ResourceAdapterBase
Throws:
WavesetException

testConfiguration

public WavesetResult testConfiguration()
                                throws WavesetException
Method called when the "test connection" button of menu item is hit on the adapter.

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

authenticate

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

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

getUserInternal

protected WSUser getUserInternal(java.lang.String identity)
                          throws WavesetException
Throws:
WavesetException

setAccountLocked

protected void setAccountLocked(WSUser user,
                                boolean locked,
                                WavesetResult result)
                         throws WavesetException
Throws:
WavesetException

getAccountLocked

protected boolean getAccountLocked(psft.pt8.joa.IObject fetchedUser)
                            throws WavesetException
Throws:
WavesetException

getCompIntfcMap

protected GenericObject getCompIntfcMap()
                                 throws WavesetException
Throws:
WavesetException

makeWavesetUser

protected WSUser makeWavesetUser(psft.pt8.joa.IObject fetchedUser,
                                 java.lang.String keyAttrName)
                          throws psft.pt8.joa.JOAException,
                                 WavesetException
Make a waveset user from a fetched component interface, mapping all available fields from the schema map.

Throws:
psft.pt8.joa.JOAException
WavesetException

setCIFromWSUSer

protected void setCIFromWSUSer(WSUser user,
                               psft.pt8.joa.IObject userObj,
                               java.lang.String updateType,
                               WavesetResult result)
                        throws WavesetException
Parameters:
user -
updateType - "create" or "update"
result -
Throws:
WavesetException

errorHandler

protected void errorHandler(WavesetResult result)

getComponentInterface

protected psft.pt8.joa.IObject getComponentInterface(java.lang.String componentIntfcName)

getSession

protected psft.pt8.joa.ISession getSession()

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()
Description copied from class: ResourceAdapterBase
Needs to be overridden by subclass if default createAccounts() implementation is used.

Overrides:
stopConnection in class ResourceAdapterBase