Class HierarchyStrategyHandler
java.lang.Object
ch.tocco.nice2.businessunit.impl.hierarchy.AbstractStrategyHandler
ch.tocco.nice2.businessunit.impl.hierarchy.strategies.HierarchyStrategyHandler
- All Implemented Interfaces:
HierarchyStrategy
The strategy handler for the
HierarchyStrategyType.HIERARCHICAL type. Gives write access to all entities in
the same business unit and all child business units.-
Constructor Summary
ConstructorsConstructorDescriptionHierarchyStrategyHandler(BusinessUnitManager businessUnitManager, TypeManager typeManager, PersistenceService persistService) -
Method Summary
Modifier and TypeMethodDescriptionprotected @Nullable NodegetCondition(HierarchySpecification specification, Entity businessUnit) Override this method if a condition should be added to the rule.voidhandleDeleteAccess(PolicyBuilder policyBuilder, HierarchySpecification specification, BusinessUnit currentBusinessUnit) Modify or replace or addrulesto achieve the desired behaviour for this delete access strategy.voidhandleReadAccess(PolicyBuilder policyBuilder, HierarchySpecification specification, BusinessUnit currentBusinessUnit) Modify or replace or addrulesto achieve the desired behaviour for this read access strategy.voidhandleWriteAccess(PolicyBuilder policyBuilder, HierarchySpecification specification, BusinessUnit currentBusinessUnit) Modify or replace or addrulesto achieve the desired behaviour for this write access strategy.booleansupports(HierarchyStrategyType strategyType) Methods inherited from class ch.tocco.nice2.businessunit.impl.hierarchy.AbstractStrategyHandler
handleAccess
-
Constructor Details
-
HierarchyStrategyHandler
public HierarchyStrategyHandler(@Lazy BusinessUnitManager businessUnitManager, TypeManager typeManager, PersistenceService persistService)
-
-
Method Details
-
supports
- Returns:
- `true` if this
HierarchyStrategysupports the givenHierarchyStrategyType.
-
handleReadAccess
public void handleReadAccess(PolicyBuilder policyBuilder, HierarchySpecification specification, BusinessUnit currentBusinessUnit) Description copied from interface:HierarchyStrategyModify or replace or addrulesto achieve the desired behaviour for this read access strategy. -
handleWriteAccess
public void handleWriteAccess(PolicyBuilder policyBuilder, HierarchySpecification specification, BusinessUnit currentBusinessUnit) Description copied from interface:HierarchyStrategyModify or replace or addrulesto achieve the desired behaviour for this write access strategy. -
handleDeleteAccess
public void handleDeleteAccess(PolicyBuilder policyBuilder, HierarchySpecification specification, BusinessUnit currentBusinessUnit) Description copied from interface:HierarchyStrategyModify or replace or addrulesto achieve the desired behaviour for this delete access strategy. -
getCondition
@Nullable protected @Nullable Node getCondition(HierarchySpecification specification, Entity businessUnit) Description copied from class:AbstractStrategyHandlerOverride this method if a condition should be added to the rule.- Overrides:
getConditionin classAbstractStrategyHandler
-