public abstract class AbstractIOResourceAdapter extends Object implements IOResourceAdapter
IOResourceAdapter
.
Offers helper methods for properties.
Modifier and Type | Method and Description |
---|---|
abstract IOResources |
extractResources(String repo,
Collection<DocumentRef> sources)
Extracts resources for given document locations.
|
Map<String,Serializable> |
getProperties()
Returns properties.
|
abstract void |
getResourcesAsXML(OutputStream out,
IOResources newResources)
Export resources as XML.
|
abstract IOResources |
loadResourcesFromXML(InputStream stream)
Returns resources built from given stream.
|
void |
setProperties(Map<String,Serializable> properties)
Set properties.
|
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.
|
public Map<String,Serializable> getProperties()
IOResourceAdapter
getProperties
in interface IOResourceAdapter
public void setProperties(Map<String,Serializable> properties)
IOResourceAdapter
setProperties
in interface IOResourceAdapter
public abstract IOResources extractResources(String repo, Collection<DocumentRef> sources)
IOResourceAdapter
extractResources
in interface IOResourceAdapter
repo
- TODOsources
- locations of documents to consider. Has to include documents children if needed.public abstract IOResources translateResources(String repo, IOResources resources, DocumentTranslationMap map)
IOResourceAdapter
translateResources
in interface IOResourceAdapter
repo
- target repository for resources.resources
- resources previously extracted thanks to
IOResourceAdapter.extractResources(String, Collection)
map
- correspondence map between old locations and new ones.public abstract void storeResources(IOResources newResources)
IOResourceAdapter
storeResources
in interface IOResourceAdapter
newResources
- resources previously extracted thanks to
IOResourceAdapter.extractResources(String, Collection)
or
IOResourceAdapter.translateResources(String, IOResources, DocumentTranslationMap)
public abstract void getResourcesAsXML(OutputStream out, IOResources newResources)
IOResourceAdapter
getResourcesAsXML
in interface IOResourceAdapter
out
- stream where export will be written.newResources
- resources previously extracted thanks to
IOResourceAdapter.extractResources(String, Collection)
or
IOResourceAdapter.translateResources(String, IOResources, DocumentTranslationMap)
public abstract IOResources loadResourcesFromXML(InputStream stream)
IOResourceAdapter
loadResourcesFromXML
in interface IOResourceAdapter
Copyright © 2015 Nuxeo SA. All rights reserved.