java.lang.Object
de.fraunhofer.iosb.ilt.frostserver.plugin.batchprocessing.batch.Request
de.fraunhofer.iosb.ilt.frostserver.plugin.batchprocessing.multipart.HttpContent
All Implemented Interfaces:
Content, MultipartContent

public class HttpContent extends Request implements MultipartContent
Author:
scf
  • Constructor Details

    • HttpContent

      public HttpContent(de.fraunhofer.iosb.ilt.frostserver.path.Version batchVersion)
    • HttpContent

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

    • parseLine

      public void parseLine(String line)
      Description copied from interface: MultipartContent
      Add the line to the content.
      Specified by:
      parseLine in interface MultipartContent
      Parameters:
      line - The line to add.
    • getPath

      public String getPath()
      Get the path part of the http request.
      Overrides:
      getPath in class Request
      Returns:
      the URL part of the http request.
    • getData

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

      public void addData(String data)
      Overrides:
      addData in class Request
    • getContentId

      public String getContentId()
      Overrides:
      getContentId in class Request
    • setContentId

      public void setContentId(String contentId)
      Overrides:
      setContentId in class Request
    • getContentIdValue

      public de.fraunhofer.iosb.ilt.frostserver.model.core.Id getContentIdValue()
      Overrides:
      getContentIdValue in class Request
    • setContentIdValue

      public void setContentIdValue(de.fraunhofer.iosb.ilt.frostserver.model.core.Id contentIdValue)
      Overrides:
      setContentIdValue in class Request
    • updateUsingContentIds

      public void updateUsingContentIds(List<ContentIdPair> contentIds)
      Overrides:
      updateUsingContentIds in class Request
    • getMethod

      public HttpMethod getMethod()
      Overrides:
      getMethod in class Request
    • getStatusLine

      public String getStatusLine()
    • setStatusLine

      public void setStatusLine(String statusLine)
    • setStatus

      public void setStatus(int code, String text)
      Specified by:
      setStatus in class Request
    • getContent

      public String getContent(boolean allHeaders)
      Description copied from interface: Content
      Get the String content for response.
      Specified by:
      getContent in interface Content
      Parameters:
      allHeaders - flag indicating all headers should be included. If the content is going to be added to a HttpServletResponse, the headers need to be set separately.
      Returns:
      The content.
    • stripLastNewline

      public void stripLastNewline()
      Description copied from interface: MultipartContent
      Informs the Content that the last newline should be removed again. The newline before a boundary is part of the boundary, not of the content.
      Specified by:
      stripLastNewline in interface MultipartContent
    • isFinished

      public MultipartContent.IsFinished isFinished()
      Description copied from interface: MultipartContent
      Gives the parse-state of the Content. This indicates if more content is expected or not.
      Specified by:
      isFinished in interface MultipartContent
      Returns:
      the parse-state of the Content.