java.lang.Object
de.fraunhofer.iosb.ilt.frostserver.plugin.batchprocessing.batch.Request
All Implemented Interfaces:
Content
Direct Known Subclasses:
HttpContent, JsonRequest

public abstract class Request extends Object implements Content
Individual request or response inside the bach request.
  • Field Details

    • logIndent

      protected String logIndent
    • method

      protected HttpMethod method
    • version

      protected String version
    • path

      protected String path
    • userPrincipal

      protected Principal userPrincipal
      Batch request user.
    • headersOuter

      protected final Map<String,String> headersOuter
    • headersInner

      protected final Map<String,String> headersInner
    • 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.
    • executeFailed

      protected boolean executeFailed
    • errors

      protected final List<String> errors
    • requireContentId

      protected final boolean requireContentId
    • contentId

      protected String contentId
    • contentIdValue

      protected de.fraunhofer.iosb.ilt.frostserver.model.core.Id contentIdValue
    • data

      protected final StringBuilder data
    • batchVersion

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

    • Request

      protected Request(de.fraunhofer.iosb.ilt.frostserver.path.Version batchVersion)
    • Request

      protected Request(de.fraunhofer.iosb.ilt.frostserver.path.Version batchVersion, boolean requireContentId)
  • Method Details

    • 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.
    • isExecuteFailed

      public boolean isExecuteFailed()
    • setExecuteFailed

      public void setExecuteFailed(boolean executeFailed)
    • 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.
    • getMethod

      public HttpMethod getMethod()
    • setMethod

      public void setMethod(HttpMethod method)
    • getPath

      public String getPath()
      Get the path part of the http request.
      Returns:
      the URL part of the http request.
    • setPath

      public void setPath(String path)
    • getData

      public String getData()
      Get the data in the http request. This does not include the outer headers, command, nor inner headers.
      Returns:
      The data in http request.
    • addData

      public void addData(String appended)
    • getContentId

      public String getContentId()
    • setContentId

      public void setContentId(String contentId)
    • getContentIdValue

      public de.fraunhofer.iosb.ilt.frostserver.model.core.Id getContentIdValue()
    • setContentIdValue

      public void setContentIdValue(de.fraunhofer.iosb.ilt.frostserver.model.core.Id contentIdValue)
    • getHttpHeaders

      public Map<String,String> getHttpHeaders()
      Get the headers of the request inside the batch. These are not the same as the batch headers.
      Returns:
      the headers of the individual batch request.
    • getHeaders

      public Map<String,String> getHeaders()
      Description copied from interface: Content
      Get the headers. This will include the Content-Type header.
      Specified by:
      getHeaders in interface Content
      Returns:
      the headers.
    • getUserPrincipal

      public Principal getUserPrincipal()
    • setUserPrincipal

      public void setUserPrincipal(Principal userPrincipal)
    • getVersion

      public String getVersion()
    • 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.
    • updateUsingContentIds

      public void updateUsingContentIds(List<ContentIdPair> contentIds)
    • setStatus

      public abstract void setStatus(int code, String text)
    • parseUrl

      public void parseUrl(String fullUrl)