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 |
deleteDocument(String documentId) |
protected List<Document> |
findAllDocuments(List<String> searchKeywords) |
DocumentBean |
getDocument(String documentId) |
protected File |
getDocumentFile(Document document)
Return the document File from its Metadata.
|
org.debux.webmotion.server.render.Render |
getDocumentFile(String documentId) |
protected String |
getDocumentFullId(String documentId) |
List<DocumentBean> |
getDocuments(List<String> searchKeywords) |
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 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 documentBean) |
checkAuthentication, commit, getCleanMail, getCoselmarServicesConfig, getCoselmarUserDao, getCoselmarUserGroupDao, getDocumentDao, getDocumentsService, getFullIdFromShort, getFullUserIdFromShort, getLocale, getNow, getPersistenceContext, getQuestionDao, getServicesContext, newService, rollback, setServicesContextgetContext, renderAction, renderContent, renderContent, renderDownload, renderDownload, renderError, renderError, renderFailure, renderForward, renderForward, renderJSON, renderJSONP, renderLastPage, renderRedirect, 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 org.debux.webmotion.server.render.Render getDocumentFile(String documentId)
public void saveDocument(DocumentBean documentBean)
public void deleteDocument(String documentId) throws InvalidCredentialException, UnauthorizedException
protected String managerDocumentFile(org.debux.webmotion.server.call.UploadFile uploadFile, CoselmarUser owner)
protected String getUserDocumentPath(CoselmarUser user)
protected File getDocumentFile(Document document)
document - : document we want the File corresponding
to the physical document.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 Ifremer. All rights reserved.