com.waveset.adapter
Class AgentResourceAdapter

java.lang.Object
  extended bycom.waveset.adapter.ResourceAdapterBase
      extended bycom.waveset.adapter.AgentResourceAdapter
All Implemented Interfaces:
RASecureConnection.RASecureConnectionAccessor, ResourceAdapter
Direct Known Subclasses:
ADSIResourceAdapter, DominoResourceAdapter, EntrustResourceAdapter, Exchange55ResourceAdapter, GroupWiseResourceAdapter, NDSResourceAdapter, NTExchangeResourceAdapter, NTResourceAdapter, RemedyResourceAdapter, ScriptedGatewayResourceAdapter, SecurIdResourceAdapter, TestExtResourceAdapter

public abstract class AgentResourceAdapter
extends ResourceAdapterBase
implements RASecureConnection.RASecureConnectionAccessor


Nested Class Summary
 class AgentResourceAdapter.AcctIter
           
protected  class AgentResourceAdapter.AgentAccountSupplier
           
 class AgentResourceAdapter.BlockAcctIter
           
 class AgentResourceAdapter.BlockObjectIterator
           
 
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  RASecureConnection _connection
           
static java.lang.String ATTR_ACTION
           
static java.lang.String code_id
           
static java.lang.String CONNECTED_TO_RESOURCE
           
static java.lang.String RA_AUTHTIMEOUT
          The limit to wait for the gateway to respond to a authentication request.
static java.lang.String RA_CONN
          The limit of concurrent connections to the resource agent.
static java.lang.String RA_HANGTIMEOUT
          The time the connection will be waited on before considered hung when a request has been sent to it.
static java.lang.String RA_HOST
          The name of the resource attribute containing the name of the host running the resource agent.
static java.lang.String RA_OBJCLASS
          The name of the object class being processed
static java.lang.String RA_PORT
          The port on which to communicate to the resource agent.
static java.lang.String SUPPORTS_ENCRYPTED_TYPE
           
static java.lang.String USER_CLASS
          An alternate to account for retrieving account lists.
 
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
AgentResourceAdapter()
           
AgentResourceAdapter(Resource res, ObjectCache cache)
           
 
Method Summary
protected  void addCmdArgs(WSUser user, java.lang.String cmd, java.lang.StringBuffer buf)
           
protected  void addIgnoredAttrs(WSUser user, WSAttributes wsAttrs)
           
 WavesetResult agentTestConfiguration()
          If the gateway extension for a subclass of AgentResourceAdapter implements the Extension::testConfiguration() method, then it should add the following method: public WavesetResult testConfiguration() throws WavesetException { return agentTestConfiguration(); }
protected  void augmentListAllObjects(java.lang.StringBuffer sb, int indent, java.lang.String resourceObjectType, java.util.Map options, WSAttributes wsAttrs)
           
 WavesetResult authenticate(java.util.HashMap loginInfo)
          Authenticates the user against the resource.
protected  void buildGetObjectRequest(java.lang.String objectType, java.lang.String objectId, java.util.List attrsToGet, java.util.Map options, java.lang.StringBuffer buf)
           
 WavesetResult checkCreateAccount(WSUser user)
           
 WavesetResult checkDeleteAccount(WSUser user)
           
 WavesetResult checkUpdateAccount(WSUser user)
           
 WavesetResult createAccounts(WSUser[] users)
           
 WavesetResult createObject(GenericObject object, java.util.Map options)
          Creates the specified objectId of type objectType using the list of attributes provided.
abstract  Resource createPrototypeResource()
           
protected  void createXmlObject(java.util.Map map, WSAttributes wsAttrs, java.lang.StringBuffer buf)
           
protected  void createXmlObject(WSUser user, java.lang.String identity, WSAttributes wsAttrs, java.lang.StringBuffer buf)
           
 WavesetResult deleteAccounts(WSUser[] users)
           
 WavesetResult deleteObject(GenericObject object, java.util.Map options)
          Deletes the requested objectId of the requested objectType from the resource
protected  void determineGatewayCapabilities(RASecureConnection.RASecureConnectionAccessor accessor)
           
 WavesetResult disableAccounts(WSUser[] users)
           
protected  WavesetResult doCreateOrUpdateObjectRequest(GenericObject object, java.util.Map options, java.lang.String cmd)
           
protected  WavesetResult doCreateOrUpdateRequest(WSUser[] users, java.lang.String cmd)
           
protected  java.util.Map doGetGatewayInfo(java.util.Map parameters, java.lang.StringBuffer buf)
           
protected  java.util.Map doGetGatewayInfo(RASecureConnection.RASecureConnectionAccessor accessor, java.util.Map parameters, java.lang.StringBuffer buf)
           
 WavesetResult enableAccounts(WSUser[] users)
           
protected  boolean encryptEncryptedType()
           
protected  boolean encryptEncryptedType(RASecureConnection.RASecureConnectionAccessor accessor)
           
protected  void endRequest(java.lang.StringBuffer buf)
           
protected  WSAttributes extendWSAttributes(java.lang.String cmd, WSAttributes wsAttrs)
           
 WSAttributes getAccountAttributes(java.lang.String accountIdentity)
          This method is obsolete.
 AccountIterator getAccountIterator()
          Default implementation just gets all the users and holds them in an array.
 AccountIterator getAccountIterator(java.util.Map attrs)
          Alternate interface to pass in a map of name/value pairs to control the search.
static java.util.List getAgentAdapters(LighthouseContext ctx)
           
protected  long getAuthenticationTimeout()
          Returns the number of milli seconds to wait before timing out on a authentication request.
protected  AccountIterator getBlockAccountIterator()
           
protected  AccountIterator getBlockAccountIterator(java.util.Map attrs)
           
 RASecureConnection getConnection()
           
 GenericObject getFeatures()
          Expose features supported by the Resource Adapter.
 java.util.Map getGatewayInfo(java.util.Map parameters)
           
protected  java.lang.String getGenericObjectsFromResponse(java.lang.String objectType, java.lang.String response, java.util.ArrayList objs)
          Take the list of 's returned from the search request.
protected  long getHangTimeout()
          Returns the number of seconds to wait before timing out on a request.
protected  java.lang.String getLoginAttrName(java.lang.String key)
          Get the attribute name to use for the login info key that is passed in.
 GenericObject getObject(java.lang.String objectType, java.lang.String objectId, java.util.List attrsToGet, java.util.Map options)
          Returns the requested objectId of the requested objectType from the resource
protected  GenericObject getObjectFromResponse(java.lang.String response, java.lang.String command, java.lang.String objectType)
           
 DblBufObjectIter getObjectIterator(java.lang.String objectType, java.util.Map ops)
           
protected  java.util.ArrayList getObjectListFromResponse(java.lang.String objectType, java.lang.String response)
           
protected  ResourceInfo getResInfo(WSUser[] users, java.lang.String identity)
           
protected  java.lang.String getResponse()
           
protected  java.lang.String getResponse(long timeout)
           
protected  java.lang.String getResponse(RASecureConnection.RASecureConnectionAccessor accessor)
           
protected  java.lang.String getResponse(RASecureConnection.RASecureConnectionAccessor accessor, long timeout)
           
protected  byte[] getResponseBytes()
           
protected  byte[] getResponseBytes(long timeout)
           
protected  byte[] getResponseBytes(RASecureConnection.RASecureConnectionAccessor accessor)
           
protected  byte[] getResponseBytes(RASecureConnection.RASecureConnectionAccessor accessor, long timeout)
           
 java.util.List getResultItemList(java.util.List results, java.lang.String type)
          %%% COPYIED from WavesetResult because of foward compatibility %%% Return a list of ResultItems with the given type.
 java.io.InputStream getTraceFile(java.util.Map args)
           
 WavesetResult getTraceFile(java.lang.String localFile, java.util.Map args)
           
 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[] getUsersFromResponse(java.lang.String response)
           
protected  java.lang.String getUsersFromResponse(java.lang.String response, java.util.ArrayList users)
           
protected  java.lang.String getWsAttrsString()
           
 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)
          Returns a list of objects matching the requested objectType and options
protected  WavesetResult loadUsersFromResponse(java.lang.String response, java.util.ArrayList users)
           
protected  void makeConnection()
           
protected  void makeConnection(RASecureConnection.RASecureConnectionAccessor accessor)
           
protected  java.lang.String makeGUID(java.lang.String guid)
          encode the GUID for the url
protected  WSAttributes mapAttributes(WSUser user, java.lang.String operation, boolean keepEncryptedType)
           
protected  java.lang.String mapObjectType(java.lang.String resourceObjectType)
          Resource adapters such as the ones for NT and ADSI may overrided this method to provide resource-specific types.
protected  void removeUserAttr(WSUser[] users, java.lang.String identity, java.lang.String attrName, WavesetResult result)
           
protected  void returnConnection()
           
protected  void returnConnection(boolean bogus)
           
protected  void returnConnection(RASecureConnection.RASecureConnectionAccessor accessor)
           
protected  void returnConnection(RASecureConnection.RASecureConnectionAccessor accessor, boolean bogus)
           
protected  WSAttributes reverseMapAttributes(WSAttributes attributes)
           
 WavesetResult run(ResourceAction action, java.util.Map args)
          This is NOT supported by default.
protected  boolean runAction(WSUser user, WSAttributes wsAttrs, java.lang.String command, java.lang.String timing, WavesetResult result)
           
 WavesetResult scan(java.util.Map parameters)
           
protected  void sendRequest(RASecureConnection.RASecureConnectionAccessor accessor, java.lang.String request)
           
protected  void sendRequest(RASecureConnection.RASecureConnectionAccessor accessor, java.lang.String request, long timeout)
           
protected  void sendRequest(java.lang.String request)
          Before calling this, you must call getConnection() to get a connection (which is saved in the _connection member variable).
protected  void sendRequest(java.lang.String request, long timeout)
           
 void setConnection(RASecureConnection connection)
           
 WavesetResult setGatewayInfo(java.util.Map parameters)
           
protected  void startRequest(RASecureConnection.RASecureConnectionAccessor accessor, java.lang.StringBuffer buf, java.lang.String cmd)
           
protected  void startRequest(java.lang.StringBuffer buf, java.lang.String cmd)
           
protected  void startRequestWithoutConnect(java.lang.StringBuffer buf, java.lang.String cmd)
           
protected  void transformGUID(WavesetResult result)
           
 WavesetResult updateAccounts(WSUser[] users)
           
protected  boolean updateIdFromResource()
          Indicates whether or not the identity for this resource should be updated from the id that is returned from the gateway.
 WavesetResult updateKey(java.util.Map parameters)
           
 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, createIdentity, deleteAccount, deleteAccount, disableAccount, dnsEqual, dnsEqual, enableAccount, executeResourceAttributeJavascriptAction, fillInResourceInfo, fillInResourceInfo, 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, realCreate, realDelete, realDisable, realEnable, realUpdate, restoreResourceObjectClassAttr, run, runResourceAttributeJavascriptAction, setCache, setContext, setDisabled, setFromResource, setResource, setResourceObjectClassAttr, setResourceOptionAttrs, startConnection, startConnectionWrapper, stopConnection, supportsAccountActions, supportsAccountDisable, supportsActions, supportsCaseInsensitiveAccountIds, supportsContainerObjectTypes, supportsExcludedAccounts, supportsResourceAccount, supportsScanning, testConfiguration, updateAccount, 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 resource attribute containing the name of the host running the resource agent.

See Also:
Constant Field Values

RA_PORT

public static final java.lang.String RA_PORT
The port on which to communicate to the resource agent.

See Also:
Constant Field Values

RA_CONN

public static final java.lang.String RA_CONN
The limit of concurrent connections to the resource agent.

See Also:
Constant Field Values

ATTR_ACTION

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

RA_AUTHTIMEOUT

public static final java.lang.String RA_AUTHTIMEOUT
The limit to wait for the gateway to respond to a authentication request.

See Also:
Constant Field Values

RA_HANGTIMEOUT

public static final java.lang.String RA_HANGTIMEOUT
The time the connection will be waited on before considered hung when a request has been sent to it.

See Also:
Constant Field Values

RA_OBJCLASS

public static final java.lang.String RA_OBJCLASS
The name of the object class being processed

See Also:
Constant Field Values

USER_CLASS

public static final java.lang.String USER_CLASS
An alternate to account for retrieving account lists.

See Also:
Constant Field Values

SUPPORTS_ENCRYPTED_TYPE

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

CONNECTED_TO_RESOURCE

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

_connection

protected RASecureConnection _connection
Constructor Detail

AgentResourceAdapter

public AgentResourceAdapter(Resource res,
                            ObjectCache cache)

AgentResourceAdapter

public AgentResourceAdapter()
Method Detail

createPrototypeResource

public abstract 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

checkCreateAccount

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

createAccounts

public WavesetResult createAccounts(WSUser[] users)
                             throws WavesetException
Specified by:
createAccounts in interface ResourceAdapter
Overrides:
createAccounts 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

updateAccounts

public WavesetResult updateAccounts(WSUser[] users)
                             throws WavesetException
Specified by:
updateAccounts in interface ResourceAdapter
Overrides:
updateAccounts in class ResourceAdapterBase
Throws:
WavesetException

disableAccounts

public WavesetResult disableAccounts(WSUser[] users)
                              throws WavesetException
Specified by:
disableAccounts in interface ResourceAdapter
Overrides:
disableAccounts in class ResourceAdapterBase
Throws:
WavesetException

enableAccounts

public WavesetResult enableAccounts(WSUser[] users)
                             throws WavesetException
Specified by:
enableAccounts in interface ResourceAdapter
Overrides:
enableAccounts 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

deleteAccounts

public WavesetResult deleteAccounts(WSUser[] users)
                             throws WavesetException
Specified by:
deleteAccounts in interface ResourceAdapter
Overrides:
deleteAccounts in class ResourceAdapterBase
Throws:
WavesetException

getUsersFromResponse

protected WSUser[] getUsersFromResponse(java.lang.String response)
                                 throws WavesetException
Throws:
WavesetException

createXmlObject

protected void createXmlObject(WSUser user,
                               java.lang.String identity,
                               WSAttributes wsAttrs,
                               java.lang.StringBuffer buf)
                        throws WavesetException
Throws:
WavesetException

createXmlObject

protected void createXmlObject(java.util.Map map,
                               WSAttributes wsAttrs,
                               java.lang.StringBuffer buf)
                        throws WavesetException
Throws:
WavesetException

getGenericObjectsFromResponse

protected java.lang.String getGenericObjectsFromResponse(java.lang.String objectType,
                                                         java.lang.String response,
                                                         java.util.ArrayList objs)
                                                  throws WavesetException
Take the list of 's returned from the search request.

Throws:
WavesetException

loadUsersFromResponse

protected WavesetResult loadUsersFromResponse(java.lang.String response,
                                              java.util.ArrayList users)
                                       throws WavesetException
Throws:
WavesetException

getUsersFromResponse

protected java.lang.String getUsersFromResponse(java.lang.String response,
                                                java.util.ArrayList users)
                                         throws WavesetException
Throws:
WavesetException

getWsAttrsString

protected java.lang.String getWsAttrsString()
                                     throws WavesetException
Throws:
WavesetException

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

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

reverseMapAttributes

protected WSAttributes reverseMapAttributes(WSAttributes attributes)

makeGUID

protected java.lang.String makeGUID(java.lang.String guid)
encode the GUID for the url


getAccountIterator

public AccountIterator getAccountIterator()
                                   throws WavesetException
Default implementation just gets all the users and holds them in an array. May (should) be overriden by the subclass.

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

getAccountIterator

public AccountIterator getAccountIterator(java.util.Map attrs)
                                   throws WavesetException
Alternate interface to pass in a map of name/value pairs to control the search.

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

getResponseBytes

protected byte[] getResponseBytes()
                           throws WavesetException
Throws:
WavesetException

getResponseBytes

protected byte[] getResponseBytes(long timeout)
                           throws WavesetException
Throws:
WavesetException

getResponseBytes

protected byte[] getResponseBytes(RASecureConnection.RASecureConnectionAccessor accessor)
                           throws WavesetException
Throws:
WavesetException

getResponseBytes

protected byte[] getResponseBytes(RASecureConnection.RASecureConnectionAccessor accessor,
                                  long timeout)
                           throws WavesetException
Throws:
WavesetException

getResponse

protected java.lang.String getResponse()
                                throws WavesetException
Throws:
WavesetException

getResponse

protected java.lang.String getResponse(long timeout)
                                throws WavesetException
Throws:
WavesetException

getResponse

protected java.lang.String getResponse(RASecureConnection.RASecureConnectionAccessor accessor)
                                throws WavesetException
Throws:
WavesetException

getResponse

protected java.lang.String getResponse(RASecureConnection.RASecureConnectionAccessor accessor,
                                       long timeout)
                                throws WavesetException
Throws:
WavesetException

addIgnoredAttrs

protected void addIgnoredAttrs(WSUser user,
                               WSAttributes wsAttrs)

runAction

protected boolean runAction(WSUser user,
                            WSAttributes wsAttrs,
                            java.lang.String command,
                            java.lang.String timing,
                            WavesetResult result)
                     throws WavesetException
Throws:
WavesetException

doCreateOrUpdateRequest

protected WavesetResult doCreateOrUpdateRequest(WSUser[] users,
                                                java.lang.String cmd)
                                         throws WavesetException
Throws:
WavesetException

updateIdFromResource

protected boolean updateIdFromResource()
Indicates whether or not the identity for this resource should be updated from the id that is returned from the gateway. If so, the the ResourceInfo.accountId is updated with the id from the gateway. A resource adapter that desires this behavior should provide an implementation of this routine that returns true. The default return value is false.


addCmdArgs

protected void addCmdArgs(WSUser user,
                          java.lang.String cmd,
                          java.lang.StringBuffer buf)

removeUserAttr

protected void removeUserAttr(WSUser[] users,
                              java.lang.String identity,
                              java.lang.String attrName,
                              WavesetResult result)

getResInfo

protected ResourceInfo getResInfo(WSUser[] users,
                                  java.lang.String identity)

mapAttributes

protected WSAttributes mapAttributes(WSUser user,
                                     java.lang.String operation,
                                     boolean keepEncryptedType)
                              throws WavesetException
Throws:
WavesetException

startRequest

protected void startRequest(RASecureConnection.RASecureConnectionAccessor accessor,
                            java.lang.StringBuffer buf,
                            java.lang.String cmd)
                     throws WavesetException
Throws:
WavesetException

startRequest

protected void startRequest(java.lang.StringBuffer buf,
                            java.lang.String cmd)
                     throws WavesetException
Throws:
WavesetException

startRequestWithoutConnect

protected void startRequestWithoutConnect(java.lang.StringBuffer buf,
                                          java.lang.String cmd)
                                   throws WavesetException
Throws:
WavesetException

endRequest

protected void endRequest(java.lang.StringBuffer buf)

getConnection

public RASecureConnection getConnection()
Specified by:
getConnection in interface RASecureConnection.RASecureConnectionAccessor

setConnection

public void setConnection(RASecureConnection connection)
Specified by:
setConnection in interface RASecureConnection.RASecureConnectionAccessor

makeConnection

protected void makeConnection()
                       throws WavesetException
Throws:
WavesetException

makeConnection

protected void makeConnection(RASecureConnection.RASecureConnectionAccessor accessor)
                       throws WavesetException
Throws:
WavesetException

determineGatewayCapabilities

protected void determineGatewayCapabilities(RASecureConnection.RASecureConnectionAccessor accessor)
                                     throws WavesetException
Throws:
WavesetException

encryptEncryptedType

protected boolean encryptEncryptedType()
                                throws WavesetException
Throws:
WavesetException

encryptEncryptedType

protected boolean encryptEncryptedType(RASecureConnection.RASecureConnectionAccessor accessor)
                                throws WavesetException
Throws:
WavesetException

returnConnection

protected void returnConnection(RASecureConnection.RASecureConnectionAccessor accessor,
                                boolean bogus)

returnConnection

protected void returnConnection(RASecureConnection.RASecureConnectionAccessor accessor)

returnConnection

protected void returnConnection(boolean bogus)

returnConnection

protected void returnConnection()

sendRequest

protected void sendRequest(java.lang.String request)
                    throws WavesetException
Before calling this, you must call getConnection() to get a connection (which is saved in the _connection member variable). This is required because usually you must determine if the thing on the other side of the connection (the gateway) can handle WSAttribute values that are really encrypted. You use the RASecureConnection.supportsEncryptedType() to determine this.

Throws:
WavesetException

sendRequest

protected void sendRequest(java.lang.String request,
                           long timeout)
                    throws WavesetException
Throws:
WavesetException

sendRequest

protected void sendRequest(RASecureConnection.RASecureConnectionAccessor accessor,
                           java.lang.String request)
                    throws WavesetException
Throws:
WavesetException

sendRequest

protected void sendRequest(RASecureConnection.RASecureConnectionAccessor accessor,
                           java.lang.String request,
                           long timeout)
                    throws WavesetException
Throws:
WavesetException

getGatewayInfo

public java.util.Map getGatewayInfo(java.util.Map parameters)
                             throws WavesetException
Throws:
WavesetException

doGetGatewayInfo

protected java.util.Map doGetGatewayInfo(java.util.Map parameters,
                                         java.lang.StringBuffer buf)
                                  throws WavesetException
Throws:
WavesetException

doGetGatewayInfo

protected java.util.Map doGetGatewayInfo(RASecureConnection.RASecureConnectionAccessor accessor,
                                         java.util.Map parameters,
                                         java.lang.StringBuffer buf)
                                  throws WavesetException
Throws:
WavesetException

setGatewayInfo

public WavesetResult setGatewayInfo(java.util.Map parameters)
                             throws WavesetException
Throws:
WavesetException

getTraceFile

public java.io.InputStream getTraceFile(java.util.Map args)
                                 throws WavesetException
Throws:
WavesetException

getTraceFile

public WavesetResult getTraceFile(java.lang.String localFile,
                                  java.util.Map args)
                           throws WavesetException
Throws:
WavesetException

getBlockAccountIterator

protected AccountIterator getBlockAccountIterator()
                                           throws WavesetException
Throws:
WavesetException

getBlockAccountIterator

protected AccountIterator getBlockAccountIterator(java.util.Map attrs)
                                           throws WavesetException
Throws:
WavesetException

getObjectIterator

public DblBufObjectIter getObjectIterator(java.lang.String objectType,
                                          java.util.Map ops)
                                   throws WavesetException
Throws:
WavesetException

getLoginAttrName

protected java.lang.String getLoginAttrName(java.lang.String key)
Get the attribute name to use for the login info key that is passed in. This basically maps login info keys to attribute names that will be used by the resource. The specific resource adapter must implement this method.


getAuthenticationTimeout

protected long getAuthenticationTimeout()
Returns the number of milli seconds to wait before timing out on a authentication request. Zero represents no timeout and is the default if the resource attribute "Authentication Timeout" is not specified.


getHangTimeout

protected long getHangTimeout()
Returns the number of seconds to wait before timing out on a request. Zero represents no timeout and is the default timeout if the resource attribute "Hang Timeout" is not specified.


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

transformGUID

protected void transformGUID(WavesetResult result)

scan

public WavesetResult scan(java.util.Map parameters)
                   throws WavesetException
Specified by:
scan in interface ResourceAdapter
Overrides:
scan in class ResourceAdapterBase
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 objectId of the requested objectType from the resource

Specified by:
getObject in interface ResourceAdapter
Overrides:
getObject in class ResourceAdapterBase
Parameters:
objectType - - a valid object type defined in the resource's section
objectId - - a valid fully qualified object identifier on this resource (e.g. "dn")
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
Throws:
WavesetException

buildGetObjectRequest

protected void buildGetObjectRequest(java.lang.String objectType,
                                     java.lang.String objectId,
                                     java.util.List attrsToGet,
                                     java.util.Map options,
                                     java.lang.StringBuffer buf)
                              throws WavesetException
Throws:
WavesetException

getObjectFromResponse

protected GenericObject getObjectFromResponse(java.lang.String response,
                                              java.lang.String command,
                                              java.lang.String objectType)
                                       throws WavesetException
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 object
options - - 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.
  1. "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".
  2. "searchTimeLimit" - the timelimit in milliseconds a search should not exceed (ResourceAdapter.RA_SEARCH_TIME_LIMIT).
  3. "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 object
options - - 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.
  1. "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".
  2. "searchTimeLimit" - the timelimit in milliseconds a search should not exceed (ResourceAdapter.RA_SEARCH_TIME_LIMIT).
  3. "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

extendWSAttributes

protected WSAttributes extendWSAttributes(java.lang.String cmd,
                                          WSAttributes wsAttrs)
                                   throws WavesetException
Throws:
WavesetException

doCreateOrUpdateObjectRequest

protected WavesetResult doCreateOrUpdateObjectRequest(GenericObject object,
                                                      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 - - a valid fully qualified object identifier on this resource (e.g. "dn")
options - - not currently used since the objectId/objectType provide a unique identifier of the object being deleted
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. "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).
  2. "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".
  3. "searchTimeLimit" - the timelimit in milliseconds a search should not exceed (ResourceAdapter.RA_SEARCH_TIME_LIMIT).
  4. "searchAttrsToGet" - the list of objectType specific attribute names to get per object
  5. "runAsUser" - user name this request is to be run as. If not specified, defaults to resource proxy admin user.
  6. "runAsPassword" - password of runAsUser. Required to authenticate with resource in order to run the list request as the specified user
Throws:
WavesetException

augmentListAllObjects

protected void augmentListAllObjects(java.lang.StringBuffer sb,
                                     int indent,
                                     java.lang.String resourceObjectType,
                                     java.util.Map options,
                                     WSAttributes wsAttrs)

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(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

mapObjectType

protected java.lang.String mapObjectType(java.lang.String resourceObjectType)
Resource adapters such as the ones for NT and ADSI may overrided this method to provide resource-specific types.


getObjectListFromResponse

protected java.util.ArrayList getObjectListFromResponse(java.lang.String objectType,
                                                        java.lang.String response)
                                                 throws WavesetException
Throws:
WavesetException

updateKey

public WavesetResult updateKey(java.util.Map parameters)
                        throws WavesetException
Throws:
WavesetException

getAgentAdapters

public static java.util.List getAgentAdapters(LighthouseContext ctx)
                                       throws WavesetException
Throws:
WavesetException

agentTestConfiguration

public WavesetResult agentTestConfiguration()
                                     throws WavesetException
If the gateway extension for a subclass of AgentResourceAdapter implements the Extension::testConfiguration() method, then it should add the following method: public WavesetResult testConfiguration() throws WavesetException { return agentTestConfiguration(); }

Throws:
WavesetException

getResultItemList

public java.util.List getResultItemList(java.util.List results,
                                        java.lang.String type)
%%% COPYIED from WavesetResult because of foward compatibility %%% Return a list of ResultItems with the given type.

This should only be used if you know from context that there will only be one item of this type in the result. It should not be used for displaying messages, since there can be more than one message in the result. !! Would like to change the behavior to search by name only


run

public WavesetResult run(ResourceAction action,
                         java.util.Map args)
                  throws WavesetException
Description copied from class: ResourceAdapterBase
This is NOT supported by default. If you have enabled the Featrues.ACTIONS feature, then this MUST be supported.

Specified by:
run in interface ResourceAdapter
Overrides:
run in class ResourceAdapterBase
Parameters:
action - The action to execute
args - Additional args, can be null.
Returns:
A WavesetResult.
Throws:
WavesetException