Class MergeEntitiesServiceImpl

java.lang.Object
ch.tocco.nice2.entityoperation.impl.merge.MergeEntitiesServiceImpl
All Implemented Interfaces:
MergeEntitiesService

@Component public class MergeEntitiesServiceImpl extends Object implements MergeEntitiesService
  • Constructor Details

  • Method Details

    • getMergeConfig

      public EntityMergeConfig getMergeConfig(String modelName, List<String> entityKeys)
      Description copied from interface: MergeEntitiesService
      Compute which fields/relations are showed to the user
      Specified by:
      getMergeConfig in interface MergeEntitiesService
      Parameters:
      modelName - model name of the entities
      entityKeys - 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 interface MergeEntitiesService
      Parameters:
      modelName - model name of the target/source entities
      targetEntityKey - key of the target entity
      sourceEntityKeys - list of keys of the source entities
      updatedPaths - map of paths which are merged
      mergeRelations - relations where are related entities are copied to the target entity
      Returns:
      summary of the merge process (e.g. permission related issue)
    • setSourceEntityStrategies

      @Autowired public void setSourceEntityStrategies(List<SourceEntityStrategy> sourceEntityStrategies)
    • setRelationMergeHandlers

      @Autowired public void setRelationMergeHandlers(List<RelationMergeHandler> relationMergeHandlers)
    • setExcludedRelations

      @Autowired(required=false) public void setExcludedRelations(List<ExcludedRelationContribution> entityMergeRelationContributions)