public class QuestionsWebService extends CoselmarWebServiceSupport
| Modifier and Type | Field and Description |
|---|---|
protected static List<String> |
RESTRICTED_ACCESS_USERS |
| Constructor and Description |
|---|
QuestionsWebService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDocuments(String questionId,
DocumentBean[] documents) |
void |
addQuestion(QuestionBean question) |
protected void |
checkIsClientAllowed(Question question,
CoselmarUser currentUser) |
protected void |
checkIsParticipant(Question question,
CoselmarUser currentUser) |
void |
deleteQuestion(String questionId) |
protected List<Question> |
getAllFilteredQuestions(CoselmarUser currentUser,
QuestionSearchBean searchBean)
Methods that retrieve all questions matching search filter (based on
title, summary, themes, status, privacy), also depending of current user role permission :
ADMIN and SUPERVISOR can access to all questions ;
MEMBER can only access to all public questions (so, if filter is on private, it has no result) ;
EXPERT can access to all private questions where he is participant or client and all public questions ;
CLIENT can access to all questions where he is client.
|
protected List<Question> |
getAllQuestions(CoselmarUser currentUser)
Methods that retrieve all questions depending of current user role permission :
ADMIN and SUPERVISOR can access to all questions ;
MEMBER can access to all public questions ;
EXPERT can access to all private questions where he is participant or client and all public questions ;
CLIENT can access to all questions where he is client.
|
QuestionBean |
getQuestion(String questionId) |
List<QuestionBean> |
getQuestions(QuestionSearchBean searchOption) |
protected List<String> |
getQuestionsFullId(List<String> questionShortIds) |
List<String> |
getThemes() |
List<String> |
getTypes() |
protected Set<Document> |
retrieveDocuments(Collection<DocumentBean> documentBeans) |
protected Set<Question> |
retrieveQuestions(Collection<QuestionBean> questionBeans) |
protected Set<CoselmarUser> |
retrieveUsers(Collection<UserBean> userBeans) |
void |
saveQuestion(QuestionBean question) |
checkAuthentication, checkUserAuthentication, commit, getCleanMail, getCoselmarServicesConfig, getCoselmarUserDao, getCoselmarUserGroupDao, getDocumentDao, getDocumentsService, getFullIdFromShort, getFullUserIdFromShort, getLocale, getNow, getPersistenceContext, getQuestionDao, getServicesContext, getShortIdFromFull, 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 void addQuestion(QuestionBean question) throws InvalidCredentialException, UnauthorizedException
public List<QuestionBean> getQuestions(QuestionSearchBean searchOption) throws InvalidCredentialException, UnauthorizedException
public void deleteQuestion(String questionId) throws InvalidCredentialException, UnauthorizedException
public QuestionBean getQuestion(String questionId) throws InvalidCredentialException, UnauthorizedException
public void addDocuments(String questionId, DocumentBean[] documents) throws InvalidCredentialException, UnauthorizedException
public void saveQuestion(QuestionBean question) throws InvalidCredentialException, UnauthorizedException
public List<String> getThemes() throws InvalidCredentialException, UnauthorizedException
public List<String> getTypes() throws InvalidCredentialException, UnauthorizedException
protected void checkIsParticipant(Question question, CoselmarUser currentUser) throws UnauthorizedException
UnauthorizedExceptionprotected void checkIsClientAllowed(Question question, CoselmarUser currentUser) throws UnauthorizedException
UnauthorizedExceptionprotected Set<CoselmarUser> retrieveUsers(Collection<UserBean> userBeans)
protected Set<Question> retrieveQuestions(Collection<QuestionBean> questionBeans)
protected Set<Document> retrieveDocuments(Collection<DocumentBean> documentBeans)
protected List<Question> getAllQuestions(CoselmarUser currentUser) throws UnauthorizedException
ADMIN and SUPERVISOR can access to all questions ;MEMBER can access to all public questions ;EXPERT can access to all private questions where he is participant or client and all public questions ;CLIENT can access to all questions where he is client.currentUser - : current user that make requestUnauthorizedExceptionprotected List<Question> getAllFilteredQuestions(CoselmarUser currentUser, QuestionSearchBean searchBean) throws UnauthorizedException
ADMIN and SUPERVISOR can access to all questions ;MEMBER can only access to all public questions (so, if filter is on private, it has no result) ;EXPERT can access to all private questions where he is participant or client and all public questions ;CLIENT can access to all questions where he is client.currentUser - : current user that make requestsearchBean - : bean containing search param to filter resultUnauthorizedExceptionCopyright © 2014–2015 Ifremer. All rights reserved.