Class CalendarSearchService
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.web.service.StaticService
org.ametys.web.frontoffice.search.SearchService
org.ametys.plugins.calendar.search.CalendarSearchService
- All Implemented Interfaces:
Model,ModelItemAccessor,ModelItemContainer,LogEnabled,PluginAware,Labelable,Service,Disposable,Configurable,Contextualizable,Serviceable
Calendar search service
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringParameter to enable calendar search componentsstatic final StringAttribute name for content's end datestatic final StringParameter for end datestatic final StringParameter for start datestatic final StringParameter for selected tagsstatic final StringParameter for selected tagsstatic final StringId of servicestatic final StringService parameter for calendar content typesstatic final StringService parameter for contents' viewstatic final StringThe parameter name for saving user preferencesstatic final StringService parameter for tags' categoriesstatic final StringAttribute name for content's start dateFields inherited from class org.ametys.web.frontoffice.search.SearchService
_creationHelper, _renderingContextHandler, _searchServiceInstanceManager, PARAM_NAME_COMPUTE_COUNTS, PARAM_NAME_CONTEXTS, PARAM_NAME_CRITERIA, PARAM_NAME_FACETS, PARAM_NAME_HEADER, PARAM_NAME_INITIAL_SORTS, PARAM_NAME_LAUNCH_SEARCH_AT_STARTUP, PARAM_NAME_LINK_PAGE, PARAM_NAME_LINK_TITLE, PARAM_NAME_MAX_RESULTS, PARAM_NAME_PROPOSED_SORTS, PARAM_NAME_RESULT_PAGE, PARAM_NAME_RESULT_PLACE, PARAM_NAME_RESULTS_PER_PAGE, PARAM_NAME_RETURNABLES, PARAM_NAME_RIGHT_CHECKING_MODE, PARAM_NAME_RSS, PARAM_NAME_SAVE_USER_PREFS, PARAM_NAME_SERVICE_GROUP_ID, PARAM_NAME_XSLT, ROLEFields inherited from class org.ametys.web.service.StaticService
_context, _featureName, _manager, _modelItems, _paramsScript, _pluginName, _repeaterDefinitionParser, _serviceParameterDefinitionParser, _view, _viewAndParametersParser -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet search date rangeGet the active tagsgetTagCategories(SearchServiceInstance serviceInstance) Get the tags' categorystatic booleanhasTagCategories(SearchServiceInstance serviceInstance) Determines if tags' categories filter is activestatic booleanDetermines if is calendar servicebooleanisCacheable(Page currentPage, ZoneItem zoneItem) Returns true if the result of this service may be cached, depending on theZoneItemcontaining an instance of this service.static booleanDetermines if form is submit to get resultsstatic booleansaveFilterInUserPrefs(SearchServiceInstance serviceInstance) Returnstrueif selected tags filter has to be saved in user preferencesstatic booleanReturnstrueif save user preferences is enabledstatic voidsaxTag(ContentHandler handler, Tag tag) SAX a tagstatic voidsaxTag(ContentHandler handler, AttributesImpl attrs, Tag tag) SAX a tagstatic voidsaxTagColor(ContentHandler handler, Tag tag) SAX the color of a tagMethods inherited from class org.ametys.web.frontoffice.search.SearchService
_buildAdditionalSearchServiceParameters, _fieldsReloadingWidget, _hasUserInput, _isDebug, _parseAndInjectDisplayAdditionalParameters, _parseAndInjectGeneralAdditionalParameters, _setWidgetParameters, configureParameters, hasUserCriteria, hasUserInput, serviceMethods inherited from class org.ametys.web.service.StaticService
_configureClass, _configureImports, _configureScript, _parseI18nizableText, configure, configureDialogBoxDimension, configureIndexation, contextualize, dispose, getCategory, getCreationBoxHeight, getCreationBoxWidth, getCSSFiles, getDescription, getIconDecorator, getIconGlyph, getId, getLabel, getLargeIcon, getMediumIcon, getModelItems, getName, getParameters, getParametersScript, getPluginName, getRight, getSmallIcon, getURL, getView, index, isPrivate, setPluginInfoMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.runtime.model.ModelItemAccessor
getChild, getModelItem, hasModelItemMethods inherited from interface org.ametys.web.service.Service
getFamilyId
-
Field Details
-
SERVICE_ID
Id of service- See Also:
-
ENABLE_CALENDAR_PARAMETER_NAME
Parameter to enable calendar search components- See Also:
-
SERVICE_PARAM_TAG_CATEGORIES
Service parameter for tags' categories- See Also:
-
SERVICE_PARAM_CONTENT_VIEW
Service parameter for contents' view- See Also:
-
SERVICE_PARAM_CONTENT_TYPES
Service parameter for calendar content types- See Also:
-
SERVICE_PARAM_SAVE_USER_PREFS
The parameter name for saving user preferences- See Also:
-
PARAM_START_DATE
Parameter for start date- See Also:
-
PARAM_END_DATE
Parameter for end date- See Also:
-
PARAM_TAGS
Parameter for selected tags- See Also:
-
PARAM_SUBMIT
Parameter for selected tags- See Also:
-
START_DATE_ATTRIBUTE_NAME
Attribute name for content's start date- See Also:
-
END_DATE_ATTRIBUTE_NAME
Attribute name for content's end date- See Also:
-
-
Constructor Details
-
CalendarSearchService
public CalendarSearchService()
-
-
Method Details
-
isCacheable
Description copied from interface:ServiceReturns true if the result of this service may be cached, depending on theZoneItemcontaining an instance of this service.- Specified by:
isCacheablein interfaceService- Overrides:
isCacheablein classSearchService- Parameters:
currentPage- the currentPagecontaining the service.zoneItem- theZoneItemcontaining an instance of this service.
N.B: The ZoneItem can belong to a page that is not the current page, when it is inherited.- Returns:
- true if the result of this service may be cached.
-
hasTagCategories
Determines if tags' categories filter is active- Parameters:
serviceInstance- the service instance- Returns:
- true if tags' categories filter is active
-
getTagCategories
Get the tags' category- Parameters:
serviceInstance- the service instance- Returns:
- the tags' category. Can be null if no tags' categories are configured
-
saveUserPrefsEnabled
Returnstrueif save user preferences is enabled- Parameters:
args- the search arguments- Returns:
trueif save user preferences is enabled
-
saveFilterInUserPrefs
Returnstrueif selected tags filter has to be saved in user preferences- Parameters:
serviceInstance- the service instance- Returns:
trueif selected tags filtes has to be saved in user preferences
-
getSelectedTags
Get the active tags- Parameters:
args- the search arguments- Returns:
- the active tags
-
isActive
Determines if is calendar service- Parameters:
args- the search component arguments- Returns:
- true if it is calendar service
-
isFormSubmit
Determines if form is submit to get results- Parameters:
args- the search component arguments- Returns:
- true if form is submit
-
getDateRange
Get search date range- Parameters:
args- the search component arguments- Returns:
- the date time range
-
saxTag
SAX a tag- Parameters:
handler- the content handlertag- the tag- Throws:
SAXException- if an error occurred
-
saxTag
public static void saxTag(ContentHandler handler, AttributesImpl attrs, Tag tag) throws SAXException SAX a tag- Parameters:
handler- the content handlerattrs- The attributestag- the tag- Throws:
SAXException- if an error occurred
-
saxTagColor
SAX the color of a tag- Parameters:
handler- the content handlertag- the tag- Throws:
SAXException- if an error occurred
-