com.ibm.commerce.filepublish.util

Class UpdateContentManagedFileInEARUtil

  • java.lang.Object
    • com.ibm.commerce.filepublish.util.UpdateContentManagedFileInEARUtil


  • public class UpdateContentManagedFileInEARUtil
    extends java.lang.Object

    The UpdateContentManagedFilesInEARUtil performs a series of actions. It first retrieves the list of files from the Commerce database. The list of files includes all the files that need to be committed into the file system, and all the marked for delete files. And then it calls the

    EAR Updater
    . For the files that need to be committed, the
    EAR Updater
    will update the files into the Commerce EAR. After that, these files in the database will be marked as committed to the file system. For the files that are marked for delete, the
    EAR Updater
    will delete these files in the Commerce EAR. After that, if the marked for delete files are also published, these files will be permanently deleted from the database. But if after the
    EAR Updater
    call, the marked for delete files has not been published yet, it will stay in the database so the later on it may get synchronized with the production database.

    Behavior:

    • The list of content managed files is available by using the ContentManagedFileHandler
    • The IEARUpdater is used to update the list of content managed files into the Commerce EAR. It is also used to delete the list of marked for delete content managed files from the Commerce EAR.
    • The content managed files in the database will be updated to indicate that they have been promoted to the Commerce EAR. Or the marked for delete content managed files will be removed from the Commerce EAR.

    Helpers and Utilities:
    • IEARUpdater
    • ContentManagedFileHandler
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CLASSNAME
      Define the CLASSNAME.
      static java.lang.String COPYRIGHT
      The internal copyright field.
    • Constructor Summary

      Constructors 
      Constructor and Description
      UpdateContentManagedFileInEARUtil(java.lang.String astrProductionServerApplicationName, boolean aboolUpdateCurrentEAR)
      Constructor for UpdateContentManagedFileInEARUtil.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void update()
      The main execution of UpdateContentManagedFileInEARUtil.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The internal copyright field.
        See Also:
        Constant Field Values
      • CLASSNAME

        public static final java.lang.String CLASSNAME
        Define the CLASSNAME.
        See Also:
        Constant Field Values
    • Constructor Detail

      • UpdateContentManagedFileInEARUtil

        public UpdateContentManagedFileInEARUtil(java.lang.String astrProductionServerApplicationName,
                                                 boolean aboolUpdateCurrentEAR)
                                          throws ECException
        Constructor for UpdateContentManagedFileInEARUtil. The following are set with the constructor:
        • the production server application is set by the caller
        • the option to update the current EAR is set by the caller
        Parameters:
        astrProductionServerApplicationName - The production server application name
        aboolUpdateCurrentEAR - The option to update the current EAR
        Throws:
        ECException - Any exception captured
    • Method Detail

      • update

        public void update()
                    throws ECException
        The main execution of UpdateContentManagedFileInEARUtil. When this method is called, it will first retrieve the list of content managed files. And then it will call the IEARUpdater to update or delete them in the Commerce EAR. When the operation is successful, these files will be marked to indicated their new status, or permanently deleted.
        Throws:
        ECException - Any ECException captured. Possible errors maybe caused by problems in the IEARUpdater or problems in retrieving the list of content managed files.