Class PropertiesMappingComponent
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.ecm.core.api.propertiesmapping.impl.PropertiesMappingComponent
- All Implemented Interfaces:
PropertiesMappingService
,Adaptable
,Component
,Extensible
,TimestampedService
public class PropertiesMappingComponent
extends DefaultComponent
implements PropertiesMappingService
Service that allows to copy a set of metadata from a source to a target document
- Since:
- 5.6
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected PropertiesMappingContributionRegistry
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
compatibleTypes
(Type targetType, Type sourceType) getMapping
(String mappingName) Gets a map of xpaths defining properties on the target and source documentsvoid
mapProperties
(CoreSession session, DocumentModel sourceDoc, DocumentModel targetDoc, String mapping) Copies the properties defined by the given xpaths in the mapping from the target to the source document.void
registerContribution
(Object contribution, String extensionPoint, ComponentInstance contributor) Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterContribution, unregisterExtension
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
MAPPING_EP
- See Also:
-
mappingsRegistry
-
-
Constructor Details
-
PropertiesMappingComponent
public PropertiesMappingComponent()
-
-
Method Details
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
registerContribution
in classDefaultComponent
-
getMapping
Description copied from interface:PropertiesMappingService
Gets a map of xpaths defining properties on the target and source documents- Specified by:
getMapping
in interfacePropertiesMappingService
-
mapProperties
public void mapProperties(CoreSession session, DocumentModel sourceDoc, DocumentModel targetDoc, String mapping) Description copied from interface:PropertiesMappingService
Copies the properties defined by the given xpaths in the mapping from the target to the source document. Assumes that the xpaths are valid.- Specified by:
mapProperties
in interfacePropertiesMappingService
-
compatibleTypes
-