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
Fields Modifier and Type Field Description static Loglogstatic StringMAPPING_EPprotected PropertiesMappingContributionRegistrymappingsRegistry-
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
-
Constructor Summary
Constructors Constructor Description PropertiesMappingComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancompatibleTypes(Type targetType, Type sourceType)Map<String,String>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.voidregisterContribution(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
applicationStarted, getApplicationStartedOrder
-
-
-
-
Field Detail
-
log
public static final Log log
-
MAPPING_EP
public static final String MAPPING_EP
- See Also:
- Constant Field Values
-
mappingsRegistry
protected PropertiesMappingContributionRegistry mappingsRegistry
-
-
Method Detail
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
- Overrides:
registerContributionin classDefaultComponent
-
getMapping
public Map<String,String> getMapping(String mappingName)
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
-
-