public class SurveyAccessHelper extends AbstractLogEnabled implements Component, ThreadSafe, Serviceable
| Modifier and Type | Field and Description |
|---|---|
protected SurveyAnswerDao |
_answerDao
The ametys object resolver.
|
static String |
ROLE
Avalon role
|
| Constructor and Description |
|---|
SurveyAccessHelper() |
| Modifier and Type | Method and Description |
|---|---|
String |
getCookieName(Request request,
String surveyId)
Return the name of cookie if the survey was already taken or
null otherwise. |
Date |
getSubmissionDate(String surveyId,
UserIdentity user)
Returns the date on which the user answered to the survey or
null if he was never answered |
void |
service(ServiceManager manager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerprotected SurveyAnswerDao _answerDao
public SurveyAccessHelper()
public void service(ServiceManager manager) throws ServiceException
service in interface ServiceableServiceExceptionpublic Date getSubmissionDate(String surveyId, UserIdentity user)
null if he was never answeredsurveyId - the survey ID.user - the user.null if the user never took the survey.public String getCookieName(Request request, String surveyId)
null otherwise.request - the request.surveyId - the survey ID.null otherwise.