com.waveset.adapter
Class INISafeNexessResourceAdapter

java.lang.Object
  extended bycom.waveset.adapter.ResourceAdapterBase
      extended bycom.waveset.adapter.INISafeNexessResourceAdapter
All Implemented Interfaces:
ResourceAdapter

public class INISafeNexessResourceAdapter
extends ResourceAdapterBase

Created by IntelliJ IDEA. User: shirishr Date: Oct 27, 2004 Time: 5:11:40 PM To change this template use File | Settings | File Templates.


Nested Class Summary
 
Nested classes inherited from class com.waveset.adapter.ResourceAdapterBase
ResourceAdapterBase.SimpleAccountIterator
 
Nested classes inherited from class com.waveset.adapter.ResourceAdapter
ResourceAdapter.ActionResult, ResourceAdapter.Features, ResourceAdapter.ObjectType
 
Field Summary
static java.lang.String ACCOUNT_NAME
           
static java.lang.String ACCOUNT_PASSWORD
           
static java.lang.String CLASS_ACCOUNT_NAME
           
static java.lang.String CLASS_ATTRIBUTE_NAME
           
static java.lang.String CLASS_FIELD_NAME
           
static java.lang.String code_id
           
static java.lang.String NX_EMAIL_NAME
           
static java.lang.String NX_ENABLE_NAME
           
static java.lang.String NX_NAME_NAME
           
static java.lang.String NX_PASSWORD_NAME
           
static java.lang.String NX_USER_ID_NAME
           
static java.lang.String RA_HOST
          Resource attributes are the common names that will be visible in the GUI that will prompt the user for values.
static java.lang.String RA_PORT
          The port on which to communicate to the resource.
static java.lang.String SERVICE_NAME
           
 
Fields inherited from class com.waveset.adapter.ResourceAdapterBase
_cache, _context, _excludedAccountsRule, _excludedAccountsRuleInited, _listAllObjectsAttrParse, _listAllObjectsAttrParseName, _listUserAttrParse, _listUserAttrParseName, _listUserGroupsAttrParse, _listUserGroupsAttrParseName, _resource, _thread, _trace, displayInfoCode, RA_BLOCKCOUNT, RA_LOGIN_ACTION, RA_LOGOFF_ACTION, RA_MULTI_VALUED_ATTRS, RA_TEST_MODE
 
Fields inherited from interface com.waveset.adapter.ResourceAdapter
CHANGE_PASSWORD_LOCATION, DISABLE, ENABLE, EXPIRE_PASSWORD, GUID, IGNORE_ATTR, NEW_ACCOUNT_ID, OP_DAYS_INACTIVE, OP_DISABLED, OP_DORMANT, OP_EXPIRED, OP_EXPIREDPWD, OP_INACTIVE, OP_LOCKED, OP_NO_PASSWORD_SET, OP_NOOWNERSHIP, OP_NOPASSWORDREQ, OP_NUMINACTIVEDAYS, OP_NUMPWDAYS, OP_PWNUMDAYS, RA_BASE_CTX, RA_DISPLAY_NAME_ATTR, RA_NEW_OBJECT_ID, RA_NEW_OBJECT_NAME, RA_OBJECT_ATTRIBUTES, RA_OBJECT_CLASS, RA_OBJECT_ID, RA_OBJECT_TYPE, RA_OP_TYPE, RA_RENAME_OP, RA_REQUESTOR, RA_SAVEAS_OP, RA_SEARCH_ATTRIBUTE_NAMES, RA_SEARCH_ATTRS_TO_GET, RA_SEARCH_CONTEXT, RA_SEARCH_FILTER, RA_SEARCH_RUN_AS_PASSWORD, RA_SEARCH_RUN_AS_USER, RA_SEARCH_SCOPE, RA_SEARCH_SCOPE_OBJECT, RA_SEARCH_SCOPE_ONE_LEVEL, RA_SEARCH_SCOPE_SUBTREE, RA_SEARCH_TIME_LIMIT, RESET_PASSWORD, SYSTEM_ATTRIBUTES, UNLOCK, WS_USER_PASSWORD
 
Constructor Summary
INISafeNexessResourceAdapter()
           
INISafeNexessResourceAdapter(Resource res, ObjectCache cache)
           
 
Method Summary
 WavesetResult authenticate(java.util.HashMap loginInfo)
          Authenticates the user against the resource.
 WavesetResult checkCreateAccount(WSUser user)
          Checks to see if an account can be created.
 WavesetResult checkDeleteAccount(WSUser user)
           
 WavesetResult checkUpdateAccount(WSUser user)
           
 Resource createPrototypeResource()
           
 WSAttributes getAccountAttributes(java.lang.String accountIdentity)
          This method is obsolete.
 GenericObject getFeatures()
          Expose features supported by the Resource Adapter.
protected  WSUser getUser(java.lang.String id)
           
 WSUser getUser(WSUser user)
          Retrieve information about an account, and package it as a WSUser object.
protected  void realCreate(WSUser user, WavesetResult result)
          Create a new user account on the resource
protected  void realDelete(WSUser user, WavesetResult result)
          Needs to be overridden by subclass if default deleteAccounts() implementation is used.
protected  void realDisable(WSUser user, WavesetResult result)
           
protected  void realEnable(WSUser user, WavesetResult result)
           
protected  void realUpdate(WSUser user, WavesetResult result)
          Needs to be overridden by subclass if default updateAccounts() implementation is used.
protected  void startConnection()
          Needs to be overridden by subclass if default createAccounts() implementation is used.
static Resource staticCreatePrototypeResource()
           
protected  void stopConnection()
          Needs to be overridden by subclass if default createAccounts() implementation is used.
 boolean supportsAccountDisable()
          This method indicates to the server that this resource natively supports account enable and disable.
 boolean supportsCaseInsensitiveAccountIds()
          This method will return whether the resource adapter supports case insensitive account Ids or not.
 WavesetResult testConfiguration()
          Default implementation of test method, calls check create.
 
Methods inherited from class com.waveset.adapter.ResourceAdapterBase
checkForNoPasswordInSchema, checkSyntax, createAccount, createAccounts, createIdentity, createObject, deleteAccount, deleteAccount, deleteAccounts, deleteObject, disableAccount, disableAccounts, dnsEqual, dnsEqual, enableAccount, enableAccounts, executeResourceAttributeJavascriptAction, fillInResourceInfo, fillInResourceInfo, getAccountIterator, getAccountIterator, getAccountIterator, getAction, getActionNotFoundErrorMessage, getActionNotFoundMessage, getActionRunAsPassword, getActionRunAsUser, getActionTimeout, getActionType, getAdapter, getAdapter, getAdapter, getAdapterProxy, getAdapterProxy, getAllAccounts, getAttrNameFromMapName, getAttrNameFromMapName, getAttrParse, getAttrTypeFromMapName, getAttrTypeFromMapName, getAUserName, getBaseContextAttrName, getBaseContextObject, getBaseContexts, getBlockSize, getContext, getExcludedAccountsRule, getIdentity, getListAllObjectsAttrParse, getListUserAttrParse, getListUserGroupsAttrParse, getObject, getOptionalBooleanResAttrVal, getOptionalBooleanResAttrVal, getOptionalEncryptedResAttrVal, getOptionalResAttrVal, getOptionalStringResAttrVal, getRequiredResAttr, getRequiredResAttr, getRequiredResAttrVal, getRequiredResAttrVal, getRequiredResAttrVals, getRequiredUserAttributeNames, getResAttrValActionOnUser, getResAttrVals, getResource, getResourceAccounts, getResourceInfo, getResourceObjectAttrValNameAttr, getResourceObjectClassAttr, getResourceObjectTypePrefix, getSchemaMap, getUser, getWSAttrByMapName, getWSAttrByMapName, getWSAttrFromMap, handleActionResult, handleJavascriptActionResult, isAccountAttributeSecret, isExcludedAccount, isExcludedAccount, isFeatureEnabled, isSupported, isTestMode, listAllObjects, listAllObjects, listObjects, listObjects, listObjectsOfType, lookupAction, lookupAction, lookupActions, namesEqual, objectClassesMatchType, println, restoreResourceObjectClassAttr, run, run, runResourceAttributeJavascriptAction, scan, setCache, setContext, setDisabled, setFromResource, setResource, setResourceObjectClassAttr, setResourceOptionAttrs, startConnectionWrapper, supportsAccountActions, supportsActions, supportsContainerObjectTypes, supportsExcludedAccounts, supportsResourceAccount, supportsScanning, updateAccount, updateAccounts, updateObject, updateResourceAccount, updateResourceIdentity, vmStoreBoot, vmStoreGet, vmStoreInit, vmStoreLatch, vmStorePut
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

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

RA_HOST

public static final java.lang.String RA_HOST
Resource attributes are the common names that will be visible in the GUI that will prompt the user for values. For example, the GUI will show "host" and have a box next to it for the user to enter a host name. The name of the host used to communicate with the resource.

See Also:
Constant Field Values

RA_PORT

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

See Also:
Constant Field Values

NX_USER_ID_NAME

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

NX_PASSWORD_NAME

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

NX_NAME_NAME

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

NX_EMAIL_NAME

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

NX_ENABLE_NAME

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

CLASS_ATTRIBUTE_NAME

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

CLASS_FIELD_NAME

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

CLASS_ACCOUNT_NAME

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

ACCOUNT_NAME

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

ACCOUNT_PASSWORD

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

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
See Also:
Constant Field Values
Constructor Detail

INISafeNexessResourceAdapter

public INISafeNexessResourceAdapter(Resource res,
                                    ObjectCache cache)

INISafeNexessResourceAdapter

public INISafeNexessResourceAdapter()
Method Detail

staticCreatePrototypeResource

public static Resource staticCreatePrototypeResource()
                                              throws WavesetException
Throws:
WavesetException

createPrototypeResource

public Resource createPrototypeResource()
                                 throws WavesetException
Specified by:
createPrototypeResource in interface ResourceAdapter
Specified by:
createPrototypeResource in class ResourceAdapterBase
Throws:
WavesetException

supportsCaseInsensitiveAccountIds

public boolean supportsCaseInsensitiveAccountIds()
This method will return whether the resource adapter supports case insensitive account Ids or not. If the resource does support allow case insensitive names, then this method should be removed as the default implementation, in ResourceAdapterBase, returns true. If the resource supports case sensitive names, then this method should be implemented to return false.

Specified by:
supportsCaseInsensitiveAccountIds in interface ResourceAdapter
Overrides:
supportsCaseInsensitiveAccountIds in class ResourceAdapterBase

supportsAccountDisable

public boolean supportsAccountDisable()
This method indicates to the server that this resource natively supports account enable and disable. If the resource does not natively support account enable and disable, then this method should be removed as the default implementation, in ResourceAdapterBase, returns false.

Specified by:
supportsAccountDisable in interface ResourceAdapter
Overrides:
supportsAccountDisable in class ResourceAdapterBase

getUser

protected WSUser getUser(java.lang.String id)
                  throws WavesetException
Throws:
WavesetException

getUser

public WSUser getUser(WSUser user)
               throws WavesetException
Retrieve information about an account, and package it as a WSUser object.

Information required to identify the resource account is supplied in another WSUser object.

The returned user object will resemble the source object, but will have its account attribute list filled in.

Returns "null" if there is no account that corresponds to the user.

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

checkCreateAccount

public WavesetResult checkCreateAccount(WSUser user)
                                 throws WavesetException
Checks to see if an account can be created. Some of the things that might be checked are as follows: - can basic connectivity to the resource be established? - Do the account attribute values comply with all (if any) resource specific restrictions or policies that haven't been checked at a higher level? Currently there are 3 check methods: checkCreateAccount, checkDeleteAccount and checkUpdate account. All three of these methods could be performing similar actions, such as ensuring that the resource is available. These common actions can be moved to a common function such as doBasicCheck() which any/all check methods could call. Then the individual check methods would do additional checks to ensure that user accounts can be added, modified or deleted. checkCreateAccount is not designed to ensure that the account creation will succeed, only that the likelyhood of success is good. checkCreateAccount does not need to check to see if the account already exists. The provisioner method will follow checkCreateAccount with a getUser call.

Specified by:
checkCreateAccount in interface ResourceAdapter
Specified by:
checkCreateAccount in class ResourceAdapterBase
Throws:
WavesetException

realCreate

protected void realCreate(WSUser user,
                          WavesetResult result)
                   throws WavesetException
Create a new user account on the resource

Overrides:
realCreate in class ResourceAdapterBase
Throws:
WavesetException

checkDeleteAccount

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

realDelete

protected void realDelete(WSUser user,
                          WavesetResult result)
                   throws WavesetException
Description copied from class: ResourceAdapterBase
Needs to be overridden by subclass if default deleteAccounts() implementation is used.

Overrides:
realDelete in class ResourceAdapterBase
Throws:
WavesetException

checkUpdateAccount

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

realUpdate

protected void realUpdate(WSUser user,
                          WavesetResult result)
                   throws WavesetException
Description copied from class: ResourceAdapterBase
Needs to be overridden by subclass if default updateAccounts() implementation is used.

Overrides:
realUpdate in class ResourceAdapterBase
Throws:
WavesetException

realEnable

protected void realEnable(WSUser user,
                          WavesetResult result)
                   throws WavesetException
Overrides:
realEnable in class ResourceAdapterBase
Throws:
WavesetException

realDisable

protected void realDisable(WSUser user,
                           WavesetResult result)
                    throws WavesetException
Overrides:
realDisable in class ResourceAdapterBase
Throws:
WavesetException

getAccountAttributes

public WSAttributes getAccountAttributes(java.lang.String accountIdentity)
                                  throws WavesetException
Description copied from interface: ResourceAdapter
This method is obsolete. ResourceAdapterBase provides a default implementation that throws a "not implemented" WavesetException.

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

getFeatures

public GenericObject getFeatures()
Description copied from class: ResourceAdapterBase
Expose features supported by the Resource Adapter. Note: ActiveSync is considered a facet, not a feature.

Specified by:
getFeatures in interface ResourceAdapter
Overrides:
getFeatures in class ResourceAdapterBase
Returns:
Features supported by this resource adapter.
See Also:
ResourceAdapter.Features

testConfiguration

public WavesetResult testConfiguration()
                                throws WavesetException
Description copied from class: ResourceAdapterBase
Default implementation of test method, calls check create. It is strongly preferred that this is overrided by derived classes so that a real test can be done without burdening the checkCreate method with a large overhead. On errors, an exception can be thrown or the error can be returned in the WavesetResult. Errors in the result will generate a test failure message, messages will appear for success or failure.

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

authenticate

public WavesetResult authenticate(java.util.HashMap loginInfo)
                           throws WavesetException
Description copied from interface: ResourceAdapter
Authenticates the user against the resource. If authentication is successful, the authenticated id will be returned. If more info is required to complete authentication the result will contain the required info

Specified by:
authenticate in interface ResourceAdapter
Specified by:
authenticate in class ResourceAdapterBase
Throws:
WavesetException

startConnection

protected void startConnection()
                        throws WavesetException
Description copied from class: ResourceAdapterBase
Needs to be overridden by subclass if default createAccounts() implementation is used.

Overrides:
startConnection in class ResourceAdapterBase
Throws:
WavesetException

stopConnection

protected void stopConnection()
                       throws WavesetException
Description copied from class: ResourceAdapterBase
Needs to be overridden by subclass if default createAccounts() implementation is used.

Overrides:
stopConnection in class ResourceAdapterBase
Throws:
WavesetException