Class OutputJobImpl

java.lang.Object
ch.tocco.nice2.outputcenter.impl.CommonEntityDelegate
ch.tocco.nice2.outputcenter.impl.OutputJobImpl
All Implemented Interfaces:
Mergable, OutputJob

public class OutputJobImpl extends CommonEntityDelegate implements OutputJob
  • Constructor Details

  • Method Details

    • getMergeRelationName

      public String getMergeRelationName()
      Specified by:
      getMergeRelationName in interface Mergable
    • getId

      public String getId()
      Description copied from interface: OutputJob
      The id of this output job. It uniquely identifies this job.
      Specified by:
      getId in interface Mergable
      Specified by:
      getId in interface OutputJob
    • getCreatedTime

      public org.joda.time.DateTime getCreatedTime()
      Description copied from interface: OutputJob
      The timestamp this output job was created.
      Specified by:
      getCreatedTime in interface OutputJob
    • getOwner

      public Optional<Entity> getOwner()
      Description copied from interface: OutputJob
      The owner user, who created this output job. If it was created by the system, there is no owner.
      Specified by:
      getOwner in interface OutputJob
    • getLabel

      public String getLabel()
      Description copied from interface: OutputJob
      The label or name of the document without a possible extension.
      Specified by:
      getLabel in interface OutputJob
    • getFileName

      public String getFileName(org.joda.time.DateTimeZone zone)
      Specified by:
      getFileName in interface Mergable
      Parameters:
      zone - time zone to format the timestamp in the filename
      Returns:
      the filename used to download the document (without file extension / mime type)
    • getStatus

      public OutputJob.Status getStatus()
      Specified by:
      getStatus in interface OutputJob
    • getType

      public OutputJob.Type getType()
      Specified by:
      getType in interface OutputJob
    • getItems

      public Iterable<OutputJobItem> getItems()
      Description copied from interface: OutputJob
      A list of personalized documents with their corresponding recipients.
      Specified by:
      getItems in interface OutputJob
    • getMergeItems

      public Iterable<OutputJobMergeItem> getMergeItems()
      Description copied from interface: OutputJob
      If this job is a merge-job, this method returns the list of jobs that have been merged into this one.
      Specified by:
      getMergeItems in interface OutputJob
    • isPersonalized

      public boolean isPersonalized()
      Description copied from interface: OutputJob
      Tells whether this is a personalized job (one with items) or an unpersonalized job.
      Specified by:
      isPersonalized in interface OutputJob
    • getDocument

      public Optional<OutputCenterInputSupplier> getDocument()
      Description copied from interface: OutputJob
      The document if this job is "not personalized", meaning there are no recipients for this document. In case of a personalized job, this document is a the result of concatenating the documents of all recipients.
      Specified by:
      getDocument in interface OutputJob
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getMimeType

      public OutputCenterInputSupplier.MimeType getMimeType()
      Specified by:
      getMimeType in interface Mergable