|
||||||||||
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.ExampleSPML2ResourceAdapter
This is an adapter that communicates SPML2 requests/responses to an external Web Service via SOAP over HTTP. This adapter assumes the SPML 2.0 DSML profile is supported by the provider.
Nested Class Summary | |
class |
ExampleSPML2ResourceAdapter.ExampleSPML2AccountIterator
|
Nested classes inherited from class com.waveset.adapter.ResourceAdapterBase |
ResourceAdapterBase.SimpleAccountIterator |
Nested classes inherited from class com.waveset.adapter.ResourceAdapter |
ResourceAdapter.ActionResult, ResourceAdapter.Features, ResourceAdapter.ObjectType |
Field Summary | |
static java.lang.String |
CLASS
|
static java.lang.String |
code_id
|
static java.lang.String |
DSML_URN
The URN for the SPML 2.0 DSML Profile |
static java.lang.String |
RA_PASSWORD
The password of the proxy user. |
static java.lang.String |
RA_TARGETID
The password of the proxy user. |
static java.lang.String |
RA_URL
The URL of the SPML web service. |
static java.lang.String |
RA_USER
The account name of the proxy user. |
static java.lang.String |
TYPE
The name of the resource type. |
Fields inherited from class com.waveset.adapter.ResourceAdapterBase |
_cache, _context, _excludedAccountsRule, _excludedAccountsRuleInited, _listAllObjectsAttrParse, _listAllObjectsAttrParseName, _listUserAttrParse, _listUserAttrParseName, _listUserGroupsAttrParse, _listUserGroupsAttrParseName, _resource, _thread, _trace, displayInfoCode, RA_BLOCKCOUNT, RA_LOGIN_ACTION, RA_LOGOFF_ACTION, RA_MULTI_VALUED_ATTRS, RA_TEST_MODE |
Constructor Summary | |
ExampleSPML2ResourceAdapter()
Create an adapater instance, without a resource. |
|
ExampleSPML2ResourceAdapter(Resource res,
ObjectCache cache)
Create an adapter instance for a resource. |
Method Summary | |
protected org.openspml.v2.msg.spmlsuspend.ActiveResponse |
activeRequest(java.lang.String identity)
Executes an ActiveRequest |
WavesetResult |
authenticate(java.util.HashMap loginInfo)
Check to see if a user account and password is valid. |
WSUser |
buildUser(org.openspml.v2.msg.spml.PSO pso)
Build the base user object given a PSO (SearchResponse) |
WSUser |
buildUser(java.lang.String id)
Build the base user object given an id. |
WavesetResult |
checkCreateAccount(WSUser user)
Checks to see if an account can be created. |
WavesetResult |
checkDeleteAccount(WSUser user)
|
WavesetResult |
checkUpdateAccount(WSUser user)
|
WavesetResult |
createObject(GenericObject object,
java.util.Map options)
Creates the specified objectId of type objectType using the list of attributes provided. |
Resource |
createPrototypeResource()
Create the prototype instance. |
WavesetResult |
deleteObject(GenericObject object,
java.util.Map options)
Deletes the requested objectId of the requested objectType from the resource. |
protected org.openspml.v2.msg.pass.ExpirePasswordResponse |
expirePasswordRequest(java.lang.String identity)
Executes a ExpirePasswordRequest |
AccountIterator |
getAccountIterator()
|
java.lang.Object |
getAttributeValue(java.lang.String name)
These are methods implemented in sources to get and set attributes. |
GenericObject |
getFeatures()
Expose features supported by the Resource Adapter. |
WSUser |
getUser(WSUser iduser)
Retrieve information about an account, and package it as a WSUser object. |
java.util.List |
listObjects(java.lang.String objectType,
java.util.Map options)
Default implementation calls older method ResourceAdapterBase.listAllObjects(String, Map, String, EncryptedData) , which
does not support newer options (such as "searchContext" or
"searchFilter"). |
protected org.openspml.v2.msg.spml.ListTargetsResponse |
listTargetsRequest(java.lang.String profile)
Executes a ListTargetRequest |
protected org.openspml.v2.msg.spml.LookupResponse |
lookupRequest(java.lang.String identity)
Executes a LookupRequest |
protected void |
outputResponse(org.openspml.v2.msg.spml.Response response)
|
protected void |
realCreate(WSUser user,
WavesetResult result)
Create a new user account on the resource. |
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 org.openspml.v2.msg.pass.ResetPasswordResponse |
resetPasswordRequest(java.lang.String identity)
Executes a ResetPasswordRequest |
protected org.openspml.v2.msg.spmlsuspend.ResumeResponse |
resumeRequest(java.lang.String identity,
java.util.Date effectiveDate)
Executes a ResumeRequest |
protected WSAttribute |
reverseMapAttr(java.lang.String attr,
java.lang.Object value)
Map from a resource attribute to a waveset attribute. |
protected org.openspml.v2.msg.spmlsearch.SearchResponse |
searchRequest(org.openspml.v2.msg.spmlsearch.Query query)
|
void |
setAttributeValue(java.lang.String name,
java.lang.Object value)
These are methods implemented in sources to get and set attributes. |
protected org.openspml.v2.msg.pass.SetPasswordResponse |
setPasswordRequest(java.lang.String identity,
java.lang.String password,
java.lang.String currentPassword)
Executes a SetPasswordRequest |
protected void |
startConnection()
Needs to be overridden by subclass if default createAccounts() implementation is used. |
static Resource |
staticCreatePrototypeResource()
Create resource prototype. |
protected void |
stopConnection()
Needs to be overridden by subclass if default createAccounts() implementation is used. |
boolean |
supportsAccountDisable()
This method indicates to the server that this resource natively supports account enable and disable. |
boolean |
supportsCaseInsensitiveAccountIds()
This method will return whether the resource adapter supports case insensitive account Ids or not. |
protected org.openspml.v2.msg.spmlsuspend.SuspendResponse |
suspendRequest(java.lang.String identity,
java.util.Date effectiveDate)
Executes a SuspendRequest |
WavesetResult |
updateObject(GenericObject object,
java.util.Map options)
Updates the specified objectId of type objectType using the list of attributes provided. |
protected org.openspml.v2.msg.pass.ValidatePasswordResponse |
validatePasswordRequest(java.lang.String identity,
java.lang.String password)
Executes a ValidatePasswordRequest |
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 TYPE
public static final java.lang.String RA_URL
public static final java.lang.String RA_USER
public static final java.lang.String RA_PASSWORD
public static final java.lang.String RA_TARGETID
public static final java.lang.String DSML_URN
Constructor Detail |
public ExampleSPML2ResourceAdapter(Resource res, ObjectCache cache)
public ExampleSPML2ResourceAdapter()
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 supportsCaseInsensitiveAccountIds()
supportsCaseInsensitiveAccountIds
in interface ResourceAdapter
supportsCaseInsensitiveAccountIds
in class ResourceAdapterBase
public boolean supportsAccountDisable()
supportsAccountDisable
in interface ResourceAdapter
supportsAccountDisable
in class ResourceAdapterBase
public java.lang.Object getAttributeValue(java.lang.String name) throws WavesetException
WavesetException
public void setAttributeValue(java.lang.String name, java.lang.Object value) throws WavesetException
WavesetException
protected WSAttribute reverseMapAttr(java.lang.String attr, java.lang.Object value)
protected final void outputResponse(org.openspml.v2.msg.spml.Response response)
protected org.openspml.v2.msg.spml.ListTargetsResponse listTargetsRequest(java.lang.String profile) throws WavesetException
WavesetException
protected org.openspml.v2.msg.spml.LookupResponse lookupRequest(java.lang.String identity) throws WavesetException
WavesetException
protected org.openspml.v2.msg.pass.SetPasswordResponse setPasswordRequest(java.lang.String identity, java.lang.String password, java.lang.String currentPassword) throws WavesetException
WavesetException
protected org.openspml.v2.msg.pass.ExpirePasswordResponse expirePasswordRequest(java.lang.String identity) throws WavesetException
WavesetException
protected org.openspml.v2.msg.pass.ResetPasswordResponse resetPasswordRequest(java.lang.String identity) throws WavesetException
WavesetException
protected org.openspml.v2.msg.pass.ValidatePasswordResponse validatePasswordRequest(java.lang.String identity, java.lang.String password) throws WavesetException
WavesetException
protected org.openspml.v2.msg.spmlsearch.SearchResponse searchRequest(org.openspml.v2.msg.spmlsearch.Query query) throws WavesetException
WavesetException
protected org.openspml.v2.msg.spmlsuspend.SuspendResponse suspendRequest(java.lang.String identity, java.util.Date effectiveDate) throws WavesetException
WavesetException
protected org.openspml.v2.msg.spmlsuspend.ResumeResponse resumeRequest(java.lang.String identity, java.util.Date effectiveDate) throws WavesetException
WavesetException
protected org.openspml.v2.msg.spmlsuspend.ActiveResponse activeRequest(java.lang.String identity) throws WavesetException
WavesetException
protected void startConnection() throws WavesetException
ResourceAdapterBase
startConnection
in class ResourceAdapterBase
WavesetException
protected void stopConnection() throws WavesetException
ResourceAdapterBase
stopConnection
in class ResourceAdapterBase
WavesetException
public WSUser buildUser(java.lang.String id)
public WSUser buildUser(org.openspml.v2.msg.spml.PSO pso)
public WSUser getUser(WSUser iduser) throws WavesetException
Information required to identify the resource account is supplied in another WSUser object.
The returned user object will resemble the source object, but will have its account attribute list filled in.
Returns "null" if there is no account that corresponds to the user.
getUser
in interface ResourceAdapter
getUser
in class ResourceAdapterBase
WavesetException
public WavesetResult checkCreateAccount(WSUser user) throws WavesetException
checkCreateAccount
in interface ResourceAdapter
checkCreateAccount
in class ResourceAdapterBase
WavesetException
protected void realCreate(WSUser user, WavesetResult result) throws WavesetException
realCreate
in class ResourceAdapterBase
WavesetException
public WavesetResult checkUpdateAccount(WSUser user) throws WavesetException
checkUpdateAccount
in interface ResourceAdapter
checkUpdateAccount
in class ResourceAdapterBase
WavesetException
protected void realUpdate(WSUser user, WavesetResult result) throws WavesetException
ResourceAdapterBase
realUpdate
in class ResourceAdapterBase
WavesetException
public WavesetResult checkDeleteAccount(WSUser user) throws WavesetException
checkDeleteAccount
in interface ResourceAdapter
checkDeleteAccount
in class ResourceAdapterBase
WavesetException
protected void realDelete(WSUser user, WavesetResult result) throws WavesetException
ResourceAdapterBase
realDelete
in class ResourceAdapterBase
WavesetException
protected void realEnable(WSUser user, WavesetResult result) throws WavesetException
realEnable
in class ResourceAdapterBase
WavesetException
protected void realDisable(WSUser user, WavesetResult result) throws WavesetException
realDisable
in class ResourceAdapterBase
WavesetException
public AccountIterator getAccountIterator() throws WavesetException
getAccountIterator
in interface ResourceAdapter
getAccountIterator
in class ResourceAdapterBase
WavesetException
public WavesetResult createObject(GenericObject object, java.util.Map options) throws WavesetException
ResourceAdapterBase
createObject
in interface ResourceAdapter
createObject
in class ResourceAdapterBase
object
- - a GenericObject containing the objectType, objectId, and
list of attributes to be set on the new objectoptions
- -
several options can be specified which control the behavior of
the search for referenced objects (e.g. group members) They
include:
WavesetException
public WavesetResult updateObject(GenericObject object, java.util.Map options) throws WavesetException
ResourceAdapterBase
updateObject
in interface ResourceAdapter
updateObject
in class ResourceAdapterBase
object
- - a GenericObject containing the objectType, objectId, and
list of new and changed attributes to be set on the objectoptions
- -
several options can be specified which control the behavior of
the search for referenced objects (e.g. group members) They
include:
WavesetException
public WavesetResult deleteObject(GenericObject object, java.util.Map options) throws WavesetException
ResourceAdapterBase
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 java.util.List listObjects(java.lang.String objectType, java.util.Map options) throws WavesetException
ResourceAdapterBase
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)}.
listObjects
in interface ResourceAdapter
listObjects
in class ResourceAdapterBase
WavesetException
public WavesetResult authenticate(java.util.HashMap loginInfo) throws WavesetException
authenticate
in interface ResourceAdapter
authenticate
in class ResourceAdapterBase
WavesetException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |