Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.io.api
Class AbstractIOResourceAdapter

java.lang.Object
  extended by org.nuxeo.ecm.platform.io.api.AbstractIOResourceAdapter
All Implemented Interfaces:
java.io.Serializable, IOResourceAdapter
Direct Known Subclasses:
IOAuditAdapter, IORelationAdapter

public abstract class AbstractIOResourceAdapter
extends java.lang.Object
implements IOResourceAdapter

Abstract implementation for IOResourceAdapter.

Offers helper methods for properties.

Author:
Anahide Tchertchian
See Also:
Serialized Form

Method Summary
abstract  IOResources extractResources(java.lang.String repo, java.util.Collection<DocumentRef> sources)
          Extracts resources for given document locations.
 java.util.Map<java.lang.String,java.io.Serializable> getProperties()
          Returns properties.
abstract  void getResourcesAsXML(java.io.OutputStream out, IOResources newResources)
          Export resources as XML.
abstract  IOResources loadResourcesFromXML(java.io.InputStream stream)
          Returns resources built from given stream.
 void setProperties(java.util.Map<java.lang.String,java.io.Serializable> properties)
          Set properties.
abstract  void storeResources(IOResources newResources)
          Persists resources.
abstract  IOResources translateResources(java.lang.String repo, IOResources resources, DocumentTranslationMap map)
          Returns translated resources once copy has been done, passing a correspondence map.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getProperties

public java.util.Map<java.lang.String,java.io.Serializable> getProperties()
Description copied from interface: IOResourceAdapter
Returns properties.

Specified by:
getProperties in interface IOResourceAdapter

setProperties

public void setProperties(java.util.Map<java.lang.String,java.io.Serializable> properties)
Description copied from interface: IOResourceAdapter
Set properties.

Specified by:
setProperties in interface IOResourceAdapter

extractResources

public abstract IOResources extractResources(java.lang.String repo,
                                             java.util.Collection<DocumentRef> sources)
Description copied from interface: IOResourceAdapter
Extracts resources for given document locations.

Specified by:
extractResources in interface IOResourceAdapter
Parameters:
repo - TODO
sources - locations of documents to consider. Has to include documents children if needed.
Returns:
a structure holding associated resources.

translateResources

public abstract IOResources translateResources(java.lang.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 interface IOResourceAdapter
Parameters:
repo - target repository for resources.
resources - resources previously extracted thanks to IOResourceAdapter.extractResources(String, Collection)
map - correspondence map between old locations and new ones.
Returns:
translated resources.

storeResources

public abstract void storeResources(IOResources newResources)
Description copied from interface: IOResourceAdapter
Persists resources.

Specified by:
storeResources in interface IOResourceAdapter
Parameters:
newResources - resources previously extracted thanks to IOResourceAdapter.extractResources(String, Collection) or IOResourceAdapter.translateResources(String, IOResources, DocumentTranslationMap)

getResourcesAsXML

public abstract void getResourcesAsXML(java.io.OutputStream out,
                                       IOResources newResources)
Description copied from interface: IOResourceAdapter
Export resources as XML.

Specified by:
getResourcesAsXML in interface IOResourceAdapter
newResources - resources previously extracted thanks to IOResourceAdapter.extractResources(String, Collection) or IOResourceAdapter.translateResources(String, IOResources, DocumentTranslationMap)

loadResourcesFromXML

public abstract IOResources loadResourcesFromXML(java.io.InputStream stream)
Description copied from interface: IOResourceAdapter
Returns resources built from given stream.

Specified by:
loadResourcesFromXML in interface IOResourceAdapter

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.