Class OHttpMultipartRequestCommand<B,F>
java.lang.Object
com.orientechnologies.orient.server.network.protocol.http.command.OServerCommandAbstract
com.orientechnologies.orient.server.network.protocol.http.command.OServerCommandAuthenticatedDbAbstract
com.orientechnologies.orient.server.network.protocol.http.multipart.OHttpMultipartRequestCommand<B,F>
- All Implemented Interfaces:
OServerCommand
- Direct Known Subclasses:
OServerCommandPostImportDatabase,OServerCommandPostUploadSingleFile
public abstract class OHttpMultipartRequestCommand<B,F>
extends OServerCommandAuthenticatedDbAbstract
- Author:
- Luca Molino (molino.luca--at--gmail.com)
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.orientechnologies.orient.server.network.protocol.http.command.OServerCommandAuthenticatedDbAbstract
DBNAME_DIR_SEPARATOR, SESSIONID_LOGOUT, SESSIONID_UNAUTHORIZEDFields inherited from class com.orientechnologies.orient.server.network.protocol.http.command.OServerCommandAbstract
server -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Stringprotected abstract Stringparse(OHttpRequest iRequest, OHttpResponse iResponse, OHttpMultipartContentParser<B> standardContentParser, OHttpMultipartContentParser<F> fileContentParser, ODatabaseDocument database) protected voidparseBaseContent(OHttpRequest iRequest, OHttpMultipartContentParser<B> contentParser, HashMap<String, String> headers, OHttpMultipartContentInputStream in, ODatabaseDocument database) protected voidparseFileContent(OHttpRequest iRequest, OHttpMultipartContentParser<F> contentParser, HashMap<String, String> headers, OHttpMultipartContentInputStream in, ODatabaseDocument database) protected charparseHeader(OHttpRequest iRequest, OHttpResponse iResponse, HashMap<String, String> headers, String headerName) protected voidparsePartHeaders(OHttpRequest iRequest, OHttpResponse iResponse, char currChar, boolean endRequest, HashMap<String, String> headers) protected abstract voidprocessBaseContent(OHttpRequest iRequest, B iContentResult, HashMap<String, String> headers) protected abstract voidprocessFileContent(OHttpRequest iRequest, F iContentResult, HashMap<String, String> headers) protected voidreadBoundary(OHttpRequest iRequest, OHttpResponse iResponse, char currChar) protected booleanreadBoundaryCrLf(OHttpRequest iRequest, OHttpResponse iResponse, char currChar, boolean endRequest) Methods inherited from class com.orientechnologies.orient.server.network.protocol.http.command.OServerCommandAuthenticatedDbAbstract
afterExecute, authenticate, beforeExecute, getProfiledDatabaseInstance, getProfiledDatabaseInstanceBasic, getProfiledDatabaseInstanceToken, sendAuthorizationRequestMethods inherited from class com.orientechnologies.orient.server.network.protocol.http.command.OServerCommandAbstract
checkSyntax, configure, getServer, isJsonResponse, sendJsonError, setNoCacheMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.server.network.protocol.http.command.OServerCommand
execute, getNames
-
Constructor Details
-
OHttpMultipartRequestCommand
public OHttpMultipartRequestCommand()
-
-
Method Details
-
parse
public HashMap<String,String> parse(OHttpRequest iRequest, OHttpResponse iResponse, OHttpMultipartContentParser<B> standardContentParser, OHttpMultipartContentParser<F> fileContentParser, ODatabaseDocument database) throws Exception - Throws:
Exception
-
readBoundaryCrLf
protected boolean readBoundaryCrLf(OHttpRequest iRequest, OHttpResponse iResponse, char currChar, boolean endRequest) throws IOException - Throws:
IOException
-
readBoundary
protected void readBoundary(OHttpRequest iRequest, OHttpResponse iResponse, char currChar) throws IOException - Throws:
IOException
-
parsePartHeaders
protected void parsePartHeaders(OHttpRequest iRequest, OHttpResponse iResponse, char currChar, boolean endRequest, HashMap<String, String> headers) throws IOException- Throws:
IOException
-
parseHeader
protected char parseHeader(OHttpRequest iRequest, OHttpResponse iResponse, HashMap<String, String> headers, String headerName) throws IOException- Throws:
IOException
-
parseBaseContent
protected void parseBaseContent(OHttpRequest iRequest, OHttpMultipartContentParser<B> contentParser, HashMap<String, String> headers, OHttpMultipartContentInputStream in, ODatabaseDocument database) throws Exception- Throws:
Exception
-
parseFileContent
protected void parseFileContent(OHttpRequest iRequest, OHttpMultipartContentParser<F> contentParser, HashMap<String, String> headers, OHttpMultipartContentInputStream in, ODatabaseDocument database) throws Exception- Throws:
Exception
-
processBaseContent
protected abstract void processBaseContent(OHttpRequest iRequest, B iContentResult, HashMap<String, String> headers) throws Exception- Throws:
Exception
-
processFileContent
protected abstract void processFileContent(OHttpRequest iRequest, F iContentResult, HashMap<String, String> headers) throws Exception- Throws:
Exception
-
getFileParamenterName
-
getDocumentParamenterName
-