Class UserPageReturnable.UserSaxer
java.lang.Object
org.ametys.web.frontoffice.search.metamodel.impl.PageSaxer
org.ametys.plugins.userdirectory.service.search.UserPageReturnable.UserSaxer
- All Implemented Interfaces:
ReturnableSaxer
- Enclosing class:
- UserPageReturnable
The
Their pages are SAXed.
ReturnableSaxer
for user contents.
Their pages are SAXed.
-
Field Summary
Modifier and TypeFieldDescriptionprotected Collection<String>
The user content types selected in the additional parameter of the current servicee instance (and their descendants)Fields inherited from class org.ametys.web.frontoffice.search.metamodel.impl.PageSaxer
_pageReturnable
-
Constructor Summary
ConstructorDescriptionUserSaxer
(AdditionalParameterValueMap additionalParameterValues) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected SearchContext
Gets the search context to use to determine site and sitemap as to resolve user pages from user contentsprotected String
_getSitemapName
(SearchComponentArguments args, SearchContext searchContext, Content userContent) Gets the sitemap nameprotected String
_getSiteName
(SearchComponentArguments args, SearchContext searchContext) Gets the site nameprotected UserPage
_resolveUserPage
(Content userContent, String siteName, String sitemapName) Resolves the use page corresponding to the user contentprotected void
_saxUserPage
(ContentHandler contentHandler, UserPage userPage, Logger logger, SearchComponentArguments args) Sax the user pageboolean
canSax
(AmetysObject hit, Logger logger, SearchComponentArguments args) Returnstrue
if this saxer is able to SAX the given search hitGets this Saxer identifier.void
sax
(ContentHandler contentHandler, AmetysObject hit, Logger logger, SearchComponentArguments args) SAX the given search hitMethods inherited from class org.ametys.web.frontoffice.search.metamodel.impl.PageSaxer
saxContent, saxRichTextExcerpt
-
Field Details
-
_allContentTypes
The user content types selected in the additional parameter of the current servicee instance (and their descendants)
-
-
Constructor Details
-
UserSaxer
Constructor- Parameters:
additionalParameterValues
- The additional parameter values
-
-
Method Details
-
getIdentifier
Description copied from interface:ReturnableSaxer
Gets this Saxer identifier.
Most of the time you don't need to override this method and keep the default implementation which takes the runtime class name.
This identifier is used to match some XSL templates.
Thus, it does not have to be a unique identifier; for instance aReturnableSaxer
implementation can extend another Saxer and overrideReturnableSaxer.getIdentifier()
by returning its superclass name, in order to match the same XSL templates.- Returns:
- this Saxer identifier
-
canSax
Description copied from interface:ReturnableSaxer
Returnstrue
if this saxer is able to SAX the given search hit- Specified by:
canSax
in interfaceReturnableSaxer
- Overrides:
canSax
in classPageSaxer
- Parameters:
hit
- The search hitlogger
- A loggerargs
- The other arguments- Returns:
true
if this saxer is able to SAX the given search hit
-
sax
public void sax(ContentHandler contentHandler, AmetysObject hit, Logger logger, SearchComponentArguments args) throws SAXException Description copied from interface:ReturnableSaxer
SAX the given search hit- Specified by:
sax
in interfaceReturnableSaxer
- Overrides:
sax
in classPageSaxer
- Parameters:
contentHandler
- The content handlerhit
- The search hitlogger
- A loggerargs
- The other arguments- Throws:
SAXException
- if a SAX error occured
-
_getSearchContext
Gets the search context to use to determine site and sitemap as to resolve user pages from user contents- Parameters:
args
- The search arguments- Returns:
- The search context
-
_getSiteName
Gets the site name- Parameters:
args
- The search argumentssearchContext
- The search context- Returns:
- the site name
-
_getSitemapName
protected String _getSitemapName(SearchComponentArguments args, SearchContext searchContext, Content userContent) Gets the sitemap name- Parameters:
args
- The search argumentssearchContext
- The search contextuserContent
- The user content (current hit)- Returns:
- the sitemap name
-
_resolveUserPage
Resolves the use page corresponding to the user content- Parameters:
userContent
- The user contentsiteName
- The site namesitemapName
- The sitemap name- Returns:
- The user page
-
_saxUserPage
protected void _saxUserPage(ContentHandler contentHandler, UserPage userPage, Logger logger, SearchComponentArguments args) throws SAXException Sax the user page- Parameters:
contentHandler
- The content handleruserPage
- The user pagelogger
- The loggerargs
- The search arguments- Throws:
SAXException
- if a SAX error occured
-