com.ibm.commerce.filepublish.common

Class ContentManagedFile

  • java.lang.Object
    • com.ibm.commerce.filepublish.common.ContentManagedFile


  • public class ContentManagedFile
    extends java.lang.Object
    This class represents a Content Managed File. It consists of a file path, the file content, a file promotion indicator, and a mark for delete flag.
    The file path is the full path, including the file name of the content managed file.
    The file content is the content of the managed file in the format of a byte array.
    The file promotion indicator is a flag to indicate whether or not the content managed file should be promoted to the file system. By default, the indicator is set to false to indicate that it will not be promoted.
    The mark for delete flag indicates if the file is marked for delete. By default it is set to 0. 0 means the file is not marked for delete. 1 means the file is marked for delete. 2 means the file is ready to be removed permanently.
    • 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
      ContentManagedFile(java.lang.String astrFilePath, byte[] abaFileContent)
      Default constructor for ContentManagedFile
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      byte[] getFileContent()
      Returns the content of the file.
      java.lang.String getFilePath()
      Returns the full path of the content managed file, including the file name.
      boolean getFilePromotion()
      Returns the file promotion indicator.
      int getMarkForDelete()
      Returns the mark for delete flag.
      short getPublished()
      Returns the published flag.
      java.sql.Timestamp getUploadTimestamp()
      Gets the upload timestamp of the content managed file
      void setFileContent(byte[] abaFileContent)
      This method sets the content of the file.
      void setFilePromotion(boolean aboolFilePromotion)
      Sets the file promotion indicator to indicate whether or not the content managed file should be promoted to the file system.
      void setMarkForDelete(int anMarkForDelete)
      Sets the mark for delete flag for the content managed file.
      void setPublished(short anPublished)
      Sets the published flag for the content managed file.
      void setUploadTimestamp(java.sql.Timestamp tsUploadTimestamp)
      Sets the upload timestamp of the content managed file
      • 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

      • ContentManagedFile

        public ContentManagedFile(java.lang.String astrFilePath,
                                  byte[] abaFileContent)
        Default constructor for ContentManagedFile
        Parameters:
        astrFilePath - The file path of the content managed file
        abaFileContent - The content of the content managed file
    • Method Detail

      • getFileContent

        public byte[] getFileContent()
        Returns the content of the file.
        Returns:
        The content of the file
      • setFileContent

        public void setFileContent(byte[] abaFileContent)
        This method sets the content of the file.
        Parameters:
        abaFileContent - The content of the file
      • getFilePath

        public java.lang.String getFilePath()
        Returns the full path of the content managed file, including the file name.
        Returns:
        The full path and name of the file
      • getFilePromotion

        public boolean getFilePromotion()
        Returns the file promotion indicator.
        • true = file should be promoted
        • false = file should not be promoted
        Returns:
        The file promotion indicator
      • getMarkForDelete

        public int getMarkForDelete()
        Returns the mark for delete flag.
        • 0 = file is not marked for delete.
        • 1 = file is marked for delete.
        • 2 = file is ready to be deleted.
        Returns:
        The mark for delete flag for the content managed file
      • getPublished

        public short getPublished()
        Returns the published flag.
        • 0 = file is not published.
        • 1 = file is published.
        Returns:
        The published flag for the content managed file
      • setFilePromotion

        public void setFilePromotion(boolean aboolFilePromotion)
        Sets the file promotion indicator to indicate whether or not the content managed file should be promoted to the file system.
        • true = file should be promoted.
        • false = file should not be promoted.
        Parameters:
        aboolFilePromotion - Set to indicate that content managed file is promoted to the file system.
      • setMarkForDelete

        public void setMarkForDelete(int anMarkForDelete)
        Sets the mark for delete flag for the content managed file. By default, the file is not marked for delete.
        • 0 = file is not marked for delete.
        • 1 = file is marked for delete.
        • 2 = file is ready to be deleted.
        Parameters:
        anMarkForDelete - Set the mark for delete flag for the content managed file.
      • setPublished

        public void setPublished(short anPublished)
        Sets the published flag for the content managed file. By default, the file is not published.
        • 0 = file is not published.
        • 1 = file is published.
        Parameters:
        anPublished - Set the published flag for the content managed file.
      • getUploadTimestamp

        public java.sql.Timestamp getUploadTimestamp()
        Gets the upload timestamp of the content managed file
        Returns:
        The upload timestamp
      • setUploadTimestamp

        public void setUploadTimestamp(java.sql.Timestamp tsUploadTimestamp)
        Sets the upload timestamp of the content managed file
        Parameters:
        tsUploadTimestamp - The upload timestamp