Class MixedContent
java.lang.Object
de.fraunhofer.iosb.ilt.frostserver.plugin.batchprocessing.batch.Batch<MultipartContent>
de.fraunhofer.iosb.ilt.frostserver.plugin.batchprocessing.multipart.MixedContent
- All Implemented Interfaces:
Content,MultipartContent
Parser for multipart/mixed mime type stringContent, since Tomcat only handles
multipart/form-data.
- Author:
- scf
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.fraunhofer.iosb.ilt.frostserver.plugin.batchprocessing.multipart.MultipartContent
MultipartContent.IsFinished -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Patternstatic final Stringstatic final Patternstatic final Stringstatic final Patternstatic final StringFields inherited from class de.fraunhofer.iosb.ilt.frostserver.plugin.batchprocessing.batch.Batch
batchVersion, errors, isChangeSet, logIndent, parseFailed, parts, settings, userPrincipal -
Constructor Summary
ConstructorsConstructorDescriptionMixedContent(de.fraunhofer.iosb.ilt.frostserver.path.Version batchVersion, CoreSettings settings, boolean isChangeSet) -
Method Summary
Modifier and TypeMethodDescriptiongetContent(boolean allHeaders) Get the String content for response.Get the headers.Gives the parse-state of the Content.booleanparse(ServiceRequest request) voidAdd the line to the content.voidparseLineInternal(String line) setBoundaryHeader(String boundaryHeader) voidInforms the Content that the last newline should be removed again.Methods inherited from class de.fraunhofer.iosb.ilt.frostserver.plugin.batchprocessing.batch.Batch
addPart, getErrors, getParts, getUserPrincipal, isParseFailed, setLogIndent, setUserPrincipalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.fraunhofer.iosb.ilt.frostserver.plugin.batchprocessing.batch.Content
getErrors, isParseFailed, setLogIndent
-
Field Details
-
BOUNDARY_REGEX
- See Also:
-
BOUNDARY_PATTERN
-
HEADER_REGEX
- See Also:
-
HEADER_PATTERN
-
SUB_HEADER_REGEX
- See Also:
-
SUB_HEADER_PATTERN
-
-
Constructor Details
-
MixedContent
public MixedContent(de.fraunhofer.iosb.ilt.frostserver.path.Version batchVersion, CoreSettings settings, boolean isChangeSet)
-
-
Method Details
-
parse
- Specified by:
parsein classBatch<MultipartContent>
-
setBoundaryHeader
-
parseLine
Description copied from interface:MultipartContentAdd the line to the content.- Specified by:
parseLinein interfaceMultipartContent- Parameters:
line- The line to add.
-
parseLineInternal
-
stripLastNewline
public void stripLastNewline()Description copied from interface:MultipartContentInforms 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:
stripLastNewlinein interfaceMultipartContent
-
isFinished
Description copied from interface:MultipartContentGives the parse-state of the Content. This indicates if more content is expected or not.- Specified by:
isFinishedin interfaceMultipartContent- Returns:
- the parse-state of the Content.
-
getContent
Description copied from interface:ContentGet the String content for response.- Specified by:
getContentin interfaceContent- 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.
-
getHeaders
Description copied from interface:ContentGet the headers. This will include the Content-Type header.- Specified by:
getHeadersin interfaceContent- Returns:
- the headers.
-