Class DocData

java.lang.Object
org.opencastproject.util.doc.DocData
Direct Known Subclasses:
EmailData, RestDocData

public class DocData extends Object
This is the document model class which is the basis for all doc data models
  • Field Details

  • Constructor Details

    • DocData

      public DocData(String name, String title, String[] notes)
      Create a new DocData object
      Parameters:
      name - the name of the document (must be alphanumeric (includes _) and no spaces or special chars)
      title - [OPTIONAL] the title of the document
      notes - [OPTIONAL] an array of notes to add into the document
  • Method Details

    • toMap

      public Map<String,Object> toMap()
      Returns:
      the map version of the data in this doc data holder
      Throws:
      IllegalArgumentException - if the data cannot be turned into a valid map
    • getDefaultTemplatePath

      public String getDefaultTemplatePath()
      Returns:
      the default template path for this type of document data
    • addNote

      public void addNote(String note)
      Add a note to the document
      Parameters:
      note - the text of the note
    • isValidName

      public static boolean isValidName(String name)
    • getMetaData

      public String getMetaData(String key)
    • getMeta

      public Map<String,String> getMeta()
    • getNotes

      public List<String> getNotes()