Package org.nuxeo.ecm.platform.io.api
Class AbstractIOResourceAdapter
java.lang.Object
org.nuxeo.ecm.platform.io.api.AbstractIOResourceAdapter
- All Implemented Interfaces:
Serializable
,IOResourceAdapter
- Direct Known Subclasses:
IOAuditAdapter
,IORelationAdapter
Abstract implementation for
IOResourceAdapter
.
Offers helper methods for properties.
- Author:
- Anahide Tchertchian
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract IOResources
extractResources
(String repo, Collection<DocumentRef> sources) Extracts resources for given document locations.protected boolean
getBooleanProperty
(String propName) Returns properties.abstract void
getResourcesAsXML
(OutputStream out, IOResources newResources) Export resources as XML.protected String[]
getStringArrayProperty
(String propName) protected String
getStringProperty
(String propName) abstract IOResources
loadResourcesFromXML
(InputStream stream) Returns resources built from given stream.protected void
setBooleanProperty
(String propName, Serializable propValue) void
setProperties
(Map<String, Serializable> properties) Set properties.protected void
setStringArrayProperty
(String propName, Serializable propValue) protected void
setStringProperty
(String propName, Serializable propValue) abstract void
storeResources
(IOResources newResources) Persists resources.abstract IOResources
translateResources
(String repo, IOResources resources, DocumentTranslationMap map) Returns translated resources once copy has been done, passing a correspondence map.
-
Field Details
-
properties
-
-
Constructor Details
-
AbstractIOResourceAdapter
protected AbstractIOResourceAdapter()
-
-
Method Details
-
getProperties
Description copied from interface:IOResourceAdapter
Returns properties.- Specified by:
getProperties
in interfaceIOResourceAdapter
-
setProperties
Description copied from interface:IOResourceAdapter
Set properties.- Specified by:
setProperties
in interfaceIOResourceAdapter
-
extractResources
Description copied from interface:IOResourceAdapter
Extracts resources for given document locations.- Specified by:
extractResources
in interfaceIOResourceAdapter
- Parameters:
repo
- TODOsources
- locations of documents to consider. Has to include documents children if needed.- Returns:
- a structure holding associated resources.
-
translateResources
public abstract IOResources translateResources(String repo, IOResources resources, DocumentTranslationMap map) Description copied from interface:IOResourceAdapter
Returns translated resources once copy has been done, passing a correspondence map.- Specified by:
translateResources
in interfaceIOResourceAdapter
- Parameters:
repo
- target repository for resources.resources
- resources previously extracted thanks toIOResourceAdapter.extractResources(String, Collection)
map
- correspondence map between old locations and new ones.- Returns:
- translated resources.
-
storeResources
Description copied from interface:IOResourceAdapter
Persists resources.- Specified by:
storeResources
in interfaceIOResourceAdapter
- Parameters:
newResources
- resources previously extracted thanks toIOResourceAdapter.extractResources(String, Collection)
orIOResourceAdapter.translateResources(String, IOResources, DocumentTranslationMap)
-
getResourcesAsXML
Description copied from interface:IOResourceAdapter
Export resources as XML.- Specified by:
getResourcesAsXML
in interfaceIOResourceAdapter
- Parameters:
out
- stream where export will be written.newResources
- resources previously extracted thanks toIOResourceAdapter.extractResources(String, Collection)
orIOResourceAdapter.translateResources(String, IOResources, DocumentTranslationMap)
-
loadResourcesFromXML
Description copied from interface:IOResourceAdapter
Returns resources built from given stream.- Specified by:
loadResourcesFromXML
in interfaceIOResourceAdapter
-
getBooleanProperty
-
setBooleanProperty
-
getStringProperty
-
setStringProperty
-
getStringArrayProperty
-
setStringArrayProperty
-