public class SearchGenerator extends ServiceableGenerator implements Contextualizable
SearchAction.| Modifier and Type | Field and Description | 
|---|---|
| protected ContentResultSetHelper | _contentRSHHelper for saxing result | 
| protected Context | _contextContext | 
| protected SearchUIModelExtensionPoint | _searchModelManagerThe search model manager | 
| protected ServerCommHelper | _serverCommHelperThe server comm helper | 
| protected ContentValuesExtractorFactory | _valuesExtractorFactoryThe content values extractor factory. | 
| static String | CONTENT_VERSION_LABELConstant for getting content in specific version label | 
managerobjectModel, parameters, resolver, sourcecontentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer| Constructor and Description | 
|---|
| SearchGenerator() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | contextualize(Context context) | 
| void | generate() | 
| protected List<CriteriaSearchUIModelWrapper.Column> | getColumnsFromParameters(Map<String,Object> jsParameters)Get the columns from JS parameters | 
| protected void | saxContent(Content content,
          Collection<? extends ResultField> resultFields,
          Locale defaultLocale)SAX the result content | 
| protected void | saxContents(SearchModel model,
           SearchResults<Content> results,
           Collection<? extends ResultField> resultFields,
           String versionLabel,
           Map<String,Object> jsParameters,
           Locale defaultLocale)Sax a set of contents | 
| void | service(ServiceManager smanager) | 
| protected boolean | switchToLabel(Content content,
             String label)Switch to the revision corresponding to the specified label. | 
disposerecycle, setupsetConsumer, setContentHandler, setLexicalHandlerenableLogging, getLogger, setupLogger, setupLogger, setupLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetConsumerpublic static final String CONTENT_VERSION_LABEL
protected ServerCommHelper _serverCommHelper
protected ContentValuesExtractorFactory _valuesExtractorFactory
protected ContentResultSetHelper _contentRSH
protected SearchUIModelExtensionPoint _searchModelManager
public SearchGenerator()
public void service(ServiceManager smanager) throws ServiceException
service in interface Serviceableservice in class ServiceableGeneratorServiceExceptionpublic void contextualize(Context context) throws ContextException
contextualize in interface ContextualizableContextExceptionpublic void generate() throws IOException, SAXException, ProcessingException
generate in interface GeneratorIOExceptionSAXExceptionProcessingExceptionprotected void saxContents(SearchModel model, SearchResults<Content> results, Collection<? extends ResultField> resultFields, String versionLabel, Map<String,Object> jsParameters, Locale defaultLocale) throws SAXException, AmetysRepositoryException, IOException, ProcessingException
model - search modelresults - contentsresultFields - fields to retreiveversionLabel - version labeljsParameters - parameters of the searchdefaultLocale - The locale to use for localized values if content's language is null.SAXException - if a error occurred during saxAmetysRepositoryException - if a error occurredIOException - if a error occurredProcessingException - if a error occurredprotected List<CriteriaSearchUIModelWrapper.Column> getColumnsFromParameters(Map<String,Object> jsParameters)
jsParameters - The JS parametersprotected boolean switchToLabel(Content content, String label)
content - The contentlabel - the label to switch totrue if a revision with this label exists and the content was switch, false otherwise.protected void saxContent(Content content, Collection<? extends ResultField> resultFields, Locale defaultLocale) throws SAXException, AmetysRepositoryException, IOException
content - the resultresultFields - the result fieldsdefaultLocale - The locale to use for localized values if content's language is null.SAXException - if a error occurred during saxAmetysRepositoryException - if a error occurredIOException - if a error occurred