com.jcorporate.expresso.ext.dbobj
Class DownloadFiles
java.lang.Object
com.jcorporate.expresso.core.dataobjects.BaseDataObject
com.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject
com.jcorporate.expresso.core.dbobj.DBObject
com.jcorporate.expresso.core.dbobj.SecuredDBObject
com.jcorporate.expresso.ext.dbobj.DownloadFiles
- All Implemented Interfaces:
- Cacheable, ContextNested, DataObject, LookupInterface, Securable, Serializable
- public class DownloadFiles
- extends SecuredDBObject
This DBobject is used by the Download Controller to manage information about
files available for download, security groups allowed to download which files,
Download notes, and Mime Types settings.
- Author:
- Michael Nash
- See Also:
Download,
Serialized Form
| 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 |
|
Method Summary |
void |
add()
Extends the usual add method to fetch a next number field |
void |
checkField(String fieldName,
String fieldValue)
Overrided to check to make sure that the entered file pathname points to
a real file. |
void |
setupFields()
Define the table and fields for this object |
void |
update()
Update the database with the new info |
| Methods inherited from class com.jcorporate.expresso.core.dbobj.SecuredDBObject |
canRequesterAdd, canRequesterDelete, canRequesterRead, canRequesterUpdate, checkAllowed, copyAttributes, count, createSecurityCache, delete, 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, checkAllRefs, checkAllRefsPublic, checkDeleteDetailPerm, 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, getValidValues, getValidValuesList, getValues, 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 |
FLD_DESCRIP
public static final String FLD_DESCRIP
- See Also:
- Constant Field Values
FLD_DISPLAY_NAME
public static final String FLD_DISPLAY_NAME
- See Also:
- Constant Field Values
FLD_FILE_PATH_NAME
public static final String FLD_FILE_PATH_NAME
- See Also:
- Constant Field Values
FLD_IS_ACTIVE
public static final String FLD_IS_ACTIVE
- See Also:
- Constant Field Values
FLD_IS_RESTRICTED
public static final String FLD_IS_RESTRICTED
- See Also:
- Constant Field Values
FLD_MIME_TYPE
public static final String FLD_MIME_TYPE
- See Also:
- Constant Field Values
FLD_GROUP_NAME
public static final String FLD_GROUP_NAME
- See Also:
- Constant Field Values
FLD_PROJECT
public static final String FLD_PROJECT
- See Also:
- Constant Field Values
FLD_FILE_NUMBER
public static final String FLD_FILE_NUMBER
- See Also:
- Constant Field Values
FLD_FILE_URL
public static final String FLD_FILE_URL
- See Also:
- Constant Field Values
FLD_LAST_UPDATED
public static final String FLD_LAST_UPDATED
- See Also:
- Constant Field Values
FLD_DL_NOTES
public static final String FLD_DL_NOTES
- See Also:
- Constant Field Values
DownloadFiles
public DownloadFiles()
throws DBException
- Constructor
DownloadFiles
public DownloadFiles(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
DownloadFiles
public DownloadFiles(ControllerRequest 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
add
public void add()
throws DBException
- Extends the usual add method to fetch a next number field
- 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
update
public void update()
throws DBException
- Description copied from class:
SecuredDBObject
- Update the database with the new info
- Specified by:
update in interface DataObject- Overrides:
update in class SecuredDBObject
- Throws:
DBException - if update is not allowed for the current user
checkField
public void checkField(String fieldName,
String fieldValue)
throws DBException
- Overrided to check to make sure that the entered file pathname points to
a real file. If not, throws an exception.
- Specified by:
checkField in interface DataObject- Overrides:
checkField in class DBObject
- Parameters:
fieldName - the name of the field to checkfieldValue - the value to check
- Throws:
DBException - if there is a validation error
setupFields
public void setupFields()
throws DBException
- Define the table and fields for this object
- 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
Please see www.jcorporate.com for information about new Expresso releases.