Class ResourcesAdditionalDataGetter
- java.lang.Object
-
- org.ametys.plugins.contentio.archive.ResourcesAdditionalDataGetter
-
- All Implemented Interfaces:
XMLValuesExtractorAdditionalDataGetter
public class ResourcesAdditionalDataGetter extends Object implements XMLValuesExtractorAdditionalDataGetter
Retrieves the additional data of resources types (files, binaries, rich texts)
-
-
Field Summary
Fields Modifier and Type Field Description private Path
_archivePath
private Path
_path
-
Constructor Summary
Constructors Constructor Description ResourcesAdditionalDataGetter(Path archivePath, Path path)
Creates an additional data getter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Optional<Object>
_getExtractorAdditionalData(String dataPath, ElementType type)
private Map<String,InputStream>
_getFileAdditionalData(String folderName, String dataPath)
private Map<String,InputStream>
_getFileNameAndInputStream(String folderPath)
Optional<Object>
getAdditionalData(String dataPath, ElementType type)
Retrieves the additional data needed to extract the value at the given path
-
-
-
Field Detail
-
_archivePath
private final Path _archivePath
-
-
Constructor Detail
-
ResourcesAdditionalDataGetter
public ResourcesAdditionalDataGetter(Path archivePath, Path path)
Creates an additional data getter- Parameters:
archivePath
- The path to the zip archivepath
- The path to the object being imported
-
-
Method Detail
-
getAdditionalData
public Optional<Object> getAdditionalData(String dataPath, ElementType type)
Description copied from interface:XMLValuesExtractorAdditionalDataGetter
Retrieves the additional data needed to extract the value at the given path- Specified by:
getAdditionalData
in interfaceXMLValuesExtractorAdditionalDataGetter
- Parameters:
dataPath
- the data pathtype
- the type of the data at the given path- Returns:
- the additional data
-
_getExtractorAdditionalData
private Optional<Object> _getExtractorAdditionalData(String dataPath, ElementType type) throws Exception
- Throws:
Exception
-
_getFileAdditionalData
private Map<String,InputStream> _getFileAdditionalData(String folderName, String dataPath) throws IOException
- Throws:
IOException
-
_getFileNameAndInputStream
private Map<String,InputStream> _getFileNameAndInputStream(String folderPath) throws IOException
- Throws:
IOException
-
-