public class DocumentsWebService extends CoselmarWebServiceSupport
| Modifier and Type | Field and Description |
|---|---|
static List<String> |
DOCUMENT_EDIT_ALLOWED_USER_ROLES |
static List<String> |
DOCUMENT_VIEW_ALLOWED_USER_ROLES |
| Constructor and Description |
|---|
DocumentsWebService() |
| Modifier and Type | Method and Description |
|---|---|
DocumentBean |
addDocument(DocumentBean document,
org.debux.webmotion.server.call.UploadFile uploadFile) |
void |
addDocumentFile(String documentId,
org.debux.webmotion.server.call.UploadFile uploadFile) |
void |
deleteDocument(String documentId) |
DocumentBean |
getDocument(String documentId) |
org.debux.webmotion.server.render.Render |
getDocumentFile(String documentId) |
protected String |
getDocumentFullId(String documentId) |
List<DocumentBean> |
getDocuments(List<String> searchKeywords) |
protected List<String> |
getDocumentsFullId(List<String> documentShortIds) |
List<String> |
getKeywords() |
List<String> |
getTypes() |
protected String |
getUserDocumentPath(CoselmarUser user) |
protected boolean |
isAllowedToAccessDocument(UserWebToken userWebToken,
Document document)
Check if an user can access to a document metadata, according to its
privacy settings and the user grant.
|
protected org.apache.commons.lang3.tuple.Pair<String,String> |
managerDocumentFile(org.debux.webmotion.server.call.UploadFile uploadFile,
CoselmarUser owner)
When a Document is sent, it could have a File part : this manage the
upload file.
|
void |
saveDocument(DocumentBean document) |
checkAuthentication, commit, getCleanMail, getCoselmarServicesConfig, getCoselmarUserDao, getCoselmarUserGroupDao, getDocumentDao, getDocumentsService, getFullIdFromShort, getFullUserIdFromShort, getLocale, getNow, getPersistenceContext, getQuestionDao, getServicesContext, newService, rollback, setServicesContextgetContext, renderAction, renderAtom, renderContent, renderContent, renderDownload, renderDownload, renderError, renderError, renderFailure, renderForward, renderForward, renderJSON, renderJSONP, renderLastPage, renderRedirect, renderRSS, renderStatus, renderStream, renderStream, renderStringTemplate, renderSuccess, renderTemplate, renderURL, renderView, renderXML, setContextable, toMappublic DocumentBean getDocument(String documentId) throws InvalidCredentialException, UnauthorizedException
public List<DocumentBean> getDocuments(List<String> searchKeywords) throws InvalidCredentialException
InvalidCredentialExceptionpublic DocumentBean addDocument(DocumentBean document, org.debux.webmotion.server.call.UploadFile uploadFile) throws InvalidCredentialException, UnauthorizedException
public void addDocumentFile(String documentId, org.debux.webmotion.server.call.UploadFile uploadFile) throws InvalidCredentialException, UnauthorizedException
public org.debux.webmotion.server.render.Render getDocumentFile(String documentId) throws NoResultException
NoResultExceptionpublic void saveDocument(DocumentBean document) throws InvalidCredentialException, UnauthorizedException
public void deleteDocument(String documentId) throws InvalidCredentialException, UnauthorizedException
public List<String> getKeywords() throws InvalidCredentialException, UnauthorizedException
public List<String> getTypes() throws InvalidCredentialException, UnauthorizedException
protected org.apache.commons.lang3.tuple.Pair<String,String> managerDocumentFile(org.debux.webmotion.server.call.UploadFile uploadFile, CoselmarUser owner)
protected String getUserDocumentPath(CoselmarUser user)
protected boolean isAllowedToAccessDocument(UserWebToken userWebToken, Document document)
userWebToken - : Session data for current user,
containing CoselmarUserRole as Stringdocument - : the document user trying to access.Copyright © 2014–2015 Ifremer. All rights reserved.