|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.adapter.ResourceAdapterBase
Nested Class Summary | |
protected class |
ResourceAdapterBase.SimpleAccountIterator
A simple implementation of an AccountIterator which given an Iterator over a set of account ids will use getUser() to fetch each account. |
Nested classes inherited from class com.waveset.adapter.ResourceAdapter |
ResourceAdapter.ActionResult, ResourceAdapter.Features, ResourceAdapter.ObjectType |
Field Summary | |
protected ObjectCache |
_cache
|
protected LighthouseContext |
_context
|
protected Rule |
_excludedAccountsRule
|
protected boolean |
_excludedAccountsRuleInited
|
protected AttrParse |
_listAllObjectsAttrParse
|
protected java.lang.String |
_listAllObjectsAttrParseName
|
protected AttrParse |
_listUserAttrParse
|
protected java.lang.String |
_listUserAttrParseName
|
protected AttrParse |
_listUserGroupsAttrParse
|
protected java.lang.String |
_listUserGroupsAttrParseName
|
protected Resource |
_resource
|
protected java.lang.Thread |
_thread
|
protected static Trace |
_trace
|
static java.lang.String |
CLASS
|
static java.lang.String |
code_id
|
static java.lang.String |
displayInfoCode
The exit code that an action should return if the action output needs to be displayed, but there is not a fatal error. |
static java.lang.String |
RA_BLOCKCOUNT
|
static java.lang.String |
RA_LOGIN_ACTION
|
static java.lang.String |
RA_LOGOFF_ACTION
|
static java.lang.String |
RA_MULTI_VALUED_ATTRS
|
static java.lang.String |
RA_TEST_MODE
This is the name of an optional property, which if set to "true", can be used to run an adapter in test mode. |
Constructor Summary | |
ResourceAdapterBase()
|
|
ResourceAdapterBase(Resource res,
LighthouseContext context)
|
|
ResourceAdapterBase(Resource res,
ObjectCache cache)
|
Method Summary | |
abstract WavesetResult |
authenticate(java.util.HashMap loginInfo)
Authenticates the user against the resource. |
abstract WavesetResult |
checkCreateAccount(WSUser user)
|
abstract WavesetResult |
checkDeleteAccount(WSUser user)
|
protected void |
checkForNoPasswordInSchema(Resource resource,
WavesetResult result,
WSUser user)
Verify that if a user has a password to be set that the resource has password mapped in its schema. |
protected void |
checkSyntax(Syntax syntax,
AccountAttributeType attrType,
java.lang.String mapName)
Confirm that the specified syntax matches that of the attribute. |
abstract WavesetResult |
checkUpdateAccount(WSUser user)
|
WavesetResult |
createAccount(WSUser user)
|
WavesetResult |
createAccounts(WSUser[] users)
|
java.lang.String |
createIdentity(WSUser user)
Create the user's identity (account name) based on the resource's identity template and the user's attributes. |
WavesetResult |
createObject(GenericObject object,
java.util.Map options)
Creates the specified objectId of type objectType using the list of attributes provided. |
abstract Resource |
createPrototypeResource()
|
WavesetResult |
deleteAccount(WSUser user)
|
WavesetResult |
deleteAccount(WSUser user,
long milliseconds)
Delete the resource account specified by the input WSUser. |
WavesetResult |
deleteAccounts(WSUser[] users)
|
WavesetResult |
deleteObject(GenericObject object,
java.util.Map options)
Deletes the requested objectId of the requested objectType from the resource. |
WavesetResult |
disableAccount(WSUser user)
|
WavesetResult |
disableAccounts(WSUser[] users)
|
protected boolean |
dnsEqual(java.lang.String dn1,
java.lang.String dn2)
This method will return true if dn1 equals dn2. |
static boolean |
dnsEqual(java.lang.String dn1,
java.lang.String dn2,
boolean isCaseSensitive)
This method will return true if dn1 equals dn2. |
WavesetResult |
enableAccount(WSUser user)
|
WavesetResult |
enableAccounts(WSUser[] users)
|
protected java.lang.String |
executeResourceAttributeJavascriptAction(java.lang.String resAttrName,
java.util.Map globals)
|
static void |
fillInResourceInfo(WSUser user,
Resource r,
java.lang.String resoAcctId,
ResourceAdapter ra)
Called by the loader to flesh out a ResourceInfo object for a resource we've discovering through the load. |
static void |
fillInResourceInfo(WSUser user,
Resource r,
java.lang.String resoAcctId,
java.lang.String guid,
ResourceAdapter ra)
Called by the loader to flesh out a ResourceInfo object for a resource we've discovering through the load. |
WSAttributes |
getAccountAttributes(java.lang.String accountIdentity)
This method is obsolete. |
AccountIterator |
getAccountIterator()
|
AccountIterator |
getAccountIterator(long milliseconds)
|
AccountIterator |
getAccountIterator(java.util.Map filterParams)
Like getAccountIterator but takes a Map param. |
protected java.lang.String |
getAction(ResourceAction action,
WavesetResult result)
|
protected ErrorMessage |
getActionNotFoundErrorMessage(java.lang.String action,
java.lang.String resType,
java.lang.String resName,
Severity severity)
|
protected Message |
getActionNotFoundMessage(java.lang.String action,
java.lang.String resType,
java.lang.String resName)
Deprecated. Use getActionNotFoundErrorMessage() instead. |
protected EncryptedData |
getActionRunAsPassword(ResourceAction action)
|
protected java.lang.String |
getActionRunAsUser(ResourceAction action)
|
protected int |
getActionTimeout(ResourceAction action)
|
protected java.lang.String |
getActionType(ResourceAction action)
|
static ResourceAdapter |
getAdapter(Resource res,
LighthouseContext context)
Deprecated. As of IdM 5.5, use getAdapterProxy(Resource, LighthouseContext) |
static ResourceAdapter |
getAdapter(Resource res,
ObjectCache cache)
Deprecated. As of IdM 5.5, use getAdapterProxy( Resource, LighthouseContext ) |
static ResourceAdapter |
getAdapter(Resource res,
ObjectCache cache,
WSUser user)
Deprecated. - Use getAdapterProxy(Resource, ObjectCache). |
static ResourceAdapter |
getAdapterProxy(Resource res,
LighthouseContext context)
The preferred factory method to a proxy to the ResourceAdapter for the resource, which provides common functionality across adapters. |
static ResourceAdapter |
getAdapterProxy(Resource res,
ObjectCache cache)
Supported, but not the preferred factory method. |
java.util.List |
getAllAccounts()
Returns all of the accounts in this resource as a list of WSUser objects. |
protected java.lang.String |
getAttrNameFromMapName(java.lang.String mapName)
Get the Waveset attribute name that corresponds to the resource user attribute (or map) name. |
protected java.lang.String |
getAttrNameFromMapName(java.lang.String mapName,
boolean ignoreCase)
Get the Waveset attribute name that corresponds to the resource user attribute (or map) name. |
protected AttrParse |
getAttrParse(java.lang.String attrParseName)
|
protected AccountAttributeType |
getAttrTypeFromMapName(java.lang.String mapName)
Get the AccountAttributeType that corresponds to the resource user attribute (or map name). |
protected AccountAttributeType |
getAttrTypeFromMapName(java.lang.String mapName,
boolean ignoreCase)
Get the AccountAttributeType that corresponds to the resource user attribute (or map name). |
java.lang.String |
getAUserName(WSUser user)
Returns a non-empty, non-null name for the user for this adapter. |
java.lang.String |
getBaseContextAttrName()
Deprecated. As of 4.0 use getBaseContexts() . |
GenericObject |
getBaseContextObject(java.lang.String baseContext)
|
java.util.List |
getBaseContexts()
Needs to be overridden by subclass in order to support browsing and editing of resource objects |
int |
getBlockSize()
|
LighthouseContext |
getContext()
|
Rule |
getExcludedAccountsRule()
|
GenericObject |
getFeatures()
Expose features supported by the Resource Adapter. |
java.lang.String |
getIdentity(WSUser user)
Return the account id for the user, fetched from the resource info. |
protected AttrParse |
getListAllObjectsAttrParse()
|
protected AttrParse |
getListUserAttrParse()
|
protected AttrParse |
getListUserGroupsAttrParse()
|
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 |
java.lang.Boolean |
getOptionalBooleanResAttrVal(java.lang.String name)
True if the value is 1, true, or yes, false otherwise. |
protected java.lang.Boolean |
getOptionalBooleanResAttrVal(java.lang.String name,
boolean defaultValue)
True if the value is 1, true, or yes, false otherwise if the value exists. |
protected EncryptedData |
getOptionalEncryptedResAttrVal(java.lang.String name)
|
protected java.lang.Object |
getOptionalResAttrVal(java.lang.String name)
|
protected java.lang.String |
getOptionalStringResAttrVal(java.lang.String name)
|
static ResourceAttribute |
getRequiredResAttr(Resource resource,
java.lang.String name)
|
protected ResourceAttribute |
getRequiredResAttr(java.lang.String name)
|
static java.lang.Object |
getRequiredResAttrVal(Resource resource,
java.lang.String name)
|
protected java.lang.Object |
getRequiredResAttrVal(java.lang.String name)
|
protected java.util.List |
getRequiredResAttrVals(java.lang.String name)
|
static java.lang.String[] |
getRequiredUserAttributeNames(Resource resource)
Given a resource, get the names of required attributes to create a user there. |
com.waveset.adapter.util.ActionOnUser |
getResAttrValActionOnUser(java.lang.String cName,
java.lang.String pName,
java.lang.Class type)
|
protected java.util.List |
getResAttrVals(java.lang.String name)
|
Resource |
getResource()
|
java.util.List |
getResourceAccounts(java.util.List attributes)
|
protected ResourceInfo |
getResourceInfo(WSUser user)
Helper method used to return the ResourceInfo on the user that corresponds to this resource adapter. |
protected java.lang.String |
getResourceObjectAttrValNameAttr(java.lang.String attrName,
java.lang.String objectType,
java.lang.String defaultName)
|
protected java.util.List |
getResourceObjectClassAttr()
|
protected static java.lang.String |
getResourceObjectTypePrefix(java.lang.String objType)
|
protected java.util.Map |
getSchemaMap()
Get a Map of schema map entries (keyed by the right hand side, values are the names of the left hand side). |
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. |
WSUser |
getUser(WSUser user,
long milliseconds)
|
protected WSAttribute |
getWSAttrByMapName(WSUser user,
java.lang.String mapName)
|
protected WSAttribute |
getWSAttrByMapName(WSUser user,
java.lang.String mapName,
boolean ignoreCase)
|
protected WSAttribute |
getWSAttrFromMap(AccountAttributeType attrType,
java.util.Map map,
boolean supportMultiValuedAttrs)
|
protected boolean |
handleActionResult(WavesetResult result,
java.lang.String actionType,
boolean warnOnError)
|
protected void |
handleJavascriptActionResult(WavesetResult result,
java.lang.String actionName)
Reprocess the WavesetResult to generate standard visible messages for the invocation of a Javascript action |
protected boolean |
isAccountAttributeSecret(java.lang.String mapName)
Determines if a specified RHS attribute is secret. |
boolean |
isExcludedAccount(java.lang.String account)
Deprecated. See ResourceAdapterProxy#isExcludedAccount(String, Map, ResourceOperation, Rule) |
boolean |
isExcludedAccount(java.lang.String account,
Rule excludedRule)
Deprecated. See ResourceAdapterProxy#isExcludedAccount(String, Map, ResourceOperation, Rule) |
protected boolean |
isFeatureEnabled(java.lang.String feature)
Utility method to check if the specified Feature is supported and enabled. |
boolean |
isSupported(java.lang.String feature)
|
protected boolean |
isTestMode()
|
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. |
java.util.ArrayList |
listAllObjects(java.lang.String objectType,
java.util.Map options,
java.lang.String runAsUser,
EncryptedData runAsPassword,
long milliseconds)
|
java.util.List |
listObjects(java.util.Map options)
List objects (of any valid object type) that match the search criteria specified in |
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"). |
java.util.List |
listObjectsOfType(java.lang.String objectType,
java.util.Map options)
List objects of the specified object type that match the search criteria specified in |
protected ResourceAction |
lookupAction(java.lang.String actionName)
|
protected ResourceAction |
lookupAction(WSUser user,
java.lang.String operation,
java.lang.String timing)
|
protected java.util.List |
lookupActions(WSUser user,
java.lang.String operation,
java.lang.String timing)
|
boolean |
namesEqual(java.lang.String name1,
java.lang.String name2)
This method will return true if name1 equals name2. |
protected boolean |
objectClassesMatchType(GenericObject obj,
java.lang.String objtype,
java.lang.String objClassAttrName,
boolean matchIfNoObjectClasses)
Utility function to determine if obj really is of type objtype. |
protected static void |
println(java.lang.Object o)
|
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 |
restoreResourceObjectClassAttr(java.util.List prevObjClasses)
|
WavesetResult |
run(ResourceAction action)
Runs a ResourceAction - The implementation almost always calls run(ResourceAction, Map) with a null Map. |
WavesetResult |
run(ResourceAction action,
java.util.Map args)
This is NOT supported by default. |
protected void |
runResourceAttributeJavascriptAction(java.lang.String resAttrName,
java.util.Map globals)
|
WavesetResult |
scan(java.util.Map parameters)
|
void |
setCache(ObjectCache cache)
|
void |
setContext(LighthouseContext context)
|
protected void |
setDisabled(WSUser user,
boolean disabled)
Helper function to set the disabled on flag on the specified user on the ResourceInfo that corresponds to this resource adapter. |
protected void |
setFromResource()
|
void |
setResource(Resource res)
|
void |
setResourceObjectClassAttr(java.lang.String objectType,
boolean primary)
Set the object class attr value, return the old one. |
static void |
setResourceOptionAttrs(Resource res,
java.util.Map options,
java.lang.String roTypePrefix)
|
protected void |
startConnection()
Needs to be overridden by subclass if default createAccounts() implementation is used. |
protected void |
startConnectionWrapper()
|
protected void |
stopConnection()
Needs to be overridden by subclass if default createAccounts() implementation is used. |
boolean |
supportsAccountActions()
|
boolean |
supportsAccountDisable()
Indicates whether or not this resource supports account disable. |
boolean |
supportsActions()
|
boolean |
supportsCaseInsensitiveAccountIds()
This method will return whether the resource adapter supports case insensitive account Ids or not. |
boolean |
supportsContainerObjectTypes()
Returns true if the resource adapter is a directory that supports container objects like organizations, containers, and organizational units. |
boolean |
supportsExcludedAccounts()
|
boolean |
supportsResourceAccount()
Returns true if the resource adapter supports modifications to the resource account. |
boolean |
supportsScanning()
|
WavesetResult |
testConfiguration()
Default implementation of test method, calls check create. |
WavesetResult |
updateAccount(WSUser user)
|
WavesetResult |
updateAccounts(WSUser[] users)
|
WavesetResult |
updateObject(GenericObject object,
java.util.Map options)
Updates the specified objectId of type objectType using the list of attributes provided. |
WavesetResult |
updateResourceAccount(GenericObject account)
|
protected void |
updateResourceIdentity(WSUser user)
|
boolean |
vmStoreBoot(java.util.Map map)
If the current resource does not possess a map, then set the current resource's vmStore map to the map given. |
java.lang.Object |
vmStoreGet(java.lang.String key)
|
java.util.Map |
vmStoreInit(java.util.Map map)
Replace the current resource's map with the given map |
java.lang.Object |
vmStoreLatch(java.lang.String key,
java.lang.Object value)
Store the given object at the key given if, and only if, the current object found at the key is null or doesn't exist. |
java.lang.Object |
vmStorePut(java.lang.String key,
java.lang.Object value)
|
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 RA_BLOCKCOUNT
public static final java.lang.String RA_LOGIN_ACTION
public static final java.lang.String RA_LOGOFF_ACTION
public static final java.lang.String RA_MULTI_VALUED_ATTRS
public static final java.lang.String RA_TEST_MODE
public static final java.lang.String CLASS
public static final java.lang.String displayInfoCode
protected LighthouseContext _context
protected ObjectCache _cache
protected Resource _resource
protected java.lang.Thread _thread
protected Rule _excludedAccountsRule
protected boolean _excludedAccountsRuleInited
protected static Trace _trace
protected java.lang.String _listAllObjectsAttrParseName
protected AttrParse _listAllObjectsAttrParse
protected java.lang.String _listUserAttrParseName
protected AttrParse _listUserAttrParse
protected java.lang.String _listUserGroupsAttrParseName
protected AttrParse _listUserGroupsAttrParse
Constructor Detail |
public ResourceAdapterBase()
public ResourceAdapterBase(Resource res, ObjectCache cache)
public ResourceAdapterBase(Resource res, LighthouseContext context)
Method Detail |
protected static void println(java.lang.Object o)
public boolean vmStoreBoot(java.util.Map map)
map
-
public java.lang.Object vmStoreGet(java.lang.String key)
key
-
public java.util.Map vmStoreInit(java.util.Map map)
map
-
public java.lang.Object vmStoreLatch(java.lang.String key, java.lang.Object value)
key
- (must be a string)value
- (arbitrary object)
public java.lang.Object vmStorePut(java.lang.String key, java.lang.Object value)
key
- value
-
protected AttrParse getListAllObjectsAttrParse() throws WavesetException
WavesetException
protected AttrParse getListUserAttrParse() throws WavesetException
WavesetException
protected AttrParse getListUserGroupsAttrParse() throws WavesetException
WavesetException
public void setResource(Resource res)
setResource
in interface ResourceAdapter
protected void setFromResource()
public void setCache(ObjectCache cache)
setCache
in interface ResourceAdapter
public void setContext(LighthouseContext context)
setContext
in interface ResourceAdapter
public LighthouseContext getContext()
public com.waveset.adapter.util.ActionOnUser getResAttrValActionOnUser(java.lang.String cName, java.lang.String pName, java.lang.Class type)
cName
- pName
- type
-
public Resource getResource()
getResource
in interface ResourceAdapter
public abstract Resource createPrototypeResource() throws WavesetException
createPrototypeResource
in interface ResourceAdapter
WavesetException
public static ResourceAdapter getAdapterProxy(Resource res, LighthouseContext context) throws WavesetException
LighthouseContext
(rather than an ObjectCache
)
permits the adapter maximum flexibility. In particular, an
ActiveSync
adapter may need a LighthouseContext
in order to submit IAPI
events.
res
- context
-
WavesetException
public static ResourceAdapter getAdapterProxy(Resource res, ObjectCache cache) throws WavesetException
LighthouseContext
(rather than an ObjectCache
)
permits the adapter maximum flexibility. In particular, an
ActiveSync
adapter may need a
LighthouseContext
in order to submit IAPI
events.
WavesetException
public static ResourceAdapter getAdapter(Resource res, ObjectCache cache, WSUser user) throws WavesetException
WavesetException
public static ResourceAdapter getAdapter(Resource res, LighthouseContext context) throws WavesetException
LighthouseContext
(rather than an ObjectCache
) permits the adapter maximum
flexibility. In particular, an ActiveSync
adapter may need
a LighthouseContext
in order to submit IAPI
events.
WavesetException
public static ResourceAdapter getAdapter(Resource res, ObjectCache cache) throws WavesetException
LighthouseContext
(rather than an ObjectCache
)
permits the adapter maximum flexibility. In particular, an
ActiveSync
adapter may need a
LighthouseContext
in order to submit IAPI
events.
WavesetException
public GenericObject getFeatures()
getFeatures
in interface ResourceAdapter
ResourceAdapter.Features
public boolean isSupported(java.lang.String feature)
isSupported
in interface ResourceAdapter
protected void startConnectionWrapper() throws WavesetException
WavesetException
protected void startConnection() throws WavesetException
WavesetException
protected void realCreate(WSUser user, WavesetResult result) throws WavesetException
WavesetException
protected void stopConnection() throws WavesetException
WavesetException
public abstract WavesetResult checkCreateAccount(WSUser user) throws WavesetException
checkCreateAccount
in interface ResourceAdapter
WavesetException
public WavesetResult createAccounts(WSUser[] users) throws WavesetException
createAccounts
in interface ResourceAdapter
WavesetException
public abstract WavesetResult checkUpdateAccount(WSUser user) throws WavesetException
checkUpdateAccount
in interface ResourceAdapter
WavesetException
protected void realUpdate(WSUser user, WavesetResult result) throws WavesetException
WavesetException
public WavesetResult updateAccounts(WSUser[] users) throws WavesetException
updateAccounts
in interface ResourceAdapter
WavesetException
public abstract WavesetResult checkDeleteAccount(WSUser user) throws WavesetException
checkDeleteAccount
in interface ResourceAdapter
WavesetException
protected void realDelete(WSUser user, WavesetResult result) throws WavesetException
WavesetException
public WavesetResult deleteAccounts(WSUser[] users) throws WavesetException
deleteAccounts
in interface ResourceAdapter
WavesetException
public WSUser getUser(WSUser user) throws WavesetException
ResourceAdapter
getUser
in interface ResourceAdapter
WavesetException
public abstract WavesetResult authenticate(java.util.HashMap loginInfo) throws WavesetException
ResourceAdapter
authenticate
in interface ResourceAdapter
WavesetException
public WSAttributes getAccountAttributes(java.lang.String accountIdentity) throws WavesetException
ResourceAdapter
getAccountAttributes
in interface ResourceAdapter
WavesetException
public WavesetResult createAccount(WSUser user) throws WavesetException
createAccount
in interface ResourceAdapter
WavesetException
public WavesetResult updateAccount(WSUser user) throws WavesetException
updateAccount
in interface ResourceAdapter
WavesetException
public WavesetResult deleteAccount(WSUser user) throws WavesetException
deleteAccount
in interface ResourceAdapter
WavesetException
protected ResourceAttribute getRequiredResAttr(java.lang.String name) throws WavesetException
WavesetException
public static ResourceAttribute getRequiredResAttr(Resource resource, java.lang.String name) throws WavesetException
WavesetException
protected java.util.List getRequiredResAttrVals(java.lang.String name) throws WavesetException
WavesetException
protected java.util.List getResAttrVals(java.lang.String name)
protected java.lang.Object getRequiredResAttrVal(java.lang.String name) throws WavesetException
WavesetException
public static java.lang.Object getRequiredResAttrVal(Resource resource, java.lang.String name) throws WavesetException
WavesetException
protected java.lang.String getOptionalStringResAttrVal(java.lang.String name)
protected java.lang.Object getOptionalResAttrVal(java.lang.String name)
public java.lang.Boolean getOptionalBooleanResAttrVal(java.lang.String name)
protected java.lang.Boolean getOptionalBooleanResAttrVal(java.lang.String name, boolean defaultValue)
protected EncryptedData getOptionalEncryptedResAttrVal(java.lang.String name)
public java.lang.String createIdentity(WSUser user) throws WavesetException
createIdentity
in interface ResourceAdapter
WavesetException
public java.lang.String getIdentity(WSUser user) throws WavesetException
WavesetException
public java.lang.String getAUserName(WSUser user)
public boolean supportsExcludedAccounts()
supportsExcludedAccounts
in interface ResourceAdapter
Any adapter for a resource with support for exclusion of accounts
should override this method to return true
.
public Rule getExcludedAccountsRule() throws WavesetException
WavesetException
public boolean isExcludedAccount(java.lang.String account) throws WavesetException
WavesetException
public boolean isExcludedAccount(java.lang.String account, Rule excludedRule) throws WavesetException
WavesetException
public java.util.List getAllAccounts() throws WavesetException
jsl - this is temporary, need to come up with an efficient way to iterate over the accounts.
getAllAccounts
in interface ResourceAdapter
WavesetException
public AccountIterator getAccountIterator() throws WavesetException
getAccountIterator
in interface ResourceAdapter
WavesetException
public AccountIterator getAccountIterator(java.util.Map filterParams) throws WavesetException
ResourceAdapter
getAccountIterator
in interface ResourceAdapter
WavesetException
public WavesetResult scan(java.util.Map parameters) throws WavesetException
scan
in interface ResourceAdapter
WavesetException
public boolean supportsScanning() throws WavesetException
supportsScanning
in interface ResourceAdapter
WavesetException
public boolean supportsContainerObjectTypes() throws WavesetException
supportsContainerObjectTypes
in interface ResourceAdapter
WavesetException
public boolean supportsResourceAccount() throws WavesetException
supportsResourceAccount
in interface ResourceAdapter
WavesetException
public java.lang.String getBaseContextAttrName() throws WavesetException
getBaseContexts()
.
getBaseContextAttrName
in interface ResourceAdapter
WavesetException
public java.util.List getBaseContexts() throws WavesetException
getBaseContexts
in interface ResourceAdapter
WavesetException
public GenericObject getBaseContextObject(java.lang.String baseContext) throws WavesetException
getBaseContextObject
in interface ResourceAdapter
WavesetException
protected boolean objectClassesMatchType(GenericObject obj, java.lang.String objtype, java.lang.String objClassAttrName, boolean matchIfNoObjectClasses) throws WavesetException
WavesetException
public GenericObject getObject(java.lang.String objectType, java.lang.String objectId, java.util.List attrsToGet, java.util.Map options) throws WavesetException
getObject
in interface ResourceAdapter
objectType
- - a valid object type defined in the resource's
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 objectoptions
- -
not currently used since the objectId/objectType provide a
unique identifier of the object being requested
WavesetException
public WavesetResult createObject(GenericObject object, java.util.Map options) throws WavesetException
createObject
in interface ResourceAdapter
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
updateObject
in interface ResourceAdapter
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
deleteObject
in interface ResourceAdapter
options
- -
not currently used because the objectId and objectType
parameters uniquely identify the object to delete.object
-
WavesetException
public java.util.List listObjectsOfType(java.lang.String objectType, java.util.Map options) throws WavesetException
listObjectsOfType
in interface ResourceAdapter
options
-
WavesetException
public java.util.List listObjects(java.util.Map options) throws WavesetException
listObjects
in interface ResourceAdapter
options
-
WavesetException
ResourceAdapter.listObjects(String, Map).
protected java.util.List getResourceObjectClassAttr()
public void setResourceObjectClassAttr(java.lang.String objectType, boolean primary)
setResourceObjectClassAttr
in interface ResourceAdapter
protected void restoreResourceObjectClassAttr(java.util.List prevObjClasses)
public static void setResourceOptionAttrs(Resource res, java.util.Map options, java.lang.String roTypePrefix)
public java.util.List listObjects(java.lang.String objectType, java.util.Map options) throws WavesetException
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
objectType
- the name of an object class that is
valid for the resource specified by the value of option "resId".
If objectType
is null, this method will list objects
of the types specified in the resource's
options
- control the behavior of the search.
Supported options include:
Must be overridden by each subclass in order to support browsing and editing of resource objects.
WavesetException
and
'ed or or
'ed together.
If not specified, this method will construct a search filter
using the specified objectType.,
runAsUser
.
Required in order to authenticate with resource
so that we can to execute the list request as the specified user.
What is the format? Is it encrypted and base-64-encoded,
as returned by EncyptedData.toString()
?
protected static java.lang.String getResourceObjectTypePrefix(java.lang.String objType)
protected java.lang.String getResourceObjectAttrValNameAttr(java.lang.String attrName, java.lang.String objectType, java.lang.String defaultName) throws WavesetException
WavesetException
public java.util.ArrayList listAllObjects(java.lang.String objectType, java.util.Map options, java.lang.String runAsUser, EncryptedData runAsPassword) throws WavesetException
ResourceAdapter
listAllObjects
in interface ResourceAdapter
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 java.util.List getResourceAccounts(java.util.List attributes) throws WavesetException
getResourceAccounts
in interface ResourceAdapter
attributes
- a list of attribute names whose values are to
be returned with the account object.
WavesetException
public WavesetResult updateResourceAccount(GenericObject account) throws WavesetException
updateResourceAccount
in interface ResourceAdapter
WavesetException
public int getBlockSize() throws WavesetException
WavesetException
public boolean supportsCaseInsensitiveAccountIds()
supportsCaseInsensitiveAccountIds
in interface ResourceAdapter
Any adapter for a resource with case-sensitive account ids
should override this method to return false
.
public boolean namesEqual(java.lang.String name1, java.lang.String name2)
Whether we do a case sensitive compare of the normalized names or a case insensitive compare will be determined by asking the resource which one it supports (via supportsCaseInsensitiveAccountIds()).
namesEqual
in interface ResourceAdapter
protected boolean dnsEqual(java.lang.String dn1, java.lang.String dn2)
We will normalize the two dns before checking for equality. Normalization will be done using an implementation of RFC2253 which specifies the standard for the string representation of distinguished names handling issue such as capitalization, component ordering, special characters, internationalized characters, trimming spaces, etc.
Whether we do a case sensitive compare of the normalized names or a case insensitive compare will be determined by asking the resource which one it supports (via supportsCaseInsensitiveAccountIds()).
public static boolean dnsEqual(java.lang.String dn1, java.lang.String dn2, boolean isCaseSensitive)
We will normalize the two dns before checking for equality. Normalization will be done using an implementation of RFC2253 which specifies the standard for the string representation of distinguished names handling issue such as capitalization, component ordering, special characters, internationalized characters, trimming spaces, etc.
protected void setDisabled(WSUser user, boolean disabled)
public WavesetResult disableAccount(WSUser user) throws WavesetException
disableAccount
in interface ResourceAdapter
WavesetException
public boolean supportsAccountDisable()
ResourceAdapter
supportsAccountDisable
in interface ResourceAdapter
protected void realDisable(WSUser user, WavesetResult result) throws WavesetException
WavesetException
public WavesetResult disableAccounts(WSUser[] users) throws WavesetException
disableAccounts
in interface ResourceAdapter
WavesetException
public WavesetResult enableAccount(WSUser user) throws WavesetException
enableAccount
in interface ResourceAdapter
WavesetException
protected void realEnable(WSUser user, WavesetResult result) throws WavesetException
WavesetException
public WavesetResult enableAccounts(WSUser[] users) throws WavesetException
enableAccounts
in interface ResourceAdapter
WavesetException
protected void updateResourceIdentity(WSUser user) throws WavesetException
WavesetException
protected AccountAttributeType getAttrTypeFromMapName(java.lang.String mapName)
protected AccountAttributeType getAttrTypeFromMapName(java.lang.String mapName, boolean ignoreCase)
protected java.util.Map getSchemaMap()
protected java.lang.String getAttrNameFromMapName(java.lang.String mapName)
protected java.lang.String getAttrNameFromMapName(java.lang.String mapName, boolean ignoreCase)
protected WSAttribute getWSAttrByMapName(WSUser user, java.lang.String mapName)
protected WSAttribute getWSAttrByMapName(WSUser user, java.lang.String mapName, boolean ignoreCase)
protected WSAttribute getWSAttrFromMap(AccountAttributeType attrType, java.util.Map map, boolean supportMultiValuedAttrs) throws WavesetException
WavesetException
protected ResourceInfo getResourceInfo(WSUser user)
protected void checkSyntax(Syntax syntax, AccountAttributeType attrType, java.lang.String mapName) throws WavesetException
WavesetException
public boolean supportsActions()
supportsActions
in interface ResourceAdapter
public WavesetResult run(ResourceAction action, java.util.Map args) throws WavesetException
run
in interface ResourceAdapter
action
- The action to executeargs
- Additional args, can be null.
WavesetException
public WavesetResult run(ResourceAction action) throws WavesetException
ResourceAdapter
run
in interface ResourceAdapter
action
-
WavesetException
run(com.waveset.object.ResourceAction, java.util.Map)
protected ResourceAction lookupAction(WSUser user, java.lang.String operation, java.lang.String timing) throws WavesetException
WavesetException
protected ResourceAction lookupAction(java.lang.String actionName) throws WavesetException
WavesetException
protected java.util.List lookupActions(WSUser user, java.lang.String operation, java.lang.String timing) throws WavesetException
WavesetException
protected java.lang.String getAction(ResourceAction action, WavesetResult result)
protected java.lang.String getActionType(ResourceAction action)
protected java.lang.String getActionRunAsUser(ResourceAction action)
protected EncryptedData getActionRunAsPassword(ResourceAction action)
protected AttrParse getAttrParse(java.lang.String attrParseName) throws WavesetException
WavesetException
protected void runResourceAttributeJavascriptAction(java.lang.String resAttrName, java.util.Map globals) throws java.lang.Exception
java.lang.Exception
protected java.lang.String executeResourceAttributeJavascriptAction(java.lang.String resAttrName, java.util.Map globals) throws java.lang.Exception
java.lang.Exception
protected Message getActionNotFoundMessage(java.lang.String action, java.lang.String resType, java.lang.String resName)
protected ErrorMessage getActionNotFoundErrorMessage(java.lang.String action, java.lang.String resType, java.lang.String resName, Severity severity)
protected int getActionTimeout(ResourceAction action)
protected boolean handleActionResult(WavesetResult result, java.lang.String actionType, boolean warnOnError) throws WavesetException
WavesetException
protected void handleJavascriptActionResult(WavesetResult result, java.lang.String actionName) throws WavesetException
result
- in/out WavesetResultactionName
- ResoureAction name
WavesetException
public boolean supportsAccountActions()
protected boolean isTestMode()
public WavesetResult testConfiguration() throws WavesetException
testConfiguration
in interface ResourceAdapter
WavesetException
public static java.lang.String[] getRequiredUserAttributeNames(Resource resource) throws WavesetException
WavesetException
protected void checkForNoPasswordInSchema(Resource resource, WavesetResult result, WSUser user) throws WavesetException
WavesetException
public WSUser getUser(WSUser user, long milliseconds) throws WavesetException, java.lang.InterruptedException
getUser
in interface ResourceAdapter
milliseconds
- how many milliseconds to wait
java.lang.InterruptedException
- if the operation does not complete within the specified timeout.
WavesetException
public WavesetResult deleteAccount(WSUser user, long milliseconds) throws WavesetException, java.lang.InterruptedException
ResourceAdapter
deleteAccount
in interface ResourceAdapter
milliseconds
- how many milliseconds to wait
java.lang.InterruptedException
- if the operation does not complete
within the specified timeout.
WavesetException
public AccountIterator getAccountIterator(long milliseconds) throws WavesetException, java.lang.InterruptedException
getAccountIterator
in interface ResourceAdapter
milliseconds
- how many milliseconds to wait
java.lang.InterruptedException
- if the operation does not complete
within the specified timeout.
WavesetException
public java.util.ArrayList listAllObjects(java.lang.String objectType, java.util.Map options, java.lang.String runAsUser, EncryptedData runAsPassword, long milliseconds) throws WavesetException, java.lang.InterruptedException
listAllObjects
in interface ResourceAdapter
milliseconds
- how many milliseconds to wait
java.lang.InterruptedException
- if the operation does not complete
within the specified timeout.
WavesetException
public static void fillInResourceInfo(WSUser user, Resource r, java.lang.String resoAcctId, ResourceAdapter ra) throws WavesetException
WavesetException
public static void fillInResourceInfo(WSUser user, Resource r, java.lang.String resoAcctId, java.lang.String guid, ResourceAdapter ra) throws WavesetException
WavesetException
protected boolean isAccountAttributeSecret(java.lang.String mapName)
mapName
- - the RHS attribute name
protected final boolean isFeatureEnabled(java.lang.String feature)
feature
- Feature string, see ResourceAdapter.Features
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |