public abstract class AbstractIOResourceAdapter extends Object implements IOResourceAdapter
IOResourceAdapter
.
Offers helper methods for properties.
Modifier and Type | Field and Description |
---|---|
protected Map<String,Serializable> |
properties |
Modifier | Constructor and Description |
---|---|
protected |
AbstractIOResourceAdapter() |
Modifier and Type | Method and Description |
---|---|
abstract IOResources |
extractResources(String repo,
Collection<DocumentRef> sources)
Extracts resources for given document locations.
|
protected boolean |
getBooleanProperty(String propName) |
Map<String,Serializable> |
getProperties()
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.
|
protected Map<String,Serializable> properties
protected AbstractIOResourceAdapter()
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
protected boolean getBooleanProperty(String propName)
protected void setBooleanProperty(String propName, Serializable propValue)
protected String getStringProperty(String propName)
protected void setStringProperty(String propName, Serializable propValue)
protected String[] getStringArrayProperty(String propName)
protected void setStringArrayProperty(String propName, Serializable propValue)
Copyright © 2018 Nuxeo. All rights reserved.