public class ContentResultSetHelper extends MetadataManager
Modifier and Type | Class and Description |
---|---|
(package private) class |
ContentResultSetHelper.ResultFieldContentHandler |
class |
ContentResultSetHelper.SearchResultFieldSet
Inner class representing a set of result fields.
|
class |
ContentResultSetHelper.SearchResultFieldSetElement
Inner class representing a element of a
ContentResultSetHelper.SearchResultFieldSet
This can contains sub elements. |
MetadataManager.RepeaterEntryComparator
Modifier and Type | Field and Description |
---|---|
private static String |
__RESULT_FIELD_PATH_ATTRIBUTE |
private SystemPropertyExtensionPoint |
_systemPropEP |
static String |
ROLE
Avalon Role.
|
_contentTypeExtensionPoint, _contentTypesHelper, _externalizableMetadataProviderEP, REPEATER_ENTRY_COMPARATOR
_context, _jsonUtils, _resolver, _userManager
Constructor and Description |
---|
ContentResultSetHelper() |
Modifier and Type | Method and Description |
---|---|
private MetadataDefinition |
_getMetadataDefinition(String metadataName,
MetadataDefinition parentMetadataDef,
Content content) |
protected void |
_saxCompositeMetadata(ContentHandler contentHandler,
Content content,
CompositeMetadata metadata,
MetadataDefinition metadataDefinition,
String metadataName,
ContentResultSetHelper.SearchResultFieldSet resultSet,
Locale defaultLocale,
String prefix,
boolean checkRead)
SAX a composite metadata.
|
protected void |
_saxContent(ContentHandler contentHandler,
Content content,
Locale defaultLocale,
String metadataName,
ContentResultSetHelper.SearchResultFieldSet resultSet,
String prefix,
boolean checkRead)
SAX a content (referenced or sub-content) in view mode.
|
protected void |
_saxContentReferenceMetadata(ContentHandler contentHandler,
Content content,
CompositeMetadata metadatas,
MetadataDefinition metadataDefinition,
String metadataName,
ContentResultSetHelper.SearchResultFieldSet resultSet,
Locale defaultLocale,
String prefix,
boolean checkRead)
SAX a "content" metadata.
|
protected void |
_saxMetadata(ContentHandler contentHandler,
Content content,
CompositeMetadata metadata,
ContentResultSetHelper.SearchResultFieldSet resultSet,
MetadataDefinition metadataDefinition,
Locale defaultLocale,
String prefix,
boolean checkRead)
SAX a metadata
|
private void |
_saxResultSet(ContentHandler contentHandler,
Content content,
CompositeMetadata metadata,
ContentResultSetHelper.SearchResultFieldSet resultSetElement,
MetadataDefinition parentMetadataDef,
Locale defaultLocale,
String prefix,
boolean checkRead) |
ContentResultSetHelper.SearchResultFieldSet |
buildResultSet(Collection<? extends ResultField> fields,
Content content)
Build a result set from result fields
|
void |
saxReadableResultFields(ContentHandler contentHandler,
Content content,
Collection<? extends ResultField> fields,
Locale defaultLocale)
SAXes the result fields of a content.
|
void |
saxReadableResultSet(ContentHandler contentHandler,
Content content,
ContentResultSetHelper.SearchResultFieldSet resultSet,
Locale defaultLocale)
SAX a content metadata set that are readable.
|
void |
saxResultFields(ContentHandler contentHandler,
Content content,
Collection<? extends ResultField> fields,
Locale defaultLocale)
SAXes the result fields of a content.
|
void |
saxResultSet(ContentHandler contentHandler,
Content content,
ContentResultSetHelper.SearchResultFieldSet resultSet,
Locale defaultLocale)
SAXes a content result set.
|
void |
saxSystemProperty(ContentHandler contentHandler,
String systemPropertyId,
Content content)
SAX a system property
|
void |
service(ServiceManager smanager) |
_binaryAsJson, _canRead, _contentAsJson, _geocodeAsJson, _multilingualStringAsJson, _referenceAsJson, _resourceAsJson, _richTextAsString, _saxBinaryMetadata, _saxBinaryMetadataAsJson, _saxCompositeMetadata, _saxContentReferenceMetadata, _saxExternalisableBinaryMetadata, _saxExternalisableFileMetadata, _saxExternalisableGeocodeMetadata, _saxExternalisableMetadata, _saxExternalisableMultilingualStringMetadata, _saxExternalisableObjectCollectionMetadata, _saxExternalisableReferenceMetadata, _saxExternalisableResourceFileMetadata, _saxExternalisableRichTextMetadata, _saxExternalisableUserMetadata, _saxExternalizableBooleanMetadata, _saxExternalizableContentReferenceMetadata, _saxExternalizableDateMetadata, _saxExternalizableDoubleMetadata, _saxExternalizableLongMetadata, _saxExternalizableStringMetadata, _saxExternalizableValuesAsJson, _saxFileMetadata, _saxGeocodeMetadata, _saxMetadata, _saxMetadataComments, _saxMultilingualStringAsJson, _saxMultilingualStringMetadata, _saxNoExternalisableMetadata, _saxNonEditionRenderingContent, _saxReferenceMetadata, _saxResourceFileMetadata, _saxResourceFileMetadata, _saxResourceFileMetadataAsJson, _saxRichTextMetadata, _saxSingleDateMetadata, _saxSingleGeocodeMetadata, _saxSingleGeocodeMetadataAsJson, _saxSingleReferenceMetadata, _saxSingleReferenceMetadataAsJson, _saxStringMetadata, _saxSubContentMetadata, _saxUserMetadata, getExternalizableMetadata, saxMetadata, saxMetadata, saxMetadata, saxMetadataComments, saxReadableMetadata, saxReadableMetadata
_binaryAsJson, _getRefAmetysObjectIds, _saxAllMetadata, _saxBinaryMetadata, _saxDateMetadata, _saxEnumeratedStringMetadata, _saxMetadata, _saxMultilingualStringMetadata, _saxMultipleUserMetadataAsJson, _saxObject, _saxRichTextMetadata, _saxSingleUserMetadataAsJson, _saxStringMetadata, _saxUserMetadata, _userAsJson, contextualize, saxMetadata, saxMetadata
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
private static final String __RESULT_FIELD_PATH_ATTRIBUTE
private SystemPropertyExtensionPoint _systemPropEP
public ContentResultSetHelper()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
service
in class MetadataManager
ServiceException
public void saxResultFields(ContentHandler contentHandler, Content content, Collection<? extends ResultField> fields, Locale defaultLocale) throws AmetysRepositoryException, SAXException, IOException
contentHandler
- the content handler where to SAX into.content
- the content.fields
- the result fields.defaultLocale
- The locale to use to sax localized values such as multilingual content or multilingual string.
Only to be valued if initial content's language is null, otherwise set this parameter to null.AmetysRepositoryException
- if an error occurs.SAXException
- if an error occurs.IOException
- if an error occurs.public void saxReadableResultFields(ContentHandler contentHandler, Content content, Collection<? extends ResultField> fields, Locale defaultLocale) throws AmetysRepositoryException, SAXException, IOException
contentHandler
- the content handler where to SAX into.content
- the content.fields
- the result fields.defaultLocale
- The locale to use to sax localized values such as multilingual content or multilingual string.
Only to be valued if initial content's language is null, otherwise set this parameter to null.AmetysRepositoryException
- if an error occurs.SAXException
- if an error occurs.IOException
- if an error occurs.public void saxResultSet(ContentHandler contentHandler, Content content, ContentResultSetHelper.SearchResultFieldSet resultSet, Locale defaultLocale) throws AmetysRepositoryException, SAXException, IOException
contentHandler
- the content handler where to SAX into.content
- the content.resultSet
- the set of result fields to SAXdefaultLocale
- The locale to use to sax localized values such as multilingual content or multilingual string. Only use if initial content's language is not null. Can be null.AmetysRepositoryException
- if an error occurs.SAXException
- if an error occurs.IOException
- if an error occurs.public void saxReadableResultSet(ContentHandler contentHandler, Content content, ContentResultSetHelper.SearchResultFieldSet resultSet, Locale defaultLocale) throws AmetysRepositoryException, SAXException, IOException
contentHandler
- the content handler where to SAX into.content
- the content.resultSet
- the set of result fields to SAXdefaultLocale
- The locale to use to sax localized values such as multilingual content or multilingual string.
Only to be valued if initial content's language is null, otherwise set this parameter to null.AmetysRepositoryException
- if an error occurs.SAXException
- if an error occurs.IOException
- if an error occurs.private void _saxResultSet(ContentHandler contentHandler, Content content, CompositeMetadata metadata, ContentResultSetHelper.SearchResultFieldSet resultSetElement, MetadataDefinition parentMetadataDef, Locale defaultLocale, String prefix, boolean checkRead) throws AmetysRepositoryException, SAXException, IOException
protected void _saxMetadata(ContentHandler contentHandler, Content content, CompositeMetadata metadata, ContentResultSetHelper.SearchResultFieldSet resultSet, MetadataDefinition metadataDefinition, Locale defaultLocale, String prefix, boolean checkRead) throws AmetysRepositoryException, SAXException, IOException
contentHandler
- The content handler where to SAX into.content
- The contentmetadata
- The parent composite metadata.resultSet
- the set of remaining result fields to SAXmetadataDefinition
- The metadata definitiondefaultLocale
- The locale to use to sax localized values such as multilingual content or multilingual string. Only use if initial content's language is not null. Can be null.prefix
- the metadata path prefix.checkRead
- true if need to check read rightAmetysRepositoryException
- if an error occurredSAXException
- if an error occurred while SAXingIOException
- if an error occurredprotected void _saxCompositeMetadata(ContentHandler contentHandler, Content content, CompositeMetadata metadata, MetadataDefinition metadataDefinition, String metadataName, ContentResultSetHelper.SearchResultFieldSet resultSet, Locale defaultLocale, String prefix, boolean checkRead) throws SAXException, IOException
contentHandler
- the content handler to SAX into.content
- the content.metadata
- the parent metadata holder.metadataDefinition
- the metadata definition.metadataName
- The name of the metadata to saxresultSet
- the set of result fields to SAX for this compositedefaultLocale
- The locale to use to sax localized values such as multilingual content or multilingual string. Only use if initial content's language is not null. Can be null.prefix
- the metadata path prefix.checkRead
- true if need to check read right.SAXException
- if an error occurs.IOException
- if an error occurs.protected void _saxContentReferenceMetadata(ContentHandler contentHandler, Content content, CompositeMetadata metadatas, MetadataDefinition metadataDefinition, String metadataName, ContentResultSetHelper.SearchResultFieldSet resultSet, Locale defaultLocale, String prefix, boolean checkRead) throws SAXException, IOException
contentHandler
- the content handler to SAX into.content
- The currently saxed content.metadatas
- the parent composite metadata.metadataDefinition
- the metadata definition.metadataName
- the metadata name.resultSet
- the set of result fields to SAX for the referenced contentsdefaultLocale
- The locale to use to resolve localized values of referenced content. Only use if initial content's language is not null.prefix
- the metadata path prefix.checkRead
- true if need to check read right.SAXException
- if an error occurs.IOException
- if an error occurs.protected void _saxContent(ContentHandler contentHandler, Content content, Locale defaultLocale, String metadataName, ContentResultSetHelper.SearchResultFieldSet resultSet, String prefix, boolean checkRead) throws SAXException, IOException
contentHandler
- the content handler to SAX into.content
- The referenced or sub-content to SAX.defaultLocale
- The locale to use to sax the referenced content's localized values. Only use if initial content 's language is null.metadataName
- the metadata name.resultSet
- the set of result fields to SAX for this contentprefix
- the metadata path prefix.checkRead
- true if need to check read right.SAXException
- if an error occurs.IOException
- if an error occurs.public void saxSystemProperty(ContentHandler contentHandler, String systemPropertyId, Content content) throws SAXException
contentHandler
- the content handler to SAX into.systemPropertyId
- The id of system propertycontent
- The contentSAXException
- if an error occurs.public ContentResultSetHelper.SearchResultFieldSet buildResultSet(Collection<? extends ResultField> fields, Content content)
fields
- The result fieldscontent
- The result contentprivate MetadataDefinition _getMetadataDefinition(String metadataName, MetadataDefinition parentMetadataDef, Content content)