Class ScheduledSurveyClientSideElement
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.ui.StaticFileImportsClientSideElement
-
- org.ametys.core.ui.StaticClientSideElement
-
- org.ametys.plugins.survey.clientsideelement.ScheduledSurveyClientSideElement
-
- All Implemented Interfaces:
ClientSideElement,LogEnabled,PluginAware,Configurable,Contextualizable,Serviceable
public class ScheduledSurveyClientSideElement extends StaticClientSideElement implements Contextualizable
ClientSideElement for the Scheduled Survey
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile
-
-
Field Summary
Fields Modifier and Type Field Description private Context_contextprivate AmetysObjectResolver_resolver-
Fields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
-
Constructor Summary
Constructors Constructor Description ScheduledSurveyClientSideElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private I18nizableText_getDateValidDescription(Survey survey)private I18nizableText_getForthComingDescription(Survey survey, Date startDate, Date endDate, Locale locale)private I18nizableText_getOutOfDateDescription(Survey survey, Date endDate, Locale locale)voidcontextualize(Context context)Map<String,Object>getScheduledDates(String surveyId)Get the scheduled dates of a surveyMap<String,Object>getStatus(List<String> surveysId)Get the survey statusvoidservice(ServiceManager smanager)booleansetScheduledDate(List<String> surveyIds, String startDateAsStr, String endDateAsStr)Set date of publication of surveys-
Methods inherited from class org.ametys.core.ui.StaticClientSideElement
_configureClass, _configureParameters, _configureScript, configureInitialParameters
-
Methods inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, getScripts, hasRight, setPluginInfo, toString
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_resolver
private AmetysObjectResolver _resolver
-
-
Constructor Detail
-
ScheduledSurveyClientSideElement
public ScheduledSurveyClientSideElement()
-
-
Method Detail
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classStaticFileImportsClientSideElement- Throws:
ServiceException
-
getScheduledDates
public Map<String,Object> getScheduledDates(String surveyId)
Get the scheduled dates of a survey- Parameters:
surveyId- the id of the survey- Returns:
- a map
-
setScheduledDate
public boolean setScheduledDate(List<String> surveyIds, String startDateAsStr, String endDateAsStr)
Set date of publication of surveys- Parameters:
surveyIds- The ids of surveys to updatestartDateAsStr- The start date. Can be null.endDateAsStr- The end date. Can be null.- Returns:
- true if operation has succeeded.
-
getStatus
public Map<String,Object> getStatus(List<String> surveysId)
Get the survey status- Parameters:
surveysId- The survey ids- Returns:
- the surveys status
-
_getDateValidDescription
private I18nizableText _getDateValidDescription(Survey survey)
-
_getOutOfDateDescription
private I18nizableText _getOutOfDateDescription(Survey survey, Date endDate, Locale locale)
-
_getForthComingDescription
private I18nizableText _getForthComingDescription(Survey survey, Date startDate, Date endDate, Locale locale)
-
-