Package org.ametys.plugins.frontedition
Class FileMetadataManager
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.plugins.repository.metadata.MetadataSaxer
-
- org.ametys.cms.contenttype.MetadataManager
-
- org.ametys.plugins.frontedition.FileMetadataManager
-
- All Implemented Interfaces:
Component
,Contextualizable
,LogEnabled
,Serviceable
public class FileMetadataManager extends MetadataManager
Override of MetadataManager, just for front-edition, to get metadata as json for files.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ametys.cms.contenttype.MetadataManager
MetadataManager.RepeaterEntryComparator
-
-
Field Summary
Fields Modifier and Type Field Description static String
ROLE
Avalon ROLE.-
Fields inherited from class org.ametys.cms.contenttype.MetadataManager
_contentTypeExtensionPoint, _contentTypesHelper, _externalizableMetadataProviderEP, REPEATER_ENTRY_COMPARATOR
-
Fields inherited from class org.ametys.plugins.repository.metadata.MetadataSaxer
_context, _jsonUtils, _resolver, _userManager
-
-
Constructor Summary
Constructors Constructor Description FileMetadataManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
readBinaryMetadata(Content content, BinaryMetadata binaryMetadata, String metadataPath)
Get the JSON representation of aBinaryMetadata
Map<String,Object>
readResource(Resource resource)
Get the JSON representation of aResource
-
Methods inherited from class org.ametys.cms.contenttype.MetadataManager
_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, service
-
Methods inherited from class org.ametys.plugins.repository.metadata.MetadataSaxer
_binaryAsJson, _getRefAmetysObjectIds, _saxAllMetadata, _saxBinaryMetadata, _saxDateMetadata, _saxEnumeratedStringMetadata, _saxMetadata, _saxMultilingualStringMetadata, _saxMultipleUserMetadataAsJson, _saxObject, _saxRichTextMetadata, _saxSingleUserMetadataAsJson, _saxStringMetadata, _saxUserMetadata, _userAsJson, contextualize, saxMetadata, saxMetadata
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Constructor Detail
-
FileMetadataManager
public FileMetadataManager()
-
-
Method Detail
-
readResource
public Map<String,Object> readResource(Resource resource)
Get the JSON representation of aResource
- Parameters:
resource
- The resource- Returns:
- The resource as JSON
-
readBinaryMetadata
public Map<String,Object> readBinaryMetadata(Content content, BinaryMetadata binaryMetadata, String metadataPath)
Get the JSON representation of aBinaryMetadata
- Parameters:
content
- The content holding the binary metadatabinaryMetadata
- The resourcemetadataPath
- The path to the metadata- Returns:
- The binary as JSON
-
-