public class DBFile extends DBFileTemplate implements DBLogicalLockCanReleasePlugin
DBObject.DenormalizeAction
Modifier and Type | Field and Description |
---|---|
static GlobalId |
DBCLASS_GID
Allows a standard file to be saved within the database system.
|
static java.lang.String |
DBCLASS_NAME
Allows a standard file to be saved within the database system.
|
static java.lang.String |
DBFILE_FMT_ENCRYPTED
encrypted format
|
static java.lang.String |
DBFILE_FMT_GZIP
GZIP format
|
static java.lang.String |
DBFILE_MAGIC_NUMBER_CREATE
to create a magicNumber
|
static java.lang.String |
DBFILE_MAGIC_NUMBER_PARAM_MODE
mode parameter of magicNumber
|
static java.lang.String |
DBFILE_PARAM_CALL_COUNT
call_count parameter of magicNumber
|
static java.lang.String |
FEATURE_SSL
string to verify if SSL has been enabled
|
static java.lang.String |
REQUIRE_FORMAT
We require a format
|
static java.lang.String |
REQUIRE_LAYER
We require the layer
|
static java.lang.String |
REQUIRE_VERSION
We require the version
|
static java.lang.String |
TEMP_FILE_PREFIX
The prefix for all files uploaded.
|
DBFILE_FMT_ORG, DBFILE_FMT_THUMB
ATTRIBUTE_MARVIN, dbClass, ds, NO_LOOP_PARAMS
Constructor and Description |
---|
DBFile(DBClass def,
DataSource dataSource)
Std.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkCanReleaseLogicalLock(DBLogicalLock lock,
Login login,
boolean defaultCanRelease)
Determines if the current user has the rights to release the lock
|
static DBFile |
create(MutableDataSource mds)
Make a new instance of this class.
|
java.lang.String |
displayName()
The display name for this object.
|
boolean |
displaysInBrowser()
does this type of file normal display within the browser's window.
|
protected void |
extCopy(DBObject target)
Additional functionality when an object is copied
|
protected void |
extFixUp()
The extended fix up routine for known problems.
|
protected java.lang.Object |
extGetDerivedValue(DBField field,
FldParams params)
Calculate the derived value for this field.
|
protected java.lang.Object |
extGetValue(DBField field,
FldParams params)
This method will masks the default value returned to the user.
|
protected void |
extPostDeleteRecord(long transNr)
clear the import files.
|
protected void |
extPostSaveRecord(long transNr)
clear the import files.
|
protected void |
extPreValidate()
Update the in-memory universe BEFORE validating
|
protected void |
extSetValue(DBField field,
java.lang.Object orgValue,
FldParams params)
We prevent some values from being set by a user.
|
protected void |
extValidateDelete(ValidationList list)
Extend this method to add validation to a record then deleted.
|
protected ValidationError |
extValidateField(DBField field,
ValidationList list)
Additional validation for a particular field.
|
protected void |
extValidateRecord(ValidationList list)
Performs additional validations on this record.
|
DBFile |
findAssociatedFile(java.lang.String... args)
File that this file is associated with.
|
Person |
findCreatedBy(java.lang.String... args)
Person who last created the file.
|
DBLogicalLock |
findCurrentLock(java.lang.String... args)
Is the current file in logical lock.
|
static DBFile |
findKey(DataSource ds,
int key)
Find the target for this class by the primary key
|
DBLanguage |
findLanguage(java.lang.String... args)
The language of this file ( if known).
|
Person |
findLockedBy(java.lang.String... args)
Deprecated.
|
Person |
findModifiedBy(java.lang.String... args)
Person who last modified the file.
|
DBFile |
getAssociatedFile(java.lang.String... args) |
int |
getAssociatedVersion(java.lang.String... args) |
java.io.File |
getCacheFile()
The cache raw file.
|
long |
getCacheFileSize()
The cache file size.
|
protected java.lang.String |
getCacheName(java.lang.String extension) |
java.lang.String |
getCachePath(boolean fullPath)
Retrieves the path used to cache files for this application server
|
java.lang.String |
getCdnURL(java.lang.String... args) |
java.lang.String |
getCheckSum(java.lang.String... args) |
java.lang.String |
getCipher(java.lang.String... args) |
java.lang.String |
getCipherInitVector(java.lang.String... args) |
java.util.Date |
getCreated(java.lang.String... args) |
Person |
getCreatedBy(java.lang.String... args) |
DBLogicalLock |
getCurrentLock(java.lang.String... args) |
java.lang.String |
getDescription(java.lang.String... args) |
java.lang.String |
getDisplayName(java.lang.String... args) |
java.lang.String |
getDisplayShortDesc(java.lang.String... args) |
java.io.File |
getImportFile()
The raw file that will be imported.
|
java.lang.String |
getImportTmpName(java.lang.String... args) |
java.lang.String |
getInternalDir()
Generates the physical path of this file based on the modular of its id
|
java.lang.String |
getInternalName()
Generates the physical name of the file
|
java.lang.String |
getInternalRawName()
Generates the physical name of the raw file
|
DBLanguage |
getLanguage(java.lang.String... args) |
DBFileLocation[] |
getLocations(DBFileStore baseStore)
Returns the locations of current version of the file
|
DBFileLocation[] |
getLocations(DBFileStore baseStore,
int version)
Returns the locations of this file for a specified version
We use the VirtualDB to retrieve the locations as we do not want to
return any location objects that are new as these may not have had
the file placed there yet
|
Person |
getLockedBy(java.lang.String... args)
Deprecated.
|
java.lang.String |
getMagicNumber(java.lang.String... args) |
java.lang.String |
getMimeType(java.lang.String format)
The MIME type for this file.
|
java.util.Date |
getModified(java.lang.String... args) |
Person |
getModifiedBy(java.lang.String... args) |
int |
getOne(java.lang.String... args) |
int |
getOverlayId(java.lang.String... args) |
java.lang.String |
getRawCheckSum(java.lang.String... args) |
java.util.Date |
getRawCreatedDate(java.lang.String... args) |
java.io.File |
getRawFile()
Get the raw (real) file.
|
java.util.Date |
getRawModifiedDate(java.lang.String... args) |
java.lang.String |
getRawProperties(java.lang.String... args) |
java.lang.String |
getRawURL(java.lang.String... args) |
java.lang.String |
getSha512base64(java.lang.String... args) |
int |
getShallowCopyID(java.lang.String... args) |
long |
getSize(java.lang.String... args) |
java.lang.String |
getSummary(java.lang.String... args) |
int |
getVersion(java.lang.String... args) |
protected java.lang.String |
getVersionNotLockedMsgID()
Gets the message id for extvalidatefield dbfield_version.
|
boolean |
hasCreateAccess(java.lang.String... args) |
boolean |
hasDeleteAccess(java.lang.String... args) |
boolean |
hasFullAccess(java.lang.String... args) |
boolean |
hasModifyAccess(java.lang.String... args) |
boolean |
hasReadAccess(java.lang.String... args) |
boolean |
isFinalFg(java.lang.String... args) |
boolean |
isGZIP(java.lang.String... args) |
boolean |
isIsVersionControlled(java.lang.String... args) |
boolean |
isLocked(java.lang.String... args) |
boolean |
isVersionControlled(java.lang.String... args) |
long |
lastModified() |
DBNode[] |
listNodes() |
void |
lock(boolean autoCommit)
Take a lock on this file
|
static DBQuery<DBFile> |
makeQuery(DataSource ds)
Make a new QUERY for this class.
|
static SearchPlan |
makeSearchPlan(DBQuery<DBObject> query)
Allows for specific attributes to be set for the queries
|
void |
releaseLock(boolean autoCommit)
Release a lock on this file
|
DBFile |
setAssociatedFile(com.aspc.dal.file.DBFile value,
java.lang.String... args) |
DBFile |
setAssociatedVersion(int value,
java.lang.String... args) |
DBFile |
setCdnURL(java.lang.String value,
java.lang.String... args) |
DBFile |
setCheckSum(java.lang.String value,
java.lang.String... args) |
DBFile |
setCipher(java.lang.String value,
java.lang.String... args) |
DBFile |
setCipherInitVector(java.lang.String value,
java.lang.String... args) |
DBFile |
setCreated(java.util.Date value,
java.lang.String... args) |
DBFile |
setCreatedBy(com.aspc.dal.dbobj.contact.Person value,
java.lang.String... args) |
DBFile |
setCurrentLock(com.aspc.dal.locks.DBLogicalLock value,
java.lang.String... args) |
DBFile |
setDescription(java.lang.String value,
java.lang.String... args) |
DBFile |
setFinalFg(boolean value,
java.lang.String... args) |
DBFile |
setGZIP(boolean value,
java.lang.String... args) |
DBFileLocation |
setImportFile(java.io.File file,
boolean autoDelete)
set the raw file to be imported.
|
DBFileLocation |
setImportFile(java.lang.String fileName,
boolean autoDelete)
set the raw file to be imported.
|
DBFile |
setImportTmpName(java.lang.String value,
java.lang.String... args) |
DBFile |
setLanguage(com.aspc.dal.dbobj.language.DBLanguage value,
java.lang.String... args) |
DBFile |
setModified(java.util.Date value,
java.lang.String... args) |
DBFile |
setModifiedBy(com.aspc.dal.dbobj.contact.Person value,
java.lang.String... args) |
DBFile |
setOverlayId(int value,
java.lang.String... args) |
DBFile |
setRawCheckSum(java.lang.String value,
java.lang.String... args) |
DBFile |
setRawCreatedDate(java.util.Date value,
java.lang.String... args) |
DBFile |
setRawModifiedDate(java.util.Date value,
java.lang.String... args) |
DBFile |
setRawProperties(java.lang.String value,
java.lang.String... args) |
DBFile |
setSha512base64(java.lang.String value,
java.lang.String... args) |
DBFile |
setShallowCopyID(int value,
java.lang.String... args) |
DBFile |
setSize(long value,
java.lang.String... args) |
DBFile |
setSummary(java.lang.String value,
java.lang.String... args) |
DBFile |
setVersion(int value,
java.lang.String... args) |
DBFile |
setVersionControlled(boolean value,
java.lang.String... args) |
DBFileLocation |
submitNewVersion(java.lang.String srcURL,
java.lang.String srcPath,
DBFileStore destStore,
java.lang.String mimetype,
java.lang.Long size,
boolean isGZIP,
java.lang.String cipher,
java.lang.String cipherInitVector,
java.lang.String checkSum,
java.lang.String rawCheckSum,
java.lang.String rawCreateDate,
java.lang.String rawModifyDate,
java.lang.String base64RawSHA512)
Adds a new version of the file to the DBFile with the associated details
|
boolean |
usedCacheFile()
was the cache file used.
|
java.lang.String |
vDisplayName() |
java.lang.String |
vName() |
findFolderId, getCachePeriod, getFolderId, getFullTextSearchScore, getID, getMimeType, getName, getPath, getPrimaryType, getProperties, getRawFile, getReferencesUUID, getSequence, getTextContent, getThumbFile, getURL, getUUID, getWeakReferencesUUID, getWebSafePath, isAudio, isChildNode, isContains, isDescendantNode, isDirectory, isImage, isPublic, isReferenceable, isSameNode, isVersionable, setCachePeriod, setFolderId, setID, setMimeType, setName, setPrimaryType, setProperties, setReferenceable, setReferencesUUID, setSequence, setTextContent, setUUID, setVersionable, setWeakReferencesUUID
addReloadEventListener, archiveCheck, autoEnterCreate, calculateValue, calculateValue, calculateValue, callingRestoreByJournal, changeThreadMode, checkCreateAccess, checkDelete, checkDeleteAccess, checkModifyAccess, checkModifyAccess, checkReadAccess, clearCache, copy, copyFields, copyIncludeField, copyInwardLinks, delete, denormalizedResult, displayLogName, displayValue, doSearch, dump, equals, eventDataLoaded, eventFieldUpdated, extAutoEnterCreate, extCanDeleteDependantObject, extCheckCreateAccess, extCheckDeleteAccess, extCheckModifyAccess, extCheckModifyAccess, extCheckReadAccess, extDelete, extDeleteRecord, extGetDerivedGlobalKey, extIsMandatory, extIsOnChange, extMarkSavePoint, extPreDeleteRecord, extPreSaveRecord, extPreValidateDelete, extRaiseEvents, extRollbackTo, extSaveRecord, extUndelete, fetchLinkHolder, findGlobalKey, findGlobalKey, findGlobalKey, findGlobalKey, findLinkedObject, findLinkedObject, findLinkedObject, findRawData, fireEventDataLoaded, fixUp, forceLockedTransaction, getBoolean, getBoolean, getBoolean, getBoolean, getBoolean, getBoolean, getChangedFieldInfo, getChangedFields, getDate, getDate, getDate, getDate, getDate, getDefaultValue, getDisableOnChangeEvent, getDouble, getDouble, getDouble, getDouble, getDouble, getFieldDouble, getFieldInt, getFieldLong, getFieldString, getFormattedString, getFormattedString, getGlobalKey, getGlobalKey, getGlobalKey, getGlobalKey, getGlobalKey, getInt, getInt, getInt, getInt, getInt, getInt, getInwardLinkage, getKeyString, getKeyValue, getLinkedObject, getLinkedObject, getLinkedObject, getLinkedObjectByKey, getLinkedRowId, getLinkedRowId, getLinkedRowIdByData, getLinkHolder, getLockedTransaction, getLong, getLong, getLong, getLong, getLong, getLong, getMutableArrayValue, getMutableArrayValue, getOriginalKey, getOriginalValue, getOriginalValue, getProcessedValue, getPureValue, getRawData, getRawValue, getRawValue, getRowId, getRowKey, getSecondaryCacheGroupKey, getSrcLayerID, getString, getString, getString, getString, getString, getString, getValue, getValue, getValue, getValue, hasAutoChanged, hasAutoChanged, hasChanged, hasChangedByUser, hasChangedByUserField, hasChangedByUserField, hasFieldChanged, hasFieldChanged, hashCode, hasStoredResult, iCheckDeleteAccess, iCheckModifyAccess, iCheckReadAccess, iGetDenormalizedMap, iGetRawValue, iPlaceDenormalizedResult, iPostSaveOrDeleteRecord, iPreSaveOrDeleteRecord, iPreValidate, iRaiseEvents, iSaveOrDeleteRecord, isBrokenLink, isBrokenLink, isChanged, isDataCacheKnownToBeDirty, isDeleted, isEmpty, iSetValue, isForceReindex, isKeyWordField, isMandatory, isNew, isNull, isNull, isOnChange, isReindex, iValidateRecord, lastTouched, makeArchiveDataLoader, makeClone, makeDataLoader, makeDenormalizedDoc, makeLinkedArray, makeModifyAccessException, makeWriteProvider, manualDenormalizeOnSave, markSavePoint, optLockedTransaction, registerWatchedObject, reindex, releaseDenormalized, removeReloadEventListener, restoreByJournal, rollbackTo, setBoolean, setBoolean, setBoolean, setBoolean, setDisableOnChangeEvent, setDouble, setDouble, setInt, setInt, setLong, setLong, setRawData, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, toString, touch, undelete, validateField, validateRecord, validateSubType
public static final java.lang.String DBCLASS_NAME
public static final GlobalId DBCLASS_GID
public static final java.lang.String TEMP_FILE_PREFIX
public static final java.lang.String DBFILE_FMT_GZIP
public static final java.lang.String DBFILE_FMT_ENCRYPTED
public static final java.lang.String REQUIRE_LAYER
public static final java.lang.String REQUIRE_FORMAT
public static final java.lang.String REQUIRE_VERSION
public static final java.lang.String DBFILE_MAGIC_NUMBER_PARAM_MODE
public static final java.lang.String DBFILE_MAGIC_NUMBER_CREATE
public static final java.lang.String DBFILE_PARAM_CALL_COUNT
public static final java.lang.String FEATURE_SSL
public DBFile(DBClass def, DataSource dataSource) throws java.lang.Exception
def
- The class of this objectdataSource
- The datasource for this objectjava.lang.Exception
- A serious problem@CheckReturnValue @Nullable public DBFile getAssociatedFile(java.lang.String... args)
@CheckReturnValue @Nonnull public final DBFile findAssociatedFile(java.lang.String... args) throws NotFoundException
DBFile
(Integer, Searchable)args
- the optional argumentsNotFoundException
- DBFile was not found@Nonnull public DBFile setAssociatedFile(com.aspc.dal.file.DBFile value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public int getAssociatedVersion(java.lang.String... args)
@Nonnull public DBFile setAssociatedVersion(int value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getCdnURL(java.lang.String... args)
@Nonnull public DBFile setCdnURL(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getCheckSum(java.lang.String... args)
@Nonnull public DBFile setCheckSum(@MatchesPattern(value="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$") java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getCipher(java.lang.String... args)
@Nonnull public DBFile setCipher(@MatchesPattern(value="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$") java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getCipherInitVector(java.lang.String... args)
@Nonnull public DBFile setCipherInitVector(@MatchesPattern(value="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$") java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public java.util.Date getCreated(java.lang.String... args)
@Nonnull public DBFile setCreated(java.util.Date value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public Person getCreatedBy(java.lang.String... args)
@CheckReturnValue @Nonnull public final Person findCreatedBy(java.lang.String... args) throws NotFoundException
Person
(Integer,
Searchable)args
- the optional argumentsNotFoundException
- Person was not found@Nonnull public DBFile setCreatedBy(com.aspc.dal.dbobj.contact.Person value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public DBLogicalLock getCurrentLock(java.lang.String... args)
@CheckReturnValue @Nonnull public final DBLogicalLock findCurrentLock(java.lang.String... args) throws NotFoundException
DBLogicalLock
(Integer,
Searchable)args
- the optional argumentsNotFoundException
- DBLogicalLock was not found@Nonnull public DBFile setCurrentLock(com.aspc.dal.locks.DBLogicalLock value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getDescription(java.lang.String... args)
@Nonnull public DBFile setDescription(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getDisplayName(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getDisplayShortDesc(java.lang.String... args)
@CheckReturnValue public boolean isFinalFg(java.lang.String... args)
@Nonnull public DBFile setFinalFg(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean hasCreateAccess(java.lang.String... args)
@CheckReturnValue public boolean hasDeleteAccess(java.lang.String... args)
@CheckReturnValue public boolean hasFullAccess(java.lang.String... args)
@CheckReturnValue public boolean hasModifyAccess(java.lang.String... args)
@CheckReturnValue public boolean hasReadAccess(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getImportTmpName(java.lang.String... args)
@Nonnull public DBFile setImportTmpName(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isGZIP(java.lang.String... args)
@Nonnull public DBFile setGZIP(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isLocked(java.lang.String... args)
@CheckReturnValue public boolean isIsVersionControlled(java.lang.String... args)
@CheckReturnValue @Nullable public DBLanguage getLanguage(java.lang.String... args)
@CheckReturnValue @Nonnull public final DBLanguage findLanguage(java.lang.String... args) throws NotFoundException
DBLanguage
(String,
Searchable)args
- the optional argumentsNotFoundException
- DBLanguage was not found@Nonnull public DBFile setLanguage(com.aspc.dal.dbobj.language.DBLanguage value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@Deprecated @CheckReturnValue @Nullable public Person getLockedBy(java.lang.String... args)
@CheckReturnValue @Deprecated @Nonnull public final Person findLockedBy(java.lang.String... args) throws NotFoundException
Person
(Integer, Derived,
Searchable)args
- the optional argumentsNotFoundException
- Person was not found@CheckReturnValue @Nonnull public java.lang.String getMagicNumber(java.lang.String... args)
@CheckReturnValue @Nullable public java.util.Date getModified(java.lang.String... args)
@Nonnull public DBFile setModified(java.util.Date value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public Person getModifiedBy(java.lang.String... args)
@CheckReturnValue @Nonnull public final Person findModifiedBy(java.lang.String... args) throws NotFoundException
Person
(Integer,
Searchable)args
- the optional argumentsNotFoundException
- Person was not found@Nonnull public DBFile setModifiedBy(com.aspc.dal.dbobj.contact.Person value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public int getOne(java.lang.String... args)
@CheckReturnValue public int getOverlayId(java.lang.String... args)
@Nonnull public DBFile setOverlayId(int value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getRawCheckSum(java.lang.String... args)
@Nonnull public DBFile setRawCheckSum(@MatchesPattern(value="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$") java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public java.util.Date getRawCreatedDate(java.lang.String... args)
@Nonnull public DBFile setRawCreatedDate(java.util.Date value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public java.util.Date getRawModifiedDate(java.lang.String... args)
@Nonnull public DBFile setRawModifiedDate(java.util.Date value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getRawProperties(java.lang.String... args)
@Nonnull public DBFile setRawProperties(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getRawURL(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getSha512base64(java.lang.String... args)
@Nonnull public DBFile setSha512base64(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public int getShallowCopyID(java.lang.String... args)
@Nonnull public DBFile setShallowCopyID(int value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public long getSize(java.lang.String... args)
@Nonnull public DBFile setSize(long value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getSummary(java.lang.String... args)
@Nonnull public DBFile setSummary(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnegative public int getVersion(java.lang.String... args)
@Nonnull public DBFile setVersion(int value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isVersionControlled(java.lang.String... args)
@Nonnull public DBFile setVersionControlled(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@Nonnull @CheckReturnValue public static DBFile create(@Nonnull MutableDataSource mds) throws java.lang.Exception
mds
- the datasourcejava.lang.Exception
- an object of this class could not be created@Nonnull @CheckReturnValue public static DBQuery<DBFile> makeQuery(@Nonnull DataSource ds) throws NotFoundException
ds
- the datasourceNotFoundException
- if class could not be found@Nonnull @CheckReturnValue public static DBFile findKey(@Nonnull DataSource ds, int key) throws NotFoundException, java.lang.Exception
ds
- the datasourcekey
- the valueNotFoundException
- if target could not be foundjava.lang.Exception
- a serious problem@CheckReturnValue @Nonnull public static SearchPlan makeSearchPlan(@Nonnull DBQuery<DBObject> query)
query
- The calling query@OverridingMethodsMustInvokeSuper protected void extCopy(@Nonnull DBObject target) throws java.lang.Exception
@CheckReturnValue public boolean usedCacheFile()
@CheckReturnValue @Nonnull public java.io.File getRawFile() throws java.lang.Exception
getRawFile
in class DBFileTemplate
java.lang.Exception
- A serious error.@Nonnull @CheckReturnValue public java.lang.String displayName()
displayName
in class DBObject
@CheckReturnValue @Nullable public java.io.File getImportFile()
@Nullable public DBFileLocation setImportFile(@Nonnull java.lang.String fileName, boolean autoDelete) throws java.lang.Exception
fileName
- The raw file name to be importedautoDelete
- java.lang.Exception
- a serious error.@Nullable public DBFileLocation setImportFile(@Nonnull java.io.File file, boolean autoDelete) throws java.lang.Exception
file
- the raw file to be importedautoDelete
- auto delete the file on save.java.lang.Exception
- a serious error.@Nullable public DBFileLocation submitNewVersion(java.lang.String srcURL, java.lang.String srcPath, @Nonnull DBFileStore destStore, java.lang.String mimetype, java.lang.Long size, boolean isGZIP, java.lang.String cipher, java.lang.String cipherInitVector, java.lang.String checkSum, java.lang.String rawCheckSum, java.lang.String rawCreateDate, java.lang.String rawModifyDate, java.lang.String base64RawSHA512) throws java.lang.Exception
srcURL
- the sourcemimetype
- the mime typeisGZIP
- is currently GZIPedcipher
- the ciphercipherInitVector
- the vectorcheckSum
- the check sumrawCheckSum
- the raw check sumsrcPath
- - the path and filename of the file to be importeddestStore
- - the destination volume for the new versionsize
- - the size in bytes of the filerawCreateDate
- rawModifyDate
- base64RawSHA512
- SHA512 base64 of the original file.java.lang.Exception
- a serious error.@CheckReturnValue @Nonnull public java.lang.String getMimeType(@Nullable java.lang.String format)
format
- the format to convert the file to.@OverridingMethodsMustInvokeSuper protected void extPostDeleteRecord(@Nonnegative long transNr)
extPostDeleteRecord
in class DBObject
transNr
- This transaction number that was just saved.@OverridingMethodsMustInvokeSuper protected void extPostSaveRecord(@Nonnegative long transNr)
extPostSaveRecord
in class DBObject
transNr
- This transaction number that was just saved.@OverridingMethodsMustInvokeSuper protected void extPreValidate() throws java.lang.Exception
extPreValidate
in class DBObject
java.lang.Exception
- A serious problem@CheckReturnValue @OverridingMethodsMustInvokeSuper @Nullable protected ValidationError extValidateField(@Nonnull DBField field, @Nonnull ValidationList list) throws java.lang.Exception
extValidateField
in class DBObject
list
- The validation listfield
- The field to be validatedjava.lang.Exception
- A serious problem@CheckReturnValue @Nonnull protected java.lang.String getVersionNotLockedMsgID()
public void lock(boolean autoCommit) throws java.lang.Exception
autoCommit
- should automatically save ( in a different datasource)java.lang.Exception
- locked by another user.public void releaseLock(boolean autoCommit) throws java.lang.Exception
autoCommit
- should automatically save ( in a different datasource)java.lang.Exception
- could not release lock.@CheckReturnValue public boolean checkCanReleaseLogicalLock(DBLogicalLock lock, Login login, boolean defaultCanRelease)
checkCanReleaseLogicalLock
in interface DBLogicalLockCanReleasePlugin
lock
- Current locklogin
- Login of person trying to release lockdefaultCanRelease
- Value determined be default system handling@OverridingMethodsMustInvokeSuper protected void extValidateRecord(@Nonnull ValidationList list) throws java.lang.Exception
extValidateRecord
in class DBObject
list
- The validation list.java.lang.Exception
- A serious problemprotected void extValidateDelete(@Nonnull ValidationList list) throws java.lang.Exception
extValidateDelete
in class DBObject
list
- The validation listjava.lang.Exception
- A serious problem@CheckReturnValue @Nonnegative public long getCacheFileSize() throws java.lang.Exception
java.lang.Exception
- A serious problem@CheckReturnValue @Nonnull public java.io.File getCacheFile() throws java.lang.Exception
java.lang.Exception
- A serious problem@CheckReturnValue @Nonnull public final DBFileLocation[] getLocations(@Nullable DBFileStore baseStore) throws java.lang.Exception
baseStore
- - the file store that the locations should be ordered byjava.lang.Exception
- Serious error@CheckReturnValue @Nonnull public final DBFileLocation[] getLocations(@Nullable DBFileStore baseStore, @Nonnegative int version) throws java.lang.Exception
baseStore
- - the file store that the locations should be ordered byversion
- - the version of the file to retrieve the locations forjava.lang.Exception
- Serious error@CheckReturnValue protected java.lang.Object extGetDerivedValue(@Nonnull DBField field, @Nullable FldParams params) throws java.lang.Exception
extGetDerivedValue
in class DBFileTemplate
field
- The field to getparams
- The parameters for this field eg. language= or default=java.lang.Exception
- A serious problem@OverridingMethodsMustInvokeSuper protected void extFixUp() throws java.lang.Exception
@CheckReturnValue public boolean displaysInBrowser()
@CheckReturnValue @Nonnull public java.lang.String getInternalDir()
@CheckReturnValue @Nonnull public java.lang.String getInternalRawName()
@CheckReturnValue @Nonnull public java.lang.String getInternalName()
@CheckReturnValue @Nonnull public java.lang.String getCachePath(boolean fullPath)
fullPath
- require the full path@CheckReturnValue protected java.lang.Object extGetValue(@Nonnull DBField field, @Nullable FldParams params)
extGetValue
in class DBObject
field
- The field to getparams
- The parameters for this field eg. language= or default=protected void extSetValue(@Nonnull DBField field, @Nullable java.lang.Object orgValue, @Nullable FldParams params) throws java.lang.Exception
extSetValue
in class DBObject
orgValue
- The value being setfield
- The field that is being changedparams
- The extra parametersjava.lang.Exception
- A serious problem@CheckReturnValue public long lastModified()
@CheckReturnValue @Nonnull protected java.lang.String getCacheName(@Nonnull java.lang.String extension)
getCacheName
in class DBFileTemplate
@CheckReturnValue @Nonnull public java.lang.String vName()
vName
in class DBFileTemplate
@CheckReturnValue @Nonnull public java.lang.String vDisplayName()
vDisplayName
in class DBFileTemplate
@Nullable public DBNode[] listNodes() throws java.lang.Exception
java.lang.Exception
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.