public class ContentManagedFileHandlerImpl extends java.lang.Object implements ContentManagedFileHandler
ContentManagedFileHandler
. prepareContentManagedFiles()
to prepare and retrieve the list of content managed files ready for Commerce EAR update.getContentManagedFile(int)
can be used to get the individual content managed file in the list.promoteContentManagedFiles()
will go through each content managed file in the list. It will update the committed files in the database and
permanently delete the unwanted files.ManagedFileAccessBean
ContentManagedFile
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASSNAME
The CLASSNAME
|
static java.lang.String |
COPYRIGHT
The IBM internal copyright field.
|
NAME
Constructor and Description |
---|
ContentManagedFileHandlerImpl()
Default constructor for
ContentManagedFileHandlerImpl |
Modifier and Type | Method and Description |
---|---|
void |
cleanUpMarkForDeleteContentManagedFiles(java.lang.Short anPublished)
Clean up the list of mark for delete content managed file.
|
ContentManagedFile |
getContentManagedFile(int aIndex)
Prepares and gets the content managed file in the specified index
If the index is out of range, then a null will be returned.
|
int |
getNumOfFiles()
Returns the total number of content managed files.
|
int |
getNumOfFilesForCommit()
Returns the total number of content managed files ready for commit.
|
int |
getNumOfFilesForDelete()
Returns the total number of marked for delete content managed files.
|
void |
prepareContentManagedFiles(java.sql.Timestamp atmLastUploadTimestamp)
Prepare and retrieve the list of content managed files.
|
void |
promoteContentManagedFiles(java.lang.Short anPublished)
Update the list of content managed files in the database.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASSNAME
public ContentManagedFileHandlerImpl() throws ECException
ContentManagedFileHandlerImpl
ECException
- Any exception capturedpublic int getNumOfFiles()
getNumOfFiles
in interface ContentManagedFileHandler
public int getNumOfFilesForCommit()
getNumOfFilesForCommit
in interface ContentManagedFileHandler
public int getNumOfFilesForDelete()
getNumOfFilesForDelete
in interface ContentManagedFileHandler
public ContentManagedFile getContentManagedFile(int aIndex) throws ECException
getContentManagedFile
in interface ContentManagedFileHandler
aIndex
- The index for the list of content managed files.ECException
- Any exception captured when retrieving the content managed file. A possible error maybe when the file content is not found.public void promoteContentManagedFiles(java.lang.Short anPublished) throws ECException
ContentManagedFile
.
The content managed files for delete are those with their mark for delete flag set to ready for delete in the ContentManagedFile
.
set the published parameter to 1 if the files are also published.promoteContentManagedFiles
in interface ContentManagedFileHandler
anPublished
- set to 1 if the files are also published. If null then it will not update the published flag.ECException
- Any exception captured. Possible error may includes problems in retrieving the access bean for the managed file or updating it.public void cleanUpMarkForDeleteContentManagedFiles(java.lang.Short anPublished) throws ECException
cleanUpMarkForDeleteContentManagedFiles
in interface ContentManagedFileHandler
anPublished
- The published flag set by userECException
- Exceptionpublic void prepareContentManagedFiles(java.sql.Timestamp atmLastUploadTimestamp) throws ECException
prepareContentManagedFiles
in interface ContentManagedFileHandler
atmLastUploadTimestamp
- The last upload timestampECException
- Any exception captured.