@Name(value="uploadFileRestlet") @Scope(value=EVENT) public class UploadFileRestlet extends BaseNuxeoRestlet implements LiveEditConstants, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected CoreSession |
documentManager |
static String |
LIVED_AUTOVERSIONING_PROP |
protected NavigationContext |
navigationContext |
static String |
POLICY_MINOR_INCR |
ACTION, ACTION_CREATE_DOCUMENT, ACTION_CREATE_DOCUMENT_FROM_TEMPLATE, ACTION_EDIT_DOCUMENT, actionSelectorTag, BLOB_FIELD, BLOB_PROPERTY_NAME, DEFAULT_BLOB_FIELD, DEFAULT_DOCTYPE, DEFAULT_FILENAME_FIELD, DEFAULT_SCHEMA, DEFAULT_SUB_BLOB_FIELD, DOC_REF, DOC_TYPE, docBlobFieldNameTag, docBlobFieldPathTag, docFieldNameTag, docfieldPathTag, docFileAuthorizedExtensionsTag, docFileAuthorizedExtensionTag, docFileExtensionTag, docFilenameFieldNameTag, docFilenameFieldPathTag, docfileNameTag, docIsLockedTag, docIsVersionTag, docMimetypeTag, docPathTag, docRefTag, docRepositoryTag, docSchemaNameTag, docTitleTag, docTypeTag, documentTag, editIdTag, FILENAME_FIELD, FILENAME_PROPERTY_NAME, liveEditTag, MIMETYPE, REPO_ID, requestBaseURLTag, requestCookiesTag, requestCookieTag, requestHeadersTag, requestHeaderTag, requestInfoTag, SCHEMA, serverInfoTag, serverVersionTag, TEMPLATE_BLOB_FIELD, TEMPLATE_DOC_REF, TEMPLATE_REPO_ID, TEMPLATE_SCHEMA, templateDocumentTag, URL_ENCODE_CHARSET, userInfoTag, userLocaleTag, userNameTag, userPasswordTag, userTokenTag, wsdlAccessWebServiceTag, wsdlLEWebServiceTag, wsdlLocationsTag, XML_LE_NAMESPACE| Constructor and Description |
|---|
UploadFileRestlet() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
doAutoMinorIncrement(String policy,
DocumentModel doc)
According to the policy, decide to auto minor increment or not
|
protected CoreSession |
getDocumentManager() |
void |
handle(org.restlet.data.Request req,
org.restlet.data.Response res) |
protected void |
saveFileToDocument(String filename,
DocumentModel dm,
String blobPropertyName,
String filenamePropertyName,
InputStream is)
Save the file into the document.
|
getHttpRequest, getHttpResponse, getQueryParamValue, getRestletFullUrl, getUserPrincipal, handleError, handleError, handleError, handleError, setEntityToBlobOutputgetContext, getLogger, init, isStarted, isStopped, setContext, start, stoppublic static final String LIVED_AUTOVERSIONING_PROP
public static final String POLICY_MINOR_INCR
@In(create=true) protected transient NavigationContext navigationContext
protected CoreSession documentManager
public UploadFileRestlet()
public void handle(org.restlet.data.Request req, org.restlet.data.Response res)
handle in class org.restlet.Restletprotected CoreSession getDocumentManager()
protected void saveFileToDocument(String filename, DocumentModel dm, String blobPropertyName, String filenamePropertyName, InputStream is) throws IOException, PropertyException
IOExceptionPropertyExceptionprotected boolean doAutoMinorIncrement(String policy, DocumentModel doc)
policy - Copyright © 2015 Nuxeo SA. All rights reserved.