public class SearchGenerator extends ServiceableGenerator
SearchAction
.Modifier and Type | Field and Description |
---|---|
protected ContentTypesHelper |
_contentTypesHelper
Helper for content types
|
protected AmetysObjectResolver |
_resolver
|
protected ServerCommHelper |
_serverCommHelper
The server comm helper
|
protected UserManager |
_userManager
The user manager.
|
protected ContentValuesExtractorFactory |
_valuesExtractorFactory
The content values extractor factory.
|
manager
objectModel, parameters, resolver, source
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
Constructor and Description |
---|
SearchGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
generate() |
protected void |
generateContentLabel(ResultField resultField,
Object value)
Generate the label of an content value.
|
protected void |
generateEnumeratedLabel(ResultField resultField,
Object value)
Generate the label of an enumerated value.
|
protected void |
generateUserLabel(ResultField resultField,
Object value)
Generate the label of an user value.
|
protected void |
saxContent(Content content,
Collection<SearchUIColumn> fields,
Map<String,Object> values,
boolean generateLabels,
String language)
Generate the content's values.
|
protected void |
saxLabel(ResultField resultField,
Object value,
String language)
Generate a human-readable representation of a result field for a content.
|
protected void |
saxValue(ResultField resultField,
Object value)
Generate the value of a result field for a content.
|
void |
service(ServiceManager smanager) |
dispose
recycle, setup
setConsumer, setContentHandler, setLexicalHandler
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setConsumer
protected AmetysObjectResolver _resolver
protected UserManager _userManager
protected ContentTypesHelper _contentTypesHelper
protected ServerCommHelper _serverCommHelper
protected ContentValuesExtractorFactory _valuesExtractorFactory
public SearchGenerator()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
service
in class ServiceableGenerator
ServiceException
public void generate() throws IOException, SAXException, ProcessingException
protected void saxContent(Content content, Collection<SearchUIColumn> fields, Map<String,Object> values, boolean generateLabels, String language) throws SAXException
content
- The content.fields
- The model result fields.values
- The content values, extracted from the fields.generateLabels
- true to generate value labels, false to generate raw values.language
- The language.SAXException
- If an error occurs generating the XML.protected void saxValue(ResultField resultField, Object value) throws SAXException
resultField
- The result field.value
- The content value.SAXException
- If an error occurs generating the XML.protected void saxLabel(ResultField resultField, Object value, String language) throws SAXException
resultField
- The result field.value
- The content value.language
- The language.SAXException
- If an error occurs generating the XML.protected void generateUserLabel(ResultField resultField, Object value) throws SAXException
resultField
- The result field.value
- The content value.SAXException
- If an error occurs generating the XML.protected void generateContentLabel(ResultField resultField, Object value) throws SAXException
resultField
- The result field.value
- The content value.SAXException
- If an error occurs generating the XML.protected void generateEnumeratedLabel(ResultField resultField, Object value) throws SAXException
resultField
- The result field.value
- The content value.SAXException
- If an error occurs generating the XML.