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
Modifier and TypeFieldDescriptionstatic final String
Parameter to enable calendar search componentsstatic final String
Attribute name for content's end datestatic final String
Parameter for end datestatic final String
Parameter for start datestatic final String
Parameter for selected tagsstatic final String
Parameter for selected tagsstatic final String
Id of servicestatic final String
Service parameter for calendar content typesstatic final String
Service parameter for contents' viewstatic final String
The parameter name for saving user preferencesstatic final String
Service parameter for tags' categoriesstatic final String
Attribute 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, ROLE
Fields inherited from class org.ametys.web.service.StaticService
_context, _featureName, _manager, _modelItems, _paramsScript, _pluginName, _repeaterDefinitionParser, _serviceParameterDefinitionParser, _view, _viewAndParametersParser
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet search date rangeGet the active tagsgetTagCategories
(SearchServiceInstance serviceInstance) Get the tags' categorystatic boolean
hasTagCategories
(SearchServiceInstance serviceInstance) Determines if tags' categories filter is activestatic boolean
Determines if is calendar serviceboolean
isCacheable
(Page currentPage, ZoneItem zoneItem) Returns true if the result of this service may be cached, depending on theZoneItem
containing an instance of this service.static boolean
Determines if form is submit to get resultsstatic boolean
saveFilterInUserPrefs
(SearchServiceInstance serviceInstance) Returnstrue
if selected tags filter has to be saved in user preferencesstatic boolean
Returnstrue
if save user preferences is enabledstatic void
saxTag
(ContentHandler handler, Tag tag) SAX a tagstatic void
saxTag
(ContentHandler handler, AttributesImpl attrs, Tag tag) SAX a tagstatic void
saxTagColor
(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, service
Methods 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, setPluginInfo
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.runtime.model.ModelItemAccessor
getChild, getModelItem, hasModelItem
Methods 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:Service
Returns true if the result of this service may be cached, depending on theZoneItem
containing an instance of this service.- Specified by:
isCacheable
in interfaceService
- Overrides:
isCacheable
in classSearchService
- Parameters:
currentPage
- the currentPage
containing the service.zoneItem
- theZoneItem
containing 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
Returnstrue
if save user preferences is enabled- Parameters:
args
- the search arguments- Returns:
true
if save user preferences is enabled
-
saveFilterInUserPrefs
Returnstrue
if selected tags filter has to be saved in user preferences- Parameters:
serviceInstance
- the service instance- Returns:
true
if 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
-