Package org.nuxeo.ecm.platform.io.api
Interface IOResourceAdapter
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractIOResourceAdapter
,IOAuditAdapter
,IORelationAdapter
Resource adapter holding the import/export for document associated resources.
- Author:
- Anahide Tchertchian
-
Method Summary
Modifier and TypeMethodDescriptionextractResources
(String repo, Collection<DocumentRef> sources) Extracts resources for given document locations.Returns properties.void
getResourcesAsXML
(OutputStream out, IOResources newResources) Export resources as XML.loadResourcesFromXML
(InputStream stream) Returns resources built from given stream.void
setProperties
(Map<String, Serializable> properties) Set properties.void
storeResources
(IOResources newResources) Persists resources.translateResources
(String repo, IOResources resources, DocumentTranslationMap map) Returns translated resources once copy has been done, passing a correspondence map.
-
Method Details
-
getProperties
Map<String,Serializable> getProperties()Returns properties. -
setProperties
Set properties. -
extractResources
Extracts resources for given document locations.- Parameters:
repo
- TODOsources
- locations of documents to consider. Has to include documents children if needed.- Returns:
- a structure holding associated resources.
-
translateResources
Returns translated resources once copy has been done, passing a correspondence map.- Parameters:
repo
- target repository for resources.resources
- resources previously extracted thanks toextractResources(String, Collection)
map
- correspondence map between old locations and new ones.- Returns:
- translated resources.
-
storeResources
Persists resources.- Parameters:
newResources
- resources previously extracted thanks toextractResources(String, Collection)
ortranslateResources(String, IOResources, DocumentTranslationMap)
-
getResourcesAsXML
Export resources as XML.- Parameters:
out
- stream where export will be written.newResources
- resources previously extracted thanks toextractResources(String, Collection)
ortranslateResources(String, IOResources, DocumentTranslationMap)
-
loadResourcesFromXML
Returns resources built from given stream.
-