|
||||||||||
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.JdbcResourceAdapter
com.waveset.adapter.SiteminderExampleTableResourceAdapter
Nested Class Summary | |
static class |
SiteminderExampleTableResourceAdapter.TableAccountIterator
The implementation of the AccountIterator returned by getAccountIterator. |
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 SiteminderUtil |
_smu
|
static java.lang.String |
code_id
|
static java.lang.String |
DEFAULT_DRIVER
The default value for the RA_DRIVER resource attribute. |
static java.lang.String |
DEFAULT_TEMPLATE
The default connect URL template. |
static java.lang.String |
DISABLEDPWDFLAG
|
static java.lang.String |
EMAIL
|
static java.lang.String |
FIRST_NAME
|
static java.lang.String |
GROUPS
|
protected static java.lang.String |
GROUPS_SCHEMA
|
static java.lang.String |
LAST_NAME
|
protected static java.lang.String |
MEMBERS_SCHEMA
|
static java.lang.String |
MILEAGE
|
static java.lang.String |
PIN
|
static java.lang.String |
RA_DISABLEDPWDFLAG
|
static java.lang.String |
RA_GROUPS
The optional group(s) to assign to accounts created by this adapter. |
static java.lang.String |
RA_GROUPS_TABLE
|
static java.lang.String |
RA_MEMBERS_TABLE
|
static java.lang.String |
RA_PASSWORD_ATTR
|
static java.lang.String |
RA_USERS_TABLE
|
static java.lang.String |
TELE_NUM
|
static java.lang.String |
USERID
|
protected static java.lang.String |
USERS_SCHEMA
|
Fields inherited from class com.waveset.adapter.JdbcResourceAdapter |
RA_DATABASE, RA_DRIVER, RA_HOST, RA_PASSWORD, RA_PORT, RA_QUOTING, RA_URL_PREFIX, RA_URL_TEMPLATE, RA_USER |
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 | |
SiteminderExampleTableResourceAdapter()
Create an adapater instance, without a resource. |
|
SiteminderExampleTableResourceAdapter(Resource res,
ObjectCache cache)
Create an adapter instance for a resource. |
Method Summary | |
void |
addAttributeValue(java.lang.StringBuffer b,
WSUser user,
java.lang.String attname)
Helper method for building the values() list for an insert statement from account attributes. |
void |
addQuoted(java.lang.StringBuffer b,
java.lang.String s)
Add a quoted string to a SQL statement we're building in a buffer. |
WavesetResult |
authenticate(java.util.HashMap loginInfo)
Authenticates the user against the resource. |
WSUser |
buildUser(java.lang.String accountId)
Build the base user object given an id. |
WavesetResult |
checkCreateAccount(WSUser user)
Check to see if an account can be created. |
WavesetResult |
checkDeleteAccount(WSUser user)
Check account deletion. |
void |
checkSchema()
|
protected void |
checkTable(java.sql.Connection con,
java.lang.String name,
java.lang.String schema)
|
WavesetResult |
checkUpdateAccount(WSUser user)
Check the ability to perform an account update. |
void |
createGroup(java.lang.String id,
java.lang.String name)
|
Resource |
createPrototypeResource()
Create the prototype instance. |
AccountIterator |
getAccountIterator()
Return an iterator that will iterate over all the accounts on a resource. |
java.lang.String |
getColumn(java.sql.ResultSet result,
int col)
Get a string from a result set, trimming trailing blanks. |
java.util.List |
getGroupIds(java.sql.Connection con,
java.util.List names)
Given a list of group names, create a list of the corresponding group ids. |
java.util.List |
getGroupNames(java.sql.Connection con,
java.util.List ids)
Given a list of group ids, create a list of the corresponding group names. |
WSUser |
getUser(WSUser idUser)
Public adapter method to get the current user information. |
java.util.List |
getUserIds(java.sql.Connection con,
java.util.List names)
Given a list of user names, create a list of the corresponding user ids. |
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 java.lang.String |
modifyDisabledFlag(java.sql.Connection con,
WSUser user,
java.lang.String action,
WavesetResult result)
Modifies/Adds Siteminder User Disabled Flag Attribute |
protected void |
realCreate(WSUser user,
WavesetResult result)
Create a new account. |
protected void |
realDelete(WSUser user,
WavesetResult result)
Delete the account for real. |
protected void |
realDisable(WSUser user,
WavesetResult result)
Sets Disabled attribute that is mapped to Siteminder Disabled Flag and ResourceInfo Disabled 'true' |
protected void |
realEnable(WSUser user,
WavesetResult result)
Sets Disabled attribute that is mapped to Siteminder Disabled Flag and ResourceInfo Disabled 'false' |
protected void |
realUpdate(WSUser user,
WavesetResult result)
Perform the actual account update. |
void |
startConnection()
Needs to be overridden by subclass if default createAccounts() implementation is used. |
static Resource |
staticCreatePrototypeResource()
Create the prototype instance. |
void |
stopConnection()
Needs to be overridden by subclass if default createAccounts() implementation is used. |
boolean |
supportsAccountDisable()
Whether the resource can enable and disable accounts. |
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 DEFAULT_DRIVER
public static final java.lang.String DEFAULT_TEMPLATE
public static final java.lang.String RA_GROUPS
protected SiteminderUtil _smu
public static final java.lang.String RA_USERS_TABLE
public static final java.lang.String RA_GROUPS_TABLE
public static final java.lang.String RA_MEMBERS_TABLE
public static final java.lang.String RA_DISABLEDPWDFLAG
public static final java.lang.String RA_PASSWORD_ATTR
public static final java.lang.String USERID
public static final java.lang.String FIRST_NAME
public static final java.lang.String LAST_NAME
public static final java.lang.String EMAIL
public static final java.lang.String TELE_NUM
public static final java.lang.String DISABLEDPWDFLAG
public static final java.lang.String PIN
public static final java.lang.String MILEAGE
public static final java.lang.String GROUPS
protected static final java.lang.String USERS_SCHEMA
protected static final java.lang.String GROUPS_SCHEMA
protected static final java.lang.String MEMBERS_SCHEMA
Constructor Detail |
public SiteminderExampleTableResourceAdapter(Resource res, ObjectCache cache)
public SiteminderExampleTableResourceAdapter()
Method Detail |
public static Resource staticCreatePrototypeResource() throws WavesetException
WavesetException
public Resource createPrototypeResource() throws WavesetException
createPrototypeResource
in interface ResourceAdapter
createPrototypeResource
in class ResourceAdapterBase
WavesetException
public void startConnection() throws WavesetException
ResourceAdapterBase
startConnection
in class ResourceAdapterBase
WavesetException
public void stopConnection() throws WavesetException
ResourceAdapterBase
stopConnection
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 void addAttributeValue(java.lang.StringBuffer b, WSUser user, java.lang.String attname)
public void addQuoted(java.lang.StringBuffer b, java.lang.String s)
addQuoted
in class JdbcResourceAdapter
public java.util.List getGroupIds(java.sql.Connection con, java.util.List names) throws WavesetException
WavesetException
public java.util.List getGroupNames(java.sql.Connection con, java.util.List ids) throws WavesetException
WavesetException
public java.util.List getUserIds(java.sql.Connection con, java.util.List names) 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
The account ID cannot be changed.
Password changes are indiciated with a non-null password stored in the ResourceInfo object for this resource.
Extended account attribute changes are indicated with non-null attribute values in the user. If an attribute value is null, it means that the current value is to be kept, not cleared. To clear a value, the attribute value in the user must be the empty string.
We currently do not have a way to flag changes in the email value, other than reading the current user object and comparing.
Changes to group membership require that we read the current group list so we can determine which memberships to add, and which to remove.
Attribute changes will be collected in a Map which will then be used to construct a SQL update statement.
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
realDelete
in class ResourceAdapterBase
WavesetException
public java.lang.String getColumn(java.sql.ResultSet result, int col) throws java.sql.SQLException
java.sql.SQLException
public WSUser buildUser(java.lang.String accountId)
public WSUser getUser(WSUser idUser) throws WavesetException
getUser
in interface ResourceAdapter
getUser
in class ResourceAdapterBase
WavesetException
public AccountIterator getAccountIterator() throws WavesetException
getAccountIterator
in interface ResourceAdapter
getAccountIterator
in class ResourceAdapterBase
WavesetException
public WavesetResult authenticate(java.util.HashMap loginInfo) throws WavesetException
ResourceAdapter
authenticate
in interface ResourceAdapter
authenticate
in class ResourceAdapterBase
WavesetException
public boolean supportsAccountDisable()
supportsAccountDisable
in interface ResourceAdapter
supportsAccountDisable
in class ResourceAdapterBase
protected java.lang.String modifyDisabledFlag(java.sql.Connection con, WSUser user, java.lang.String action, WavesetResult result) throws WavesetException
user
- the user to Disable
WavesetException
protected void realEnable(WSUser user, WavesetResult result) throws WavesetException
realEnable
in class ResourceAdapterBase
user
- the user to Enable
WavesetException
- if ENABLED failsprotected void realDisable(WSUser user, WavesetResult result) throws WavesetException
realDisable
in class ResourceAdapterBase
user
- the user to Disable
WavesetException
- if DISABLED failspublic 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 void createGroup(java.lang.String id, java.lang.String name) throws WavesetException
WavesetException
public void checkSchema() throws WavesetException
WavesetException
protected void checkTable(java.sql.Connection con, java.lang.String name, java.lang.String schema) throws WavesetException
WavesetException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |