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()
IOResourceAdaptergetProperties in interface IOResourceAdapterpublic void setProperties(Map<String,Serializable> properties)
IOResourceAdaptersetProperties in interface IOResourceAdapterpublic abstract IOResources extractResources(String repo, Collection<DocumentRef> sources)
IOResourceAdapterextractResources in interface IOResourceAdapterrepo - TODOsources - locations of documents to consider. Has to include documents children if needed.public abstract IOResources translateResources(String repo, IOResources resources, DocumentTranslationMap map)
IOResourceAdaptertranslateResources in interface IOResourceAdapterrepo - 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)
IOResourceAdapterstoreResources in interface IOResourceAdapternewResources - resources previously extracted thanks to
            IOResourceAdapter.extractResources(String, Collection) or
            IOResourceAdapter.translateResources(String, IOResources, DocumentTranslationMap)public abstract void getResourcesAsXML(OutputStream out, IOResources newResources)
IOResourceAdaptergetResourcesAsXML in interface IOResourceAdapterout - 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)
IOResourceAdapterloadResourcesFromXML in interface IOResourceAdapterprotected 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 © 2019 Nuxeo. All rights reserved.