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
FieldsFields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancompatibleTypes(Type targetType, Type sourceType) getMapping(String mappingName) Gets a map of xpaths defining properties on the target and source documentsvoidmapProperties(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.Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerContribution, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterContribution, unregisterExtensionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
MAPPING_EP
- See Also:
-
-
Constructor Details
-
PropertiesMappingComponent
public PropertiesMappingComponent()
-
-
Method Details
-
getMapping
Description copied from interface:PropertiesMappingServiceGets a map of xpaths defining properties on the target and source documents- Specified by:
getMappingin interfacePropertiesMappingService
-
mapProperties
public void mapProperties(CoreSession session, DocumentModel sourceDoc, DocumentModel targetDoc, String mapping) Description copied from interface:PropertiesMappingServiceCopies 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:
mapPropertiesin interfacePropertiesMappingService
-
compatibleTypes
-