|
||||||||||
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.LDAPResourceAdapterBase
Nested Class Summary | |
class |
LDAPResourceAdapterBase.AcctIter
Class AcctIter |
protected class |
LDAPResourceAdapterBase.BlockAcctIter
Implemenets a buffered account iterator used when Virtual List View controls are not available. |
protected class |
LDAPResourceAdapterBase.UpdateRow
A row of data returned by getUpdateRows |
protected class |
LDAPResourceAdapterBase.UpdateRows
Returned by getUpdateRows, this has a list of rows to update and a single row that is the "last one" to be saved for the next search so that we know where to start from. |
class |
LDAPResourceAdapterBase.VLVAcctIter
The VLVAcctIter class uses the VirtualListViewControl from JNDI to get users from the LDAP server in blocks with blocksize users. |
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 com.waveset.adapter.util.ActionOnUser |
_accountActivator
|
protected javax.naming.directory.DirContext |
_ctx
|
protected boolean |
_encodePwd
|
protected static java.lang.String |
ALL_NON_OPERATIONAL_ATTRIBUTES
"*" is a special attribute for searching LDAP that instructs the server to return all non-operational attributes in addition to any explicitly listed attributes. |
static java.lang.String |
CLASS
|
static java.lang.String |
code_id
|
static java.lang.String |
LDAP_GROUPS_ATTR_NAME
|
static java.lang.String |
LDAP_SEARCH_ATTRIBUTE_NAMES
|
static java.lang.String |
LDAP_SEARCH_END_DATE
|
static java.lang.String |
LDAP_SEARCH_FILTER_STRING
Constants for tailoring the search filter string. |
static java.lang.String |
LDAP_SEARCH_OBJECT_CLASSES
|
static java.lang.String |
LDAP_SEARCH_START_DATE
|
static java.lang.String |
MICROSOFT
|
static java.lang.String |
NETSCAPE
|
static java.lang.String |
OPENLDAP
The following vendor strings must have values that are unique. |
static java.lang.String |
POSIX_GROUPS_ATTR_NAME
|
static java.lang.String |
RA_ACTIVE_SYNC_LDAP_FILTER
|
static java.lang.String |
RA_ACTIVE_SYNC_OBJECT_CLASSES
|
static java.lang.String |
RA_ATTRIBUTE_FILTER
|
static java.lang.String |
RA_BLOCKSIZE
|
static java.lang.String |
RA_CHANGE_NUMBER_ATTRIBUTE_NAME
|
static java.lang.String |
RA_ENABLE_CONNECTION_POOLING
true <=> connection pooling will be used for some connections |
static java.lang.String |
RA_GROUP_OBJCLASS
|
static java.lang.String |
RA_GRP_MBR_ATTR
|
static java.lang.String |
RA_HOST
|
static java.lang.String |
RA_INCL_OBJCLASSES_IN_SEARCH_FILTER
true <=> the object classes are AND'ed into the filter. |
static java.lang.String |
RA_LDAP_SEARCH_FILTER
used when listing accounts (optional) |
static java.lang.String |
RA_MOD_NAMING_ATTR
|
static java.lang.String |
RA_PASSWORD
|
static java.lang.String |
RA_PORT
|
static java.lang.String |
RA_PROCESS_NAME
Deprecated. as of IdM 5.5. Use RA_PROCESS_RULE instead. |
static java.lang.String |
RA_SSL
|
static java.lang.String |
RA_USE_BLOCKS
|
static java.lang.String |
RA_USERDN
|
static java.lang.String |
RA_VLV_SORT_ATTRIBUTE
|
static java.lang.String |
RA_WSNAME
|
static java.lang.String |
SUN
|
static java.lang.String |
UNDISCOVERED
|
static java.lang.String |
UNKNOWN
|
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 | |
LDAPResourceAdapterBase()
|
|
LDAPResourceAdapterBase(Resource res,
ObjectCache cache)
|
Method Summary | |
protected boolean |
addAttributes(com.waveset.adapter.LDAPResourceAdapterBase.LDAPObject ldapObject,
WSUser user,
java.lang.String operation,
WavesetResult result)
This may be overloaded by a subclass. |
protected void |
addUserToGroup(com.waveset.adapter.LDAPResourceAdapterBase.LDAPObject ldapObject,
java.lang.String grpMemberAttr,
java.lang.String group)
Deprecated. Use addUserToGroup(String, String, String). |
protected void |
addUserToGroup(java.lang.String accountRef,
java.lang.String grpMemberAttr,
java.lang.String group)
|
protected void |
addUserToGroups(com.waveset.adapter.LDAPResourceAdapterBase.LDAPObject ldapObject,
java.lang.String accountRef,
java.lang.String accountRefAttr,
boolean accountRefIsDN,
java.lang.String groupsAttrName,
java.lang.String grpMemberAttr,
WSUser user,
java.lang.String operation,
WavesetResult result)
|
protected void |
addUserToGroups(com.waveset.adapter.LDAPResourceAdapterBase.LDAPObject ldapObject,
WSUser user,
java.lang.String operation,
WavesetResult result)
Ensure that the user's group membership is as specified in the LDAP_GROUPS_ATTR_NAME attr. |
WavesetResult |
authenticate(java.util.HashMap loginInfo)
Authenticates the user against the resource. |
protected java.lang.String |
buildBaseUrl()
Deprecated. As of 4.0, the base context resource attribute can be a multi-valued attribute. This method only returns the URL for one of the base contexts. also this method does not function properly if Java 1.4 or later is used and the container has non-ASCII characters |
protected java.lang.String |
buildBaseUrl(java.lang.String container)
Deprecated. there is no need to build the base URL if the provider URL is set on the context also this method does not function properly if Java 1.4 or later is used and the container has non-ASCII characters |
protected com.waveset.adapter.iapi.IAPI |
buildEvent(LDAPResourceAdapterBase.UpdateRow row)
Deprecated. As of IdM 5.5. |
void |
callCompleted(com.waveset.adapter.iapi.IAPI call)
An call generated by this resource adapter has completed. |
WavesetResult |
checkCreateAccount(WSUser user)
|
WavesetResult |
checkDeleteAccount(WSUser user)
|
WavesetResult |
checkUpdateAccount(WSUser user)
|
protected void |
closeConnection(javax.naming.directory.DirContext ctx)
|
java.lang.String |
constructAccountFilter()
Constructs an account filter for retrieving accounts. |
protected java.lang.String |
constructAccountFilter(java.lang.Object[] objectClasses)
Constructs an account filter for retrieving accounts. |
protected java.lang.String |
constructObjectClassFilter(java.lang.String operator,
java.lang.Object[] objectClasses)
|
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. |
WavesetResult |
deleteAccounts(WSUser[] users)
|
WavesetResult |
deleteObject(GenericObject object,
java.util.Map options)
Deletes the requested objectId of the requested objectType from the resource |
protected WavesetResult |
doCreateOrUpdateObjectRequest(java.lang.String objectType,
java.lang.String objectId,
GenericObject attributes,
GenericObject oldAttributes,
java.util.Map options,
java.lang.String cmd)
|
protected WavesetResult |
doCreateOrUpdateObjectRequest(java.lang.String objectType,
java.lang.String objectId,
GenericObject attributes,
java.util.Map options,
java.lang.String cmd)
|
byte[] |
encodePwd(java.lang.String p)
|
protected void |
ensureObjectClassInSchemaMap()
The view's "objectClass" list is used in ActiveSync and required. |
protected WSUser |
fetchUser(GenericObject changeLogEntry)
|
protected WSUser |
fetchUser(GenericObject changeLogEntry,
java.lang.String ldapFilter)
Take a change log entry and get the object associated with it. |
protected com.waveset.adapter.util.ActionOnUser |
getAccountActivator()
|
WSAttributes |
getAccountAttributes(java.lang.String accountIdentity)
This method is obsolete. |
AccountIterator |
getAccountIterator()
|
AccountIterator |
getAccountIterator(java.util.Map params)
Return an iterator for objects of the requested object classes meeting the requested filter. |
java.lang.Object |
getAttributeValue(java.lang.String name)
Get or set an attribute value for the ActiveSync. |
java.lang.String |
getBaseContextAttrName()
Returns the name, if any, of the attribute used by the resource as the base context or the context to which all operations is bound |
java.util.List |
getBaseContexts()
Needs to be overridden by subclass in order to support browsing and editing of resource objects |
protected java.util.Hashtable |
getContextEnv(java.lang.String host,
int port,
java.lang.String baseDn,
java.lang.String bindDn,
java.lang.String bindPass,
boolean ssl)
Return a Hashtable of properties for the connection. |
GenericObject |
getFeatures()
Expose features supported by the Resource Adapter. |
protected void |
getGroups(javax.naming.Name dn,
java.lang.String grpMemberAttr,
java.util.Vector groups,
java.util.Vector attrs)
Deprecated. Use getGroups(String, String, Vector, Vector). |
protected void |
getGroups(java.lang.String accountRef,
java.lang.String grpMemberAttr,
java.util.Vector groups,
java.util.Vector attrs)
Returns, in the groups argument, the groups that the account specified by accountRef is a member of. |
protected java.util.List |
getLdapAccountAttributeNames()
|
protected java.lang.String[] |
getLdapAccountAttributeNamesForQuery()
|
protected javax.naming.directory.Attributes |
getLDAPAttributes(java.lang.String objectId,
javax.naming.directory.DirContext[] ctxArray)
Deprecated. Use getLDAPAttributes(String, DirContext, String, String[]). |
protected javax.naming.directory.Attributes |
getLDAPAttributes(java.lang.String objectId,
javax.naming.directory.DirContext[] ctxArray,
java.lang.String ldapFilter)
Deprecated. Use getLDAPAttributes(String, DirContext, String, String[]). |
protected javax.naming.directory.Attributes |
getLDAPAttributes(java.lang.String objectId,
javax.naming.directory.DirContext ctx,
java.lang.String ldapFilter,
java.lang.String[] attrsToGet)
|
protected GenericObject |
getLDIFAttributeValue(java.util.StringTokenizer st)
Attributes can be single valued like name: value or multivalued name: value\nname: value2. |
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.String |
getrn(java.lang.String dn)
|
protected GenericObject |
getRootDSE()
Get the root DSE and extract some needed attributes about the changelog. |
java.lang.String |
getServerVendor()
|
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 milli)
|
protected WSUser |
getUser(WSUser user,
java.lang.String ldapFilter)
Retrieves account information from the resource for the specified WSUser and returns a new WSUser based on the information from the resource. |
protected boolean |
getUserCheckForDisabled(WSUser user,
WavesetResult result)
|
void |
init()
initialize yourself. |
protected boolean |
isAccountObjectType(java.lang.String resourceObjectType)
|
protected boolean |
isPoolingEnabled()
|
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 void |
logUpdate(int level,
LDAPResourceAdapterBase.UpdateRow update,
WavesetResult result)
Log whatever we want to from an update. |
protected javax.naming.directory.DirContext |
makeConnection()
|
protected javax.naming.directory.DirContext |
makeConnection(boolean canBePooled)
|
protected javax.naming.directory.DirContext |
makeUnpooledConnection()
|
protected WSAttributes |
mapLDAPAttributes(javax.naming.directory.Attributes ldapAttrs,
java.lang.String identity,
javax.naming.directory.DirContext ctx)
|
protected GenericObject |
mapLDAPAttributes(javax.naming.directory.DirContext ctx,
java.lang.String objectType,
java.lang.String objectName,
java.lang.String objectId,
java.util.List attrsToGet,
javax.naming.directory.Attributes ldapAttrs,
GenericObject object)
|
protected GenericObject |
mapLDAPAttributes(java.lang.String objectType,
java.lang.String objectName,
java.lang.String objectId,
java.util.List attrsToGet,
javax.naming.directory.Attributes ldapAttrs,
GenericObject object)
|
protected void |
modifyObject(com.waveset.adapter.LDAPResourceAdapterBase.LDAPObject obj,
javax.naming.directory.DirContext ctx)
Make a call to the LDAP server and modify the person in the directory. |
boolean |
namesEqual(java.lang.String name1,
java.lang.String name2)
This method will return true if name1 equals name2. |
protected int |
parseAttrValue(java.lang.String str,
java.lang.StringBuffer attrValue)
|
protected java.util.Vector |
parseOutRDN(javax.naming.directory.DirContext ctx,
java.lang.String dn)
Parses a DN to give the components of the least-signficant DN. |
int |
poll()
the poll method. |
protected void |
processUpdates(java.util.List list)
Take a list of Maps that are rows of the audit data and turn them into IAPI calls. |
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 boolean |
removeAttributeDelta(javax.naming.directory.Attributes ldapAttrs,
WSUser user)
Any attributes found in ldapAttrs but not found in the user will be removed from the ldap entry |
protected boolean |
removeNameFromAttribute(javax.naming.directory.DirContext ctx,
javax.naming.Name dn,
javax.naming.directory.Attribute attr)
Deprecated. Use removeNameFromAttribute(DirContext, String, boolean, Attribute). |
protected boolean |
removeNameFromAttribute(javax.naming.directory.DirContext ctx,
java.lang.String name,
boolean nameIsDN,
javax.naming.directory.Attribute attr)
|
protected void |
removeUserFromAllGroups(javax.naming.Name dn,
java.lang.String grpMemberAttr,
WavesetResult result)
Deprecated. Use removeUserFromAllGroups(String, boolean, String, WavesetResult). |
protected void |
removeUserFromAllGroups(java.lang.String accountRef,
boolean accountRefIsDN,
java.lang.String grpMemberAttr,
WavesetResult result)
Remove the given accountRef from all Groups |
protected void |
removeUserFromGroup(javax.naming.directory.DirContext ctx,
javax.naming.Name dn,
java.lang.String group,
java.lang.String grpMemberAttr,
javax.naming.directory.Attributes attrs)
Deprecated. Use removeUserFromGroup(DirContext, String, boolean, String, String, Attributes). |
protected void |
removeUserFromGroup(javax.naming.directory.DirContext ctx,
java.lang.String accountRef,
boolean accountRefIsDN,
java.lang.String group,
java.lang.String grpMemberAttr,
javax.naming.directory.Attributes attrs)
|
protected void |
removeUserFromGroups(javax.naming.Name dn,
java.util.Vector memberOf,
java.lang.String grpMemberAttr,
WavesetResult result)
Deprecated. Use removeUserFromGroups(String, boolean, Vector, String, WavesetResult). |
protected void |
removeUserFromGroups(java.lang.String accountRef,
boolean accountRefIsDN,
java.util.Vector memberOf,
java.lang.String grpMemberAttr,
WavesetResult result)
Removes the user from the groups it is currently a member of that are not in the set of new groups that it will soon be a member of. |
protected void |
renameUserAcrossGroups(com.waveset.adapter.LDAPResourceAdapterBase.LDAPObject ldapObject,
WSUser user,
java.lang.String oldDn,
WavesetResult result)
Used when renaming the ldapobject's dn |
protected void |
renameUserAcrossGroups(java.lang.String accountRef,
java.lang.String groupsAttrName,
java.lang.String grpMemberAttr,
WSUser user,
java.lang.String oldAccountRef,
boolean oldAccountRefIsDN,
WavesetResult result)
|
protected void |
renameUserAcrossPosixGroups(java.lang.String newUid,
WSUser user,
javax.naming.directory.Attributes ldapAttrs,
WavesetResult result)
|
void |
setAttributeValue(java.lang.String name,
java.lang.Object value)
|
protected void |
setLdapObjectAttribute(java.lang.String attrName,
java.lang.Object[] values,
com.waveset.adapter.LDAPResourceAdapterBase.LDAPObject ldapObject,
java.lang.String operation)
|
protected boolean |
setLdapObjectAttributeMultivalued(java.lang.String attrName,
java.util.List values,
java.util.List oldValues,
com.waveset.adapter.LDAPResourceAdapterBase.LDAPObject ldapObject,
boolean isDn)
|
protected void |
setLdapObjectAttributeMultivalued(java.lang.String attrName,
java.util.List values,
java.util.List oldValues,
com.waveset.adapter.LDAPResourceAdapterBase.LDAPObject ldapObject,
java.lang.String objectType)
|
void |
shutdown()
shutdown |
protected void |
startConnection()
Needs to be overridden by subclass if default createAccounts() implementation is used. |
protected void |
stopConnection()
Needs to be overridden by subclass if default createAccounts() implementation is used. |
boolean |
supportsAccountDisable()
Indicates whether or not this resource supports account disable. |
boolean |
supportsExcludedAccounts()
|
WavesetResult |
testConfiguration()
This currently only adds validations for filters. |
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. |
protected boolean |
userActivation(java.lang.String operation,
WSUser user,
WavesetResult result)
Used by realEnable, realDisable to load needed attributes into user and then attempt to activate/deactivate |
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 RA_HOST
public static final java.lang.String RA_PORT
public static final java.lang.String RA_SSL
public static final java.lang.String RA_USERDN
public static final java.lang.String RA_PASSWORD
public static final java.lang.String RA_GROUP_OBJCLASS
public static final java.lang.String RA_WSNAME
public static final java.lang.String RA_MOD_NAMING_ATTR
public static final java.lang.String RA_LDAP_SEARCH_FILTER
public static final java.lang.String RA_INCL_OBJCLASSES_IN_SEARCH_FILTER
public static final java.lang.String RA_VLV_SORT_ATTRIBUTE
public static final java.lang.String RA_GRP_MBR_ATTR
public static final java.lang.String RA_USE_BLOCKS
public static final java.lang.String LDAP_GROUPS_ATTR_NAME
public static final java.lang.String POSIX_GROUPS_ATTR_NAME
public static final java.lang.String RA_ENABLE_CONNECTION_POOLING
public static final java.lang.String LDAP_SEARCH_FILTER_STRING
RA_LDAP_SEARCH_FILTER
,
RA_INCL_OBJCLASSES_IN_SEARCH_FILTER
,
Constant Field Valuespublic static final java.lang.String LDAP_SEARCH_START_DATE
public static final java.lang.String LDAP_SEARCH_END_DATE
public static final java.lang.String LDAP_SEARCH_OBJECT_CLASSES
public static final java.lang.String LDAP_SEARCH_ATTRIBUTE_NAMES
protected boolean _encodePwd
protected javax.naming.directory.DirContext _ctx
public static final java.lang.String RA_BLOCKSIZE
public static final java.lang.String RA_CHANGE_NUMBER_ATTRIBUTE_NAME
public static final java.lang.String RA_ACTIVE_SYNC_OBJECT_CLASSES
public static final java.lang.String RA_ACTIVE_SYNC_LDAP_FILTER
public static final java.lang.String RA_ATTRIBUTE_FILTER
public static final java.lang.String RA_PROCESS_NAME
public static final java.lang.String OPENLDAP
public static final java.lang.String MICROSOFT
public static final java.lang.String NETSCAPE
public static final java.lang.String SUN
public static final java.lang.String UNDISCOVERED
public static final java.lang.String UNKNOWN
protected static final java.lang.String ALL_NON_OPERATIONAL_ATTRIBUTES
protected com.waveset.adapter.util.ActionOnUser _accountActivator
Constructor Detail |
public LDAPResourceAdapterBase(Resource res, ObjectCache cache)
public LDAPResourceAdapterBase()
Method Detail |
public java.lang.String getServerVendor()
public GenericObject getFeatures()
getFeatures
in interface ResourceAdapter
getFeatures
in class ResourceAdapterBase
ResourceAdapter.Features
public boolean namesEqual(java.lang.String name1, java.lang.String name2)
We will normalize the names 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.
namesEqual
in interface ResourceAdapter
namesEqual
in class ResourceAdapterBase
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
ResourceAdapterBase
realCreate
in class ResourceAdapterBase
WavesetException
public WavesetResult createAccounts(WSUser[] users) throws WavesetException
createAccounts
in interface ResourceAdapter
createAccounts
in class ResourceAdapterBase
WavesetException
protected boolean addAttributes(com.waveset.adapter.LDAPResourceAdapterBase.LDAPObject ldapObject, WSUser user, java.lang.String operation, WavesetResult result) throws WavesetException
WavesetException
protected void setLdapObjectAttributeMultivalued(java.lang.String attrName, java.util.List values, java.util.List oldValues, com.waveset.adapter.LDAPResourceAdapterBase.LDAPObject ldapObject, java.lang.String objectType) throws WavesetException
WavesetException
protected boolean setLdapObjectAttributeMultivalued(java.lang.String attrName, java.util.List values, java.util.List oldValues, com.waveset.adapter.LDAPResourceAdapterBase.LDAPObject ldapObject, boolean isDn) throws WavesetException
attrName
- values
- oldValues
- ldapObject
- isDn
-
WavesetException
protected void setLdapObjectAttribute(java.lang.String attrName, java.lang.Object[] values, com.waveset.adapter.LDAPResourceAdapterBase.LDAPObject ldapObject, java.lang.String operation) throws WavesetException
WavesetException
public byte[] encodePwd(java.lang.String p) throws WavesetException
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 updateAccounts(WSUser[] users) throws WavesetException
updateAccounts
in interface ResourceAdapter
updateAccounts
in class ResourceAdapterBase
WavesetException
protected void renameUserAcrossGroups(com.waveset.adapter.LDAPResourceAdapterBase.LDAPObject ldapObject, WSUser user, java.lang.String oldDn, WavesetResult result) throws WavesetException
ldapObject
- user
- oldDn
- result
-
WavesetException
protected void renameUserAcrossPosixGroups(java.lang.String newUid, WSUser user, javax.naming.directory.Attributes ldapAttrs, WavesetResult result) throws WavesetException
WavesetException
protected void renameUserAcrossGroups(java.lang.String accountRef, java.lang.String groupsAttrName, java.lang.String grpMemberAttr, WSUser user, java.lang.String oldAccountRef, boolean oldAccountRefIsDN, WavesetResult result) throws WavesetException
WavesetException
protected void addUserToGroups(com.waveset.adapter.LDAPResourceAdapterBase.LDAPObject ldapObject, WSUser user, java.lang.String operation, WavesetResult result) throws WavesetException
WavesetException
protected void addUserToGroups(com.waveset.adapter.LDAPResourceAdapterBase.LDAPObject ldapObject, java.lang.String accountRef, java.lang.String accountRefAttr, boolean accountRefIsDN, java.lang.String groupsAttrName, java.lang.String grpMemberAttr, WSUser user, java.lang.String operation, WavesetResult result) throws WavesetException
ldapObject
- The java object representing the entry whose membership
in one or more groups is being set or updated.accountRef
- The value that will be used as the groups' reference
to the entry in the groups'
membership attribute (specified in the grpMemberAttr argument). This
is usually the account's dn or uid.accountRefIsDN
- Whether or not the accountRef is a DN string or not.groupsAttrName
- The name of the attribute on the WSUser that
contains the list of groups in which the entry should be a member, e.g.
"ldapGroups" or "posixGroups".grpMemberAttr
- The attribute of the group that contains the list
of the group's members, e.g. "member", "uniqueMember", or "memberUid".user
- The WSUser containing the groupsAttrName.operation
- The account operation: "create" or "update".result
- Contains any errors that occur.
WavesetException
protected void addUserToGroup(com.waveset.adapter.LDAPResourceAdapterBase.LDAPObject ldapObject, java.lang.String grpMemberAttr, java.lang.String group) throws WavesetException
ldapObject
- grpMemberAttr
- group
-
WavesetException
protected void addUserToGroup(java.lang.String accountRef, java.lang.String grpMemberAttr, java.lang.String group) throws WavesetException
WavesetException
protected java.lang.String buildBaseUrl()
protected java.lang.String buildBaseUrl(java.lang.String container)
protected void getGroups(javax.naming.Name dn, java.lang.String grpMemberAttr, java.util.Vector groups, java.util.Vector attrs) throws WavesetException
WavesetException
protected void getGroups(java.lang.String accountRef, java.lang.String grpMemberAttr, java.util.Vector groups, java.util.Vector attrs) throws WavesetException
accountRef
- The reference to the account whose groups will be
returned. Usually the DN or uid.grpMemberAttr
- The attribute of the group entries that contains
the accountRef if the account is a member of the group.groups
- Updated with the account's groups.attrs
- Update with the value of the grpMemberAttr attribute for
each group. This vector parallels the groups vector.
WavesetException
protected boolean removeNameFromAttribute(javax.naming.directory.DirContext ctx, javax.naming.Name dn, javax.naming.directory.Attribute attr) throws WavesetException
ctx
- dn
- attr
-
WavesetException
protected boolean removeNameFromAttribute(javax.naming.directory.DirContext ctx, java.lang.String name, boolean nameIsDN, javax.naming.directory.Attribute attr) throws WavesetException
WavesetException
protected void removeUserFromGroup(javax.naming.directory.DirContext ctx, javax.naming.Name dn, java.lang.String group, java.lang.String grpMemberAttr, javax.naming.directory.Attributes attrs) throws WavesetException
ctx
- dn
- group
- grpMemberAttr
- attrs
-
WavesetException
protected void removeUserFromGroup(javax.naming.directory.DirContext ctx, java.lang.String accountRef, boolean accountRefIsDN, java.lang.String group, java.lang.String grpMemberAttr, javax.naming.directory.Attributes attrs) throws WavesetException
WavesetException
protected void removeUserFromAllGroups(javax.naming.Name dn, java.lang.String grpMemberAttr, WavesetResult result) throws WavesetException
dn
- grpMemberAttr
- result
-
WavesetException
protected void removeUserFromAllGroups(java.lang.String accountRef, boolean accountRefIsDN, java.lang.String grpMemberAttr, WavesetResult result) throws WavesetException
accountRef
- accountRefIsDN
- grpMemberAttr
- result
-
WavesetException
protected void removeUserFromGroups(javax.naming.Name dn, java.util.Vector memberOf, java.lang.String grpMemberAttr, WavesetResult result) throws WavesetException
WavesetException
protected void removeUserFromGroups(java.lang.String accountRef, boolean accountRefIsDN, java.util.Vector memberOf, java.lang.String grpMemberAttr, WavesetResult result) throws WavesetException
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
public WavesetResult deleteAccounts(WSUser[] users) throws WavesetException
deleteAccounts
in interface ResourceAdapter
deleteAccounts
in class ResourceAdapterBase
WavesetException
protected WSAttributes mapLDAPAttributes(javax.naming.directory.Attributes ldapAttrs, java.lang.String identity, javax.naming.directory.DirContext ctx) throws WavesetException
WavesetException
protected javax.naming.directory.Attributes getLDAPAttributes(java.lang.String objectId, javax.naming.directory.DirContext[] ctxArray) throws WavesetException
WavesetException
protected javax.naming.directory.Attributes getLDAPAttributes(java.lang.String objectId, javax.naming.directory.DirContext[] ctxArray, java.lang.String ldapFilter) throws WavesetException
WavesetException
protected javax.naming.directory.Attributes getLDAPAttributes(java.lang.String objectId, javax.naming.directory.DirContext ctx, java.lang.String ldapFilter, java.lang.String[] attrsToGet) throws WavesetException
objectId
- The DN of the object to get attributes for.ctx
- A valid DirContext.ldapFilter
- Filter the user must match (if non-null). Null is
returned if the object does not match the filter.attrsToGet
- Array of attributes to return. If null then all
attributes in the schema map and all non-operational attributes are
returned.
WavesetException
public WSAttributes getAccountAttributes(java.lang.String accountIdentity) throws WavesetException
ResourceAdapter
getAccountAttributes
in interface ResourceAdapter
getAccountAttributes
in class ResourceAdapterBase
WavesetException
public java.lang.String getrn(java.lang.String dn) throws WavesetException
WavesetException
protected void closeConnection(javax.naming.directory.DirContext ctx)
protected javax.naming.directory.DirContext makeConnection() throws WavesetException
WavesetException
protected javax.naming.directory.DirContext makeUnpooledConnection() throws WavesetException
WavesetException
protected javax.naming.directory.DirContext makeConnection(boolean canBePooled) throws WavesetException
WavesetException
protected java.util.Hashtable getContextEnv(java.lang.String host, int port, java.lang.String baseDn, java.lang.String bindDn, java.lang.String bindPass, boolean ssl)
Return a Hashtable of properties for the connection.
Note: an LDAP url is contructed and added to the Hashtable with the key Context.PROVIDER_URL. No escaping is done on the baseDn string before adding to the URL, so the baseDn argument should be encoded using com.waveset.util.Util.rfc2396URLPieceEncodeSpecial(String) (if it's not null).
protected void modifyObject(com.waveset.adapter.LDAPResourceAdapterBase.LDAPObject obj, javax.naming.directory.DirContext ctx) throws WavesetException
obj
- ctx
-
WavesetException
protected WSUser getUser(WSUser user, java.lang.String ldapFilter) throws WavesetException
WavesetException
public WSUser getUser(WSUser user) throws WavesetException
ResourceAdapter
getUser
in interface ResourceAdapter
getUser
in class ResourceAdapterBase
WavesetException
public WavesetResult authenticate(java.util.HashMap loginInfo) throws WavesetException
ResourceAdapter
authenticate
in interface ResourceAdapter
authenticate
in class ResourceAdapterBase
WavesetException
public AccountIterator getAccountIterator() throws WavesetException
getAccountIterator
in interface ResourceAdapter
getAccountIterator
in class ResourceAdapterBase
WavesetException
public AccountIterator getAccountIterator(java.util.Map params) throws WavesetException
getAccountIterator
in interface ResourceAdapter
getAccountIterator
in class ResourceAdapterBase
params
- -
Map of parameters to override the resource attributes.
Supported parameters are:
LDAP_SEARCH_OBJECT_CLASSES - a List of String. Names of requested object
classes LDAP_SEARCH_START_DATE - a String. objects modified after this
date (>=). This uses the modifyTimestamp operational attribute
LDAP_SEARCH_END_DATE - a String. objects modified before this date ( <)
This uses the modifyTimestamp operational attribute
LDAP_SEARCH_FILTER_STRING - a String. totally override the filter string
LDAP_SEARCH_ATTRIBUTE_NAMES - a List of String. override schema map.
WavesetException
protected int parseAttrValue(java.lang.String str, java.lang.StringBuffer attrValue)
protected java.util.Vector parseOutRDN(javax.naming.directory.DirContext ctx, java.lang.String dn)
public boolean supportsExcludedAccounts()
supportsExcludedAccounts
in interface ResourceAdapter
supportsExcludedAccounts
in class ResourceAdapterBase
public java.lang.String getBaseContextAttrName() throws WavesetException
getBaseContextAttrName
in interface ResourceAdapter
getBaseContextAttrName
in class ResourceAdapterBase
WavesetException
public java.util.List getBaseContexts() throws WavesetException
ResourceAdapterBase
getBaseContexts
in interface ResourceAdapter
getBaseContexts
in class ResourceAdapterBase
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
getObject
in class ResourceAdapterBase
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
protected GenericObject mapLDAPAttributes(java.lang.String objectType, java.lang.String objectName, java.lang.String objectId, java.util.List attrsToGet, javax.naming.directory.Attributes ldapAttrs, GenericObject object) throws WavesetException
WavesetException
protected GenericObject mapLDAPAttributes(javax.naming.directory.DirContext ctx, java.lang.String objectType, java.lang.String objectName, java.lang.String objectId, java.util.List attrsToGet, javax.naming.directory.Attributes ldapAttrs, GenericObject object) throws WavesetException
WavesetException
public WavesetResult createObject(GenericObject object, java.util.Map options) throws WavesetException
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
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
protected WavesetResult doCreateOrUpdateObjectRequest(java.lang.String objectType, java.lang.String objectId, GenericObject attributes, java.util.Map options, java.lang.String cmd) throws WavesetException
WavesetException
protected WavesetResult doCreateOrUpdateObjectRequest(java.lang.String objectType, java.lang.String objectId, GenericObject attributes, GenericObject oldAttributes, java.util.Map options, java.lang.String cmd) throws WavesetException
WavesetException
public WavesetResult deleteObject(GenericObject object, java.util.Map options) throws WavesetException
deleteObject
in interface ResourceAdapter
deleteObject
in class ResourceAdapterBase
object
- - a valid object type defined in the resource's
options
- -
not currently used since the objectId/objectType provide a
unique identifier of the object being deleted
WavesetException
public java.util.List listObjects(java.lang.String objectType, java.util.Map options) throws WavesetException
listObjects
in interface ResourceAdapter
listObjects
in class ResourceAdapterBase
objectType
- -
the name of a valid object class for this specified "resId".options
- -
several options can be specified which control the behavior of
the search. They include:
WavesetException
protected java.lang.String constructObjectClassFilter(java.lang.String operator, java.lang.Object[] objectClasses)
public java.lang.String constructAccountFilter() throws WavesetException
WavesetException
protected java.lang.String constructAccountFilter(java.lang.Object[] objectClasses)
protected boolean isAccountObjectType(java.lang.String resourceObjectType)
protected boolean isPoolingEnabled()
public java.util.ArrayList listAllObjects(java.lang.String resourceObjectType, java.util.Map options, java.lang.String runAsUser, EncryptedData runAsPassword) throws WavesetException
ResourceAdapter
listAllObjects
in interface ResourceAdapter
listAllObjects
in class ResourceAdapterBase
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 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.lang.Object getAttributeValue(java.lang.String name) throws WavesetException
ActiveSync
getAttributeValue
in interface ActiveSync
WavesetException
public void setAttributeValue(java.lang.String name, java.lang.Object value) throws WavesetException
setAttributeValue
in interface ActiveSync
WavesetException
public void init() throws java.lang.Exception
init
in interface ActiveSync
java.lang.Exception
public int poll()
poll
in interface ActiveSync
protected void ensureObjectClassInSchemaMap()
public void shutdown()
ActiveSync
shutdown
in interface ActiveSync
protected GenericObject getRootDSE() throws WavesetException
WavesetException
protected void processUpdates(java.util.List list) throws WavesetException, com.waveset.adapter.iapi.IAPIException
WavesetException
com.waveset.adapter.iapi.IAPIException
protected void logUpdate(int level, LDAPResourceAdapterBase.UpdateRow update, WavesetResult result)
protected com.waveset.adapter.iapi.IAPI buildEvent(LDAPResourceAdapterBase.UpdateRow row) throws WavesetException, com.waveset.adapter.iapi.IAPIException
WavesetException
com.waveset.adapter.iapi.IAPIException
public void callCompleted(com.waveset.adapter.iapi.IAPI call)
If this does not delete the call, there must be something else that deletes it - or it will just go away when it expires.
call
- -
the event that has changed.
protected WSUser fetchUser(GenericObject changeLogEntry) throws WavesetException
WavesetException
protected WSUser fetchUser(GenericObject changeLogEntry, java.lang.String ldapFilter) throws WavesetException
WavesetException
protected GenericObject getLDIFAttributeValue(java.util.StringTokenizer st)
protected java.util.List getLdapAccountAttributeNames()
protected java.lang.String[] getLdapAccountAttributeNamesForQuery()
public WavesetResult testConfiguration() throws WavesetException
testConfiguration
in interface ResourceAdapter
testConfiguration
in class ResourceAdapterBase
WavesetException
protected void startConnection() throws WavesetException
ResourceAdapterBase
startConnection
in class ResourceAdapterBase
WavesetException
protected void stopConnection() throws WavesetException
ResourceAdapterBase
stopConnection
in class ResourceAdapterBase
WavesetException
protected com.waveset.adapter.util.ActionOnUser getAccountActivator()
public boolean supportsAccountDisable()
ResourceAdapter
supportsAccountDisable
in interface ResourceAdapter
supportsAccountDisable
in class ResourceAdapterBase
protected boolean removeAttributeDelta(javax.naming.directory.Attributes ldapAttrs, WSUser user) throws WavesetException
ldapAttrs
- before snap shotuser
- after snap shot
WavesetException
protected boolean getUserCheckForDisabled(WSUser user, WavesetResult result)
user
- that been loaded with requisite attributesresult
-
protected boolean userActivation(java.lang.String operation, WSUser user, WavesetResult result) throws WavesetException
operation
- user
- result
-
WavesetException
public WSUser getUser(WSUser user, long milli) throws WavesetException, java.lang.InterruptedException
getUser
in interface ResourceAdapter
getUser
in class ResourceAdapterBase
user
- milli
-
WavesetException
java.lang.InterruptedException
protected void realDisable(WSUser user, WavesetResult result) throws WavesetException
realDisable
in class ResourceAdapterBase
user
- result
-
WavesetException
protected void realEnable(WSUser user, WavesetResult result) throws WavesetException
realEnable
in class ResourceAdapterBase
user
- result
-
WavesetException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |