Expresso 5-6

com.jcorporate.expresso.services.dbobj
Class RegistrationDomain

java.lang.Object
  extended bycom.jcorporate.expresso.core.dataobjects.BaseDataObject
      extended bycom.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject
          extended bycom.jcorporate.expresso.core.dbobj.DBObject
              extended bycom.jcorporate.expresso.core.dbobj.SecuredDBObject
                  extended bycom.jcorporate.expresso.services.dbobj.RegistrationDomain
All Implemented Interfaces:
Cacheable, ContextNested, DataObject, LookupInterface, Securable, Serializable

public class RegistrationDomain
extends SecuredDBObject

A registration domain defines a registration context. A DB context can have multiple registration contexts. Each context defines a controller that takes care of registration for that context. Each context also defines whether the extended registration beyond that provided by the User object is required for the domain or not. The map of registration objects per registration domain is provided by the RegistrationObjectMap class. Creation date: (5/15/2001 12:26:11 PM)

Author:
Shash Chatterjee
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.jcorporate.expresso.core.dbobj.DBObject
DBObject.FieldError, DBObject.FieldUpdate
 
Field Summary
 
Fields inherited from class com.jcorporate.expresso.core.dbobj.SecuredDBObject
ADD, ALL_FUNCTIONS, CACHE_NAME, CACHE_TTY, DELETE, SEARCH, SYSTEM_ACCOUNT, SYSTEM_ACCOUNT_NAME, UPDATE
 
Fields inherited from class com.jcorporate.expresso.core.dbobj.DBObject
ATTRIBUTE_ERROR, ATTRIBUTE_ERROR_MESSAGE, ATTRIBUTE_PAGE_LIMIT, BIG_DECIMAL_ZERO, EMAIL_MASK, EVENT_ADD, EVENT_DELETE, EVENT_UPDATE, FLOAT_MASK, INT_MASK, IS_CHECK_RELATIONAL_INTEGRITY, UPDATE_CHANGED_ONLY, WHERE_KEYWORD
 
Fields inherited from class com.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject
anyFieldsDistinct, anyFieldsToRetrieve, appendCustomWhere, caseSensitiveQuery, customWhereClause, dbKey, distinctFields, localConnection, LONGBINARY_READ_DEFAULT_SIZE, maxRecords, myClassName, myUpdates, offsetRecord, recordSet, retrieveFields, sMetadataMap, sortKeys
 
Fields inherited from class com.jcorporate.expresso.core.dataobjects.BaseDataObject
currentStatus, globalMask
 
Fields inherited from interface com.jcorporate.expresso.core.dataobjects.DataObject
STATUS_CURRENT, STATUS_DELETED, STATUS_NEW, STATUS_UPDATED
 
Constructor Summary
RegistrationDomain()
          Default constructor
RegistrationDomain(int uid)
          Use over (String) constructor.
RegistrationDomain(RequestContext request)
          For using DBObjects within Controllers.
 
Method Summary
 void add()
          Extends the usual add method to check for duplicate entires and to provide an unique id
static RegistrationDomain buildDefaultRegistrationDomain(String dbContext)
          Returns the default registration domain.
protected  void checkAllRefs()
          Extends the checkAllRefs method to check for valid UserGroup or if referential integrity is violated
 void delete()
          Extends the usual delete method to delete associated registration object entries
 Controller getRegistrationObject()
          Instantiates the controller based upon the current Controller Value
 Vector getValidValues(String fieldName)
          Override the method getValidValues to provide specific values for our multi-valued fields
 Vector getValues()
          Method to return a Vector of ValidValue Template method--not implemented in this superclass.
protected  void setupFields()
          Method to set up the fields for this database object.
 void update()
          Extends the usual update method to check for duplicate entries
 
Methods inherited from class com.jcorporate.expresso.core.dbobj.SecuredDBObject
canRequesterAdd, canRequesterDelete, canRequesterRead, canRequesterUpdate, checkAllowed, copyAttributes, count, createSecurityCache, deleteAll, find, getRequestingUid, getString, getString, getString, getString, getString, getString, getSystemUid, instantiate, isAllowed, retrieve, search, searchAndRetrieveList, searchAndRetrieveList, setRequestingUid
 
Methods inherited from class com.jcorporate.expresso.core.dbobj.DBObject
addDetail, addField, addField, addFieldError, addFoundKeys, addIfNeeded, addIndex, addKey, addOrUpdate, addSortKey, addTransition, addVirtualField, addVirtualField, addVirtualField, addVirtualField, average, basicAdd, cacheIsChangedComparison, checkAllReferredToBy, checkAllRefsPublic, checkDeleteDetailPerm, checkField, checkRef, checkRef, clear, clearDistinctFields, clearError, clearFieldsToRetrieve, clearSortKeys, containsWildCards, delete, deleteAll, deleteDetails, denotesRange, equals, forKey, formatDateTime, get, getAllAttributes, getAttribute, getAttributesIterator, getBooleanFieldValue, getCacheSize, getCacheStatsMap, getCacheUtil, getCheckZeroUpdate, getCustomWhereClause, getDataContext, getDataField, getDataTransferObject, getDBName, getDetails, getDistinctFieldCount, getDistinctFields, getField, getFieldBigDecimal, getFieldBoolean, getFieldByte, getFieldByteArray, getFieldData, getFieldDate, getFieldDecimalFormatted, getFieldDouble, getFieldErrorMessage, getFieldFloat, getFieldInt, getFieldLong, getFieldMetaData, getFieldShort, getFieldsToRetrieveCount, getFilterClass, getFoundCount, getFoundKeysArray, getIndexArray, getISOValuesDefault, getISOValuesDefault, getISOValuesDefault, getKey, getKeyFieldListIterator, getLength, getLengthInt, getLocalConnection, getLocale, getLogger, getLookupObject, getMax, getMax, getMaxRecords, getMyKeys, getMyUpdatesArray, getOffsetRecord, getPatternMatcher, getPrecision, getSerializedForm, getStringFilter, getThisDBbj, getThisDBObj, getValidValueDescrip, getValidValuesList, getValuesDefault, getValuesDefault, getValuesDefault, hasError, hasErrors, haveAllKeys, initialize, isCached, isChanged, isDistinct, isEmpty, isFieldDistinct, isFieldNull, isFieldsToRetrieve, isFieldToRetrieve, isMultiValued, isReadOnly, isSecret, isVirtual, loadFromConnection, logChange, max, min, newInstance, noNewLine, noQuotes, notifyListeners, populateDefaultValues, referredToBy, removeAttribute, removeFromCache, retrieveFromCache, saveBinaryField, search, set, setAttribute, setCacheSize, setCharset, setCheckZeroUpdate, setConnection, setConnection, setCustomWhereClause, setCustomWhereClause, setDataContext, setDataField, setDataTransferObject, setDefaultValue, setDescription, setField, setField, setField, setField, setField, setField, setField, setField, setField, setField, setFieldData, setFieldData, setFieldDistinct, setFieldsToRetrieve, setFilterClass, setFilterClass, setKeys, setLocale, setLookupField, setLookupObject, setMask, setMaxRecords, setMultiValued, setName, setOffsetRecord, setReadOnly, setSchema, setSecret, setSortKey, setStringFilter, setStringFiltersOnAll, setTargetDbSchema, setTargetTable, sqlAggrFunction, sum, toDebugString, update, updateAll, updateAll, verify
 
Methods inherited from class com.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject
addInParam, addOutParam, buildWhereClause, buildWhereClauseBuffer, checkZeroUpdate, constructNewMetaData, createAndExecuteSearch, createAndRunStoreProcedure, getConnectionPool, getCustomStringFieldValue, getDef, getDistinctFieldArrayList, getExecutor, getFieldsToRetrieveIterator, getJDBCMetaData, getJDBCUtil, getMappedDataContext, getMetaData, getQueryInterface, getSerialForm, loadFromConnection, makeLimitationStub, quoteIfNeeded, runStoredProcedure, runStoredProcedureAndRetrieveList, selectFieldString, setCaseSensitiveQuery, setDBConnectionPool, setDBName, setMappedDataContext, setOriginalDBName, setTargetStoreProcedure
 
Methods inherited from class com.jcorporate.expresso.core.dataobjects.BaseDataObject
getGlobalMask, getStatus, isGlobalMasked, setFieldsWithDefaults, setGlobalMask, setStatus
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistrationDomain

public RegistrationDomain()
                   throws DBException
Default constructor

Throws:
DBException - The exception description.

RegistrationDomain

public RegistrationDomain(int uid)
                   throws DBException
Use over (String) constructor. Initializes the object in the context of the user who's uid belongs to the parameter.

Parameters:
uid - the Uid of the user context
Throws:
DBException - if there's an initialization problem

RegistrationDomain

public RegistrationDomain(RequestContext request)
                   throws DBException
For using DBObjects within Controllers. Initializes based upon the current user and the requested db. [Of course this can be modified later]

Parameters:
request - - The controller request handed to you by the framework.
Throws:
DBException - upon initialization error
Method Detail

getValidValues

public Vector getValidValues(String fieldName)
                      throws DBException
Override the method getValidValues to provide specific values for our multi-valued fields

Overrides:
getValidValues in class DBObject
Parameters:
fieldName - Field name for which values are requested
Returns:
Vector The ValidValues field
Throws:
DBException - If the values cannot be retrieved

getValues

public Vector getValues()
                 throws DBException
Description copied from class: DBObject
Method to return a Vector of ValidValue Template method--not implemented in this superclass. This method may be implemented by objects that want to provide a list of valid values for other DB objects. It is strongly recommended that the valid value list be cached (via the CacheManager) for performance. The naming convention used in Expresso is to store the ValidValue list with a cache name the same as the db objects class name with ".validValues" appended TODO: This should be converted to array List versions

Specified by:
getValues in interface LookupInterface
Overrides:
getValues in class DBObject
Returns:
Vector of ValidValue objects
Throws:
DBException - upon error.
See Also:
DBObject.getValidValues(java.lang.String)

add

public void add()
         throws DBException
Extends the usual add method to check for duplicate entires and to provide an unique id

Specified by:
add in interface DataObject
Overrides:
add in class SecuredDBObject
Throws:
DBException - If the next number could not be allocated or the add fails
See Also:
SecuredDBObject.add()

buildDefaultRegistrationDomain

public static RegistrationDomain buildDefaultRegistrationDomain(String dbContext)
                                                         throws DBException
Returns the default registration domain. Factory Method that is often called by a LoginController for self-registered users.

Parameters:
dbContext - the database context name
Returns:
Registration domain object
Throws:
DBException - upon construction failure

getRegistrationObject

public Controller getRegistrationObject()
                                 throws DBException
Instantiates the controller based upon the current Controller Value

Returns:
Controller instance that performs registration
Throws:
DBException - upon error

delete

public void delete()
            throws DBException
Extends the usual delete method to delete associated registration object entries

Specified by:
delete in interface DataObject
Overrides:
delete in class SecuredDBObject
Throws:
DBException - If the next number could not be allocated or the add fails
See Also:
SecuredDBObject.delete()

update

public void update()
            throws DBException
Extends the usual update method to check for duplicate entries

Specified by:
update in interface DataObject
Overrides:
update in class SecuredDBObject
Throws:
DBException - If the next number could not be allocated or the add fails

checkAllRefs

protected void checkAllRefs()
                     throws DBException
Extends the checkAllRefs method to check for valid UserGroup or if referential integrity is violated

Overrides:
checkAllRefs in class DBObject
Throws:
DBException - If there is a problem checking the integrity

setupFields

protected void setupFields()
                    throws DBException
Method to set up the fields for this database object. This method should be defined in the implementing object and should make calls to addField, addKey, setMultiValued, etc. as required to define the content of the DBObject

Overrides:
setupFields in class DBObject
Throws:
DBException - If there is an error setting up the fields as requested. For example, if a field allowing null is requested as part of the key

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.