com.ibm.commerce.filepublish.util

Interface ContentManagedFileHandler

  • All Known Implementing Classes:
    ContentManagedFileHandlerImpl


    public interface ContentManagedFileHandler
    Interface for ContentManagedFileHandler. The implementation for ContentManagedFileHandler is defined in the instance configuration XML file in the ManagedFileUpdateEARConfiguration section.
    The purpose of the ContentManagedFileHandler is to handle:
    • the promotion of the content managed files to the Commerce file system,
    • the deletion of the marked for delete content managed files.
    ContentManagedFileHandler is used by the ContentManagedFileEARUpdate.
    The prepareContentManagedFiles() must be executed first to retrieves the list of promotion ready content managed files.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      The IBM internal copyright field.
      static java.lang.String NAME
      The name of this interface.
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        The IBM internal copyright field.
        See Also:
        Constant Field Values
    • Method Detail

      • getNumOfFiles

        int getNumOfFiles()
        Returns the total number of content managed files.
        Returns:
        The total number of content managed files.
      • getNumOfFilesForCommit

        int getNumOfFilesForCommit()
        Returns the total number of content managed files ready for commit.
        Returns:
        The total number of content managed files ready for commit.
      • getNumOfFilesForDelete

        int getNumOfFilesForDelete()
        Returns the total number of marked for delete content managed files.
        Returns:
        The total number of marked for delete content managed files.
      • getContentManagedFile

        ContentManagedFile getContentManagedFile(int aIndex)
                                          throws ECException
        Prepares and gets the content managed file in the specified index If the index is out of range, then a null will be returned.
        Parameters:
        aIndex - The index for the list of content managed files
        Returns:
        The content managed file
        Throws:
        ECException - Any exception captured when retrieving the content managed file. A possible error maybe when the file content is not found.
      • promoteContentManagedFiles

        void promoteContentManagedFiles(java.lang.Short anPublished)
                                 throws ECException
        Update the list of content managed files in the database to indicate that these files have been promoted to the file system. The list of content managed files are the files that have been set to true for the file promotion flag in the ContentManagedFile. set the published parameter to 1 if the files are also published. By default it is set to 0 for not published.
        Parameters:
        anPublished - set to 1 if the files are also published. If null then it is set to 0.
        Throws:
        ECException - Any exception captured. Possible error may includes problems in retrieving the access bean for the managed file or updating it.
      • prepareContentManagedFiles

        void prepareContentManagedFiles(java.sql.Timestamp atmLastUploadTimestamp)
                                 throws ECException
        Prepare and retrieve the list of content managed files.
        Parameters:
        atmLastUploadTimestamp - The last upload timestamp
        Throws:
        ECException - Any exception captured
      • cleanUpMarkForDeleteContentManagedFiles

        void cleanUpMarkForDeleteContentManagedFiles(java.lang.Short anPublished)
                                              throws ECException
        Clean up the list of mark for delete content managed file. A mark for delete, published, and null content managed file will be deleted from the database.
        Parameters:
        anPublished - The published flag set by user
        Throws:
        ECException - Exception