public abstract class ManagedFileBeanBase
extends com.ibm.commerce.base.objects.ECAbstractEntityBean
Modifier and Type | Field and Description |
---|---|
static java.lang.String | CONSTANT_LARGE_FILE_EJB_NAME
The name used to fetch the local enterprise bean representing a file larger then 32K.
|
static java.lang.String | CONSTANT_SMALL_FILE_EJB_NAME
The name used to fetch the local enterprise bean representing a file smaller then 32K.
|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
static int | MAX_SMALL_FILE_SIZE
The minimum number of bytes the file must be in order for it to be considered a large file.
|
static java.lang.Short | PROMOTED_TO_FILE_SYSYEM
The constant value to indicate a file is promoted to the file system.
|
static java.lang.String | TABLE_NAME
The name of the table this enterprise bean represents.
|
Constructor and Description |
---|
ManagedFileBeanBase()
Creates an instance of the object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Long | ejbCreate(com.ibm.commerce.context.content.objects.EntityCreationData entityCreationData)
Creates the new managed file by inserting it into the CMFILE table.
|
void | ejbLoad()
Loads the managed file.
|
void | ejbPostCreate(com.ibm.commerce.context.content.objects.EntityCreationData entityCreationData)
Additional operations after the Enterprise Java Bean is created.
|
void | ejbRemove()
Removes the managed file and its content in the base schema.
|
void | ejbStore()
Stores the managed file.
|
abstract java.lang.Short | getAssociated()
Returns whether the file is associated with a business object.
|
protected static javax.naming.Context | getContext() |
byte[] | getFile(java.lang.String contentWorkspace)
Returns the file contents associated with the managed file for the specified workspace.
|
abstract java.lang.Long | getFileDirId()
Gets the file directory ID.
|
abstract java.lang.Long | getFileId()
Returns the internal file identifier (business object key) for the managed file.
|
abstract java.lang.String | getFilePath()
Returns the URI location (file path) the managed file represents.
|
abstract java.lang.Long | getFileSize()
Gets the file size.
|
protected ManagedFileStorageLocalHome | getLargeFileHome() |
abstract java.lang.Short | getPromotedToFileSystem()
Retrieves whether the file was promoted to the file system.
|
abstract java.sql.Timestamp | getPromotedToFileSystemTimestamp()
Returns when the file was promted to the files system.
|
abstract java.lang.Short | getPublished()
Gets the published flag.
|
protected ManagedFileStorageLocalHome | getSmallFileHome() |
abstract java.lang.Short | getStorageType()
Returns the storage type to indicate where the file is stored.
|
abstract java.sql.Timestamp | getUploadTimestamp()
Returns when the file was uploaded.
|
protected void | resetMetaDataForChangedFileContents()
Resets the file meta data (file upload timestamp, file promote to file system flag and timestamp) to the appropriate values whenever a change is made to the content of the files.
|
abstract void | setAssociated(java.lang.Short newAssociated)
Sets whether the file is associated with a business object.
|
void | setFile(byte[] file, java.lang.String contentWorkspace)
Sets the file contents for the specified workspace.
|
abstract void | setFileDirId(java.lang.Long newFileDirId)
Sets the file directory ID.
|
abstract void | setFileId(java.lang.Long newFileId)
Sets the internal file identifier (business object key) for the managed file.
|
abstract void | setFilePath(java.lang.String newFilePath)
Sets the URI location (file path) the managed file represents.
|
abstract void | setFileSize(java.lang.Long newFileSize)
Sets the file size
|
abstract void | setPromotedToFileSystem(java.lang.Short newPromotedToFileSystem)
Sets whether the file was promoted.
|
abstract void | setPromotedToFileSystemTimestamp(java.sql.Timestamp newPromotedToFileSystemTimestamp)
Sets when the file system was promoted.
|
abstract void | setPublished(java.lang.Short newPublished)
Sets the published flag.
|
abstract void | setStorageType(java.lang.Short newStorageType)
Sets the storage type to indicate where the file is stored.
|
abstract void | setUploadTimestamp(java.sql.Timestamp newUploadTimestamp)
Sets when the file was uploaded.
|
public static final java.lang.String COPYRIGHT
public static final int MAX_SMALL_FILE_SIZE
public static final java.lang.String CONSTANT_SMALL_FILE_EJB_NAME
public static final java.lang.String CONSTANT_LARGE_FILE_EJB_NAME
public static final java.lang.String TABLE_NAME
public static final java.lang.Short PROMOTED_TO_FILE_SYSYEM
public ManagedFileBeanBase()
protected static javax.naming.Context getContext() throws javax.naming.NamingException
protected ManagedFileStorageLocalHome getSmallFileHome() throws javax.naming.NamingException
protected ManagedFileStorageLocalHome getLargeFileHome() throws javax.naming.NamingException
public java.lang.Long ejbCreate(com.ibm.commerce.context.content.objects.EntityCreationData entityCreationData) throws javax.ejb.CreateException
public void ejbPostCreate(com.ibm.commerce.context.content.objects.EntityCreationData entityCreationData) throws javax.ejb.CreateException
public void ejbLoad()
public void ejbStore()
public abstract java.lang.Long getFileId()
public abstract void setFileId(java.lang.Long newFileId)
public abstract java.lang.String getFilePath()
public abstract void setFilePath(java.lang.String newFilePath)
public abstract java.lang.Long getFileDirId()
public abstract void setFileDirId(java.lang.Long newFileDirId)
public abstract java.lang.Long getFileSize()
public abstract void setFileSize(java.lang.Long newFileSize)
public abstract java.lang.Short getPromotedToFileSystem()
public abstract void setPromotedToFileSystem(java.lang.Short newPromotedToFileSystem)
public abstract java.sql.Timestamp getPromotedToFileSystemTimestamp()
public abstract void setPromotedToFileSystemTimestamp(java.sql.Timestamp newPromotedToFileSystemTimestamp)
public abstract java.sql.Timestamp getUploadTimestamp()
public abstract void setUploadTimestamp(java.sql.Timestamp newUploadTimestamp)
public abstract java.lang.Short getAssociated()
public abstract void setAssociated(java.lang.Short newAssociated)
public abstract java.lang.Short getStorageType()
public abstract void setStorageType(java.lang.Short newStorageType)
public abstract java.lang.Short getPublished()
public abstract void setPublished(java.lang.Short newPublished)
public byte[] getFile(java.lang.String contentWorkspace) throws javax.naming.NamingException, javax.ejb.FinderException
public void setFile(byte[] file, java.lang.String contentWorkspace) throws javax.naming.NamingException, javax.ejb.CreateException
protected void resetMetaDataForChangedFileContents()
public void ejbRemove() throws javax.ejb.RemoveException