java.lang.Object
de.fraunhofer.iosb.ilt.frostserver.plugin.batchprocessing.batch.Batch<C>
Type Parameters:
C - The type of content.
All Implemented Interfaces:
Content
Direct Known Subclasses:
JsonBatch, MixedContent

public abstract class Batch<C extends Content> extends Object implements Content
Batch of requests or responses.
  • Field Details

    • settings

      protected final CoreSettings settings
    • parts

      protected final List<Part<C extends Content>> parts
    • logIndent

      protected String logIndent
    • parseFailed

      protected boolean parseFailed
      Flag indicating there is a problem with the syntax of the content. If this is a changeSet, then the entire changeSet will be discarded.
    • errors

      protected final List<String> errors
    • isChangeSet

      protected final boolean isChangeSet
    • batchVersion

      protected final de.fraunhofer.iosb.ilt.frostserver.path.Version batchVersion
    • userPrincipal

      protected Principal userPrincipal
  • Constructor Details

    • Batch

      protected Batch(de.fraunhofer.iosb.ilt.frostserver.path.Version batchVersion, CoreSettings settings, boolean isChangeSet)
  • Method Details

    • parse

      public abstract boolean parse(ServiceRequest request)
    • isParseFailed

      public boolean isParseFailed()
      Description copied from interface: Content
      Flag indicating there were errors parsing the content.
      Specified by:
      isParseFailed in interface Content
      Returns:
      true if there were parse errors.
    • getErrors

      public List<String> getErrors()
      Description copied from interface: Content
      Get the list of error messages generating during parsing.
      Specified by:
      getErrors in interface Content
      Returns:
      A list of error messages generating during parsing.
    • setLogIndent

      public void setLogIndent(String logIndent)
      Description copied from interface: Content
      Sets the indentation of log messages. Since Content can be nested, this makes debug output better readable.
      Specified by:
      setLogIndent in interface Content
      Parameters:
      logIndent - the indentation of log messages.
    • getParts

      public List<Part<C>> getParts()
    • addPart

      public Batch<C> addPart(Part<C> part)
    • getUserPrincipal

      public Principal getUserPrincipal()
    • setUserPrincipal

      public void setUserPrincipal(Principal userPrincipal)