Class MergeEntitiesServiceImpl
java.lang.Object
ch.tocco.nice2.entityoperation.impl.merge.MergeEntitiesServiceImpl
- All Implemented Interfaces:
MergeEntitiesService
-
Constructor Summary
ConstructorDescriptionMergeEntitiesServiceImpl
(EntityMergeModelService entityMergeModelService, Context context, PersistenceService persistenceService, SecurityManager securityManager, BusinessUnitManager businessUnitManager, TextResources textResources) -
Method Summary
Modifier and TypeMethodDescriptiongetMergeConfig
(String modelName, List<String> entityKeys) Compute which fields/relations are showed to the usermerge
(String modelName, String targetEntityKey, List<String> sourceEntityKeys, Map<String, ?> updatedPaths, List<MergeRelationBean> mergeRelations) Processes the merging of source entities into a target entityvoid
setExcludedRelations
(List<ExcludedRelationContribution> entityMergeRelationContributions) void
setRelationMergeHandlers
(List<RelationMergeHandler> relationMergeHandlers) void
setSourceEntityStrategies
(List<SourceEntityStrategy> sourceEntityStrategies)
-
Constructor Details
-
MergeEntitiesServiceImpl
public MergeEntitiesServiceImpl(EntityMergeModelService entityMergeModelService, Context context, PersistenceService persistenceService, SecurityManager securityManager, BusinessUnitManager businessUnitManager, TextResources textResources)
-
-
Method Details
-
getMergeConfig
Description copied from interface:MergeEntitiesService
Compute which fields/relations are showed to the user- Specified by:
getMergeConfig
in interfaceMergeEntitiesService
- Parameters:
modelName
- model name of the entitiesentityKeys
- list of entity keys which should be merged- Returns:
- a configuration object of showed fields and relations
-
merge
public EntityMergeResult merge(String modelName, String targetEntityKey, List<String> sourceEntityKeys, Map<String, ?> updatedPaths, List<MergeRelationBean> mergeRelations) Description copied from interface:MergeEntitiesService
Processes the merging of source entities into a target entity- Specified by:
merge
in interfaceMergeEntitiesService
- Parameters:
modelName
- model name of the target/source entitiestargetEntityKey
- key of the target entitysourceEntityKeys
- list of keys of the source entitiesupdatedPaths
- map of paths which are mergedmergeRelations
- relations where are related entities are copied to the target entity- Returns:
- summary of the merge process (e.g. permission related issue)
-
setSourceEntityStrategies
-
setRelationMergeHandlers
-
setExcludedRelations
@Autowired(required=false) public void setExcludedRelations(List<ExcludedRelationContribution> entityMergeRelationContributions)
-