Class SurveyAccessHelper

java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.plugins.survey.repository.SurveyAccessHelper
All Implemented Interfaces:
Component, LogEnabled, Serviceable, ThreadSafe

helper to check survey access
  • Field Details

  • Constructor Details

  • Method Details

    • service

      public void service(ServiceManager manager) throws ServiceException
      Specified by:
      service in interface Serviceable
      Throws:
      ServiceException
    • getSubmissionDate

      public Date getSubmissionDate(String surveyId, UserIdentity user)
      Returns the date on which the user answered to the survey or null if he was never answered
      Parameters:
      surveyId - the survey ID.
      user - the user.
      Returns:
      the date on which the survey was taken, or null if the user never took the survey.
    • getCookieName

      public String getCookieName(Request request, Survey survey)
      Return the name of cookie if the survey was already taken or null otherwise.
      Parameters:
      request - the request.
      survey - the survey.
      Returns:
      the name of cookie if the survey was already taken, or null otherwise.