Class DBFileDocument

All Implemented Interfaces:
CategorizedDBData, DBConstants, DBData, HistorizedDBData, OpenRoleDBData, TrackedDBData, EditableData, JcmsConstants, ImportConstants, MashupConstants, StrongLockable, Searchable, Storable, JaliosConstants, LangPropertyArgument, TreeNode, Serializable, Cloneable, Comparable<BasicStorable>
Direct Known Subclasses:
AbstractMedia

public class DBFileDocument extends FileDocument implements CategorizedDBData, HistorizedDBData, OpenRoleDBData, TrackedDBData, DBConstants
See Also:
  • Field Details

  • Constructor Details

    • DBFileDocument

      public DBFileDocument()
    • DBFileDocument

      public DBFileDocument(Publication other)
    • DBFileDocument

      public DBFileDocument(FileDocument other)
    • DBFileDocument

      public DBFileDocument(DBFileDocument other)
  • Method Details

    • getDescriptionML

      public HashMap<String,String> getDescriptionML()
      Overrides:
      getDescriptionML in class FileDocument
    • setDescriptionML

      public void setDescriptionML(HashMap<String,String> v)
      Overrides:
      setDescriptionML in class FileDocument
    • getDescription

      public String getDescription(String lang)
      Overrides:
      getDescription in class FileDocument
    • getDescription

      public String getDescription(String lang, boolean useDefault)
      Overrides:
      getDescription in class FileDocument
    • setDescription

      public void setDescription(String lang, String value)
      Description copied from class: FileDocument
      Convenient method to set the value of the Description field in any language (default site language or any other).
      This method will set the proper field value (FileDocument.setDescription(String) or FileDocument.setDescriptionML(HashMap)) depending on the specified language.
      Overrides:
      setDescription in class FileDocument
      Parameters:
      lang - the language (ISO 639 code) in which to set the value
      value - the value to set.
    • getDescriptionMLE

      public String getDescriptionMLE()
      Returns the encoded descriptionML.
      Returns:
      the encoded descriptionML.
      Since:
      jcms-10.0.0
    • setDescriptionMLE

      public void setDescriptionMLE(String v)
      Set the value for the encoded descriptionML
      Parameters:
      v - the encoded descriptionML
      Since:
      jcms-10.0.0
    • getDBDataRevision

      public DBDataRevision getDBDataRevision(Data data, int op)
      Overrides:
      getDBDataRevision in class Publication
    • checkCreate

      public ControllerStatus checkCreate(Member mbr, Map context)
      Description copied from class: Publication
      Checks if the creation can be performed
      Overrides:
      checkCreate in class Publication
      Parameters:
      mbr - the member which requests the write operation
      context - a map which contains context parameters (may be null)
      Returns:
      a ControllerStatus
    • performAfterWrite

      protected void performAfterWrite(int op, Member mbr, Map context)
      Description copied from class: Data
      Called to perform some action after the write.
      Overrides:
      performAfterWrite in class FileDocument
      Parameters:
      op - the operation (OP_CREATE, OP_UPDATE, ...)
      mbr - the member which requests the write operation
      context - a map which contains context parameters (may be null)
    • getInstance

      public static FileDocument getInstance(String filename)
      Constructs a FileDocument from an existing file. The FileDocument is not created in the store.
      Parameters:
      filename - the filename. It must be relative to the context path
      Returns:
      a FileDocument wrapped to the given file or null if this file does not exist
      Since:
      jcms-6.2.0
    • getInstance

      public static FileDocument getInstance(String filename, Member author, Workspace ws)
      Constructs a FileDocument from an existing file. The FileDocument is not created in the store.
      Parameters:
      filename - the filename. It must be relative to the context path
      author - the author of the document or null
      ws - the workspace of the publication
      Returns:
      a FileDocument wrapped to the given file or null if this file does not exist
      Since:
      jcms-6.2.0
    • getInstance

      public static FileDocument getInstance(String filename, String title, String description, Category[] categories)
      Constructs a FileDocument from an existing file. The FileDocument is not created in the store.
      Parameters:
      filename - the filename. It must be relative to the context path
      title - a proposed title (if null, use the name without its extension as title)
      description - the description (may be null)
      categories - the categories (may be null)
      Returns:
      a FileDocument wrapped to the given file or null if this file does not exist
      Since:
      jcms-6.2.0
    • getInstance

      public static FileDocument getInstance(String filename, String title, String description, Category[] categories, Member author, Workspace ws)
      Constructs a FileDocument from an existing file. The FileDocument is not created in the store.
      Parameters:
      filename - the filename. It must be relative to the context path
      title - a proposed title (if null, use the name without its extension as title)
      description - the description (may be null)
      categories - the categories (may be null)
      author - the author of the document or null
      ws - the workspace of the publication
      Returns:
      a FileDocument wrapped to the given file or null if this file does not exist
      Since:
      jcms-6.2.0