Class MergeEntitiesDataServiceImpl
java.lang.Object
ch.tocco.nice2.actions.impl.merge.MergeEntitiesDataServiceImpl
- All Implemented Interfaces:
MergeEntitiesDataService
@Component
public class MergeEntitiesDataServiceImpl
extends Object
implements MergeEntitiesDataService
-
Constructor Summary
ConstructorDescriptionMergeEntitiesDataServiceImpl
(DataModel dataModel, SecurityManager securityManager, BusinessUnitManager businessUnitManager, PersistenceService persistenceService, RestSearchService restSearchService) -
Method Summary
Modifier and TypeMethodDescriptioncreateAllOrNothingRelationBeans
(EntityMergeConfig mergeConfig, SecurityContext securityContext) void
evaluateWritePermissions
(EntityMergeConfig mergeConfig, Collection<EntityBean> entities, SecurityContext securityContext) Write permission needs to checked separately, as we load the data in privileged mode and cannot use the _permissions flag of the rest search service.loadDataPrivileged
(EntityMergeConfig mergeConfig, jakarta.ws.rs.core.UriBuilder uriBuilder, SecurityContext securityContext) void
removeFieldsWithSameValues
(EntityMergeConfig mergeConfig, Collection<EntityBean> entities, SecurityContext securityContext) void
removeRelationsWithoutPermissions
(EntityMergeConfig mergeConfig, Collection<EntityBean> entities, SecurityContext securityContext) void
removeRelationsWithSameValues
(EntityMergeConfig mergeConfig, Collection<EntityBean> entities, SecurityContext securityContext)
-
Constructor Details
-
MergeEntitiesDataServiceImpl
public MergeEntitiesDataServiceImpl(DataModel dataModel, SecurityManager securityManager, BusinessUnitManager businessUnitManager, PersistenceService persistenceService, RestSearchService restSearchService)
-
-
Method Details
-
loadDataPrivileged
public Collection<EntityBean> loadDataPrivileged(EntityMergeConfig mergeConfig, jakarta.ws.rs.core.UriBuilder uriBuilder, SecurityContext securityContext) - Specified by:
loadDataPrivileged
in interfaceMergeEntitiesDataService
-
evaluateWritePermissions
public void evaluateWritePermissions(EntityMergeConfig mergeConfig, Collection<EntityBean> entities, SecurityContext securityContext) Write permission needs to checked separately, as we load the data in privileged mode and cannot use the _permissions flag of the rest search service.- Specified by:
evaluateWritePermissions
in interfaceMergeEntitiesDataService
-
removeFieldsWithSameValues
public void removeFieldsWithSameValues(EntityMergeConfig mergeConfig, Collection<EntityBean> entities, SecurityContext securityContext) - Specified by:
removeFieldsWithSameValues
in interfaceMergeEntitiesDataService
-
removeRelationsWithSameValues
public void removeRelationsWithSameValues(EntityMergeConfig mergeConfig, Collection<EntityBean> entities, SecurityContext securityContext) - Specified by:
removeRelationsWithSameValues
in interfaceMergeEntitiesDataService
-
removeRelationsWithoutPermissions
public void removeRelationsWithoutPermissions(EntityMergeConfig mergeConfig, Collection<EntityBean> entities, SecurityContext securityContext) - Specified by:
removeRelationsWithoutPermissions
in interfaceMergeEntitiesDataService
-
createAllOrNothingRelationBeans
public List<MergeSourceRelationBean> createAllOrNothingRelationBeans(EntityMergeConfig mergeConfig, SecurityContext securityContext) - Specified by:
createAllOrNothingRelationBeans
in interfaceMergeEntitiesDataService
-