Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.io.api
Interface IOResourceAdapter

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractIOResourceAdapter, IOAuditAdapter, IORelationAdapter

public interface IOResourceAdapter
extends Serializable

Resource adapter holding the import/export for document associated resources.

Author:
Anahide Tchertchian

Method Summary
 IOResources extractResources(String repo, Collection<DocumentRef> sources)
          Extracts resources for given document locations.
 Map<String,Serializable> getProperties()
          Returns properties.
 void getResourcesAsXML(OutputStream out, IOResources newResources)
          Export resources as XML.
 IOResources loadResourcesFromXML(InputStream stream)
          Returns resources built from given stream.
 void setProperties(Map<String,Serializable> properties)
          Set properties.
 void storeResources(IOResources newResources)
          Persists resources.
 IOResources translateResources(String repo, IOResources resources, DocumentTranslationMap map)
          Returns translated resources once copy has been done, passing a correspondence map.
 

Method Detail

getProperties

Map<String,Serializable> getProperties()
Returns properties.


setProperties

void setProperties(Map<String,Serializable> properties)
Set properties.


extractResources

IOResources extractResources(String repo,
                             Collection<DocumentRef> sources)
Extracts resources for given document locations.

Parameters:
repo - TODO
sources - locations of documents to consider. Has to include documents children if needed.
Returns:
a structure holding associated resources.

translateResources

IOResources translateResources(String repo,
                               IOResources resources,
                               DocumentTranslationMap map)
Returns translated resources once copy has been done, passing a correspondence map.

Parameters:
repo - target repository for resources.
resources - resources previously extracted thanks to extractResources(String, Collection)
map - correspondence map between old locations and new ones.
Returns:
translated resources.

storeResources

void storeResources(IOResources newResources)
Persists resources.

Parameters:
newResources - resources previously extracted thanks to extractResources(String, Collection) or translateResources(String, IOResources, DocumentTranslationMap)

getResourcesAsXML

void getResourcesAsXML(OutputStream out,
                       IOResources newResources)
Export resources as XML.

Parameters:
out - stream where export will be written.
newResources - resources previously extracted thanks to extractResources(String, Collection) or translateResources(String, IOResources, DocumentTranslationMap)

loadResourcesFromXML

IOResources loadResourcesFromXML(InputStream stream)
Returns resources built from given stream.


Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.