Package org.nuxeo.ecm.platform.audit.io
Class IOAuditAdapter
java.lang.Object
org.nuxeo.ecm.platform.io.api.AbstractIOResourceAdapter
org.nuxeo.ecm.platform.audit.io.IOAuditAdapter
- All Implemented Interfaces:
Serializable
,IOResourceAdapter
Adapter for import/export of audit logs.
- Author:
- Dragos Mihalache
- See Also:
-
Field Summary
Fields inherited from class org.nuxeo.ecm.platform.io.api.AbstractIOResourceAdapter
properties
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionextractResources
(String repo, Collection<DocumentRef> sources) Extract logs involving given documents.protected IOLogEntryBase
Should be overridden if IOLogEntryBase is subclassed.void
getResourcesAsXML
(OutputStream out, IOResources resources) Export resources as XML.loadResourcesFromXML
(InputStream stream) Returns resources built from given stream.void
setProperties
(Map<String, Serializable> properties) Set properties.void
storeResources
(IOResources newResources) Persists resources.translateResources
(String repo, IOResources resources, DocumentTranslationMap map) Returns translated resources once copy has been done, passing a correspondence map.Methods inherited from class org.nuxeo.ecm.platform.io.api.AbstractIOResourceAdapter
getBooleanProperty, getProperties, getStringArrayProperty, getStringProperty, setBooleanProperty, setStringArrayProperty, setStringProperty
-
Constructor Details
-
IOAuditAdapter
public IOAuditAdapter()
-
-
Method Details
-
getLogEntryHelper
Should be overridden if IOLogEntryBase is subclassed.- Returns:
- IOLogEntryBase instance that will know how to write and read log entries
-
setProperties
Description copied from interface:IOResourceAdapter
Set properties.- Specified by:
setProperties
in interfaceIOResourceAdapter
- Overrides:
setProperties
in classAbstractIOResourceAdapter
-
extractResources
Extract logs involving given documents.The adapter properties will filter which logs must be taken into account.
- Specified by:
extractResources
in interfaceIOResourceAdapter
- Specified by:
extractResources
in classAbstractIOResourceAdapter
- Parameters:
repo
- TODOsources
- locations of documents to consider. Has to include documents children if needed.- Returns:
- a structure holding associated resources.
-
getResourcesAsXML
Description copied from interface:IOResourceAdapter
Export resources as XML.- Specified by:
getResourcesAsXML
in interfaceIOResourceAdapter
- Specified by:
getResourcesAsXML
in classAbstractIOResourceAdapter
- Parameters:
out
- stream where export will be written.resources
- resources previously extracted thanks toIOResourceAdapter.extractResources(String, Collection)
orIOResourceAdapter.translateResources(String, IOResources, DocumentTranslationMap)
-
loadResourcesFromXML
Description copied from interface:IOResourceAdapter
Returns resources built from given stream.- Specified by:
loadResourcesFromXML
in interfaceIOResourceAdapter
- Specified by:
loadResourcesFromXML
in classAbstractIOResourceAdapter
-
storeResources
Description copied from interface:IOResourceAdapter
Persists resources.- Specified by:
storeResources
in interfaceIOResourceAdapter
- Specified by:
storeResources
in classAbstractIOResourceAdapter
- Parameters:
newResources
- resources previously extracted thanks toIOResourceAdapter.extractResources(String, Collection)
orIOResourceAdapter.translateResources(String, IOResources, DocumentTranslationMap)
-
translateResources
public IOResources translateResources(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 interfaceIOResourceAdapter
- Specified by:
translateResources
in classAbstractIOResourceAdapter
- Parameters:
repo
- target repository for resources.resources
- resources previously extracted thanks toIOResourceAdapter.extractResources(String, Collection)
map
- correspondence map between old locations and new ones.- Returns:
- translated resources.
-