Class RestrictReplacingEntitiesFromOtherBuInterceptorContribution
java.lang.Object
ch.tocco.nice2.businessunit.impl.intercept.RestrictReplacingEntitiesFromOtherBuInterceptorContribution
- All Implemented Interfaces:
EntityInterceptorContribution
@Component
public class RestrictReplacingEntitiesFromOtherBuInterceptorContribution
extends Object
implements EntityInterceptorContribution
Throw an exception if for a relation, new entities are set (not added) and entities from another business unit are replaced.
This should not be allowed except if you are in the null business unit. In the admin the old value is not shown
(just an empty dropdown). This interceptor should avoid replacing entities by accident.
If there is an issue just disable the interceptor. We should then discuss if we should adjust or remove this interceptor.
-
Constructor Summary
ConstructorsConstructorDescriptionRestrictReplacingEntitiesFromOtherBuInterceptorContribution
(SecurityManager securityManager, BusinessUnitManager businessUnitManager) -
Method Summary
-
Constructor Details
-
RestrictReplacingEntitiesFromOtherBuInterceptorContribution
public RestrictReplacingEntitiesFromOtherBuInterceptorContribution(SecurityManager securityManager, BusinessUnitManager businessUnitManager)
-
-
Method Details
-
createInstance
- Specified by:
createInstance
in interfaceEntityInterceptorContribution
- Parameters:
entity
- the entitynext
- the next interceptor in the chain- Returns:
- the contributed interceptor
-