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
ConstructorDescriptionHierarchyStrategyHandler
(BusinessUnitManager businessUnitManager, TypeManager typeManager, PersistenceService persistService) -
Method Summary
Modifier and TypeMethodDescriptionprotected @Nullable Node
getCondition
(HierarchySpecification specification, Entity businessUnit) Override this method if a condition should be added to the rule.void
handleReadAccess
(PolicyBuilder policyBuilder, HierarchySpecification specification, BusinessUnit currentBusinessUnit) Modify or replace or addrules
to to achieve the desired behaviour for this read access strategy.void
handleWriteAccess
(PolicyBuilder policyBuilder, HierarchySpecification specification, BusinessUnit currentBusinessUnit) Modify or replace or addrules
to to achieve the desired behaviour for this write access strategy.boolean
supports
(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
HierarchyStrategy
supports the givenHierarchyStrategyType
.
-
handleReadAccess
public void handleReadAccess(PolicyBuilder policyBuilder, HierarchySpecification specification, BusinessUnit currentBusinessUnit) Description copied from interface:HierarchyStrategy
Modify or replace or addrules
to to achieve the desired behaviour for this read access strategy. -
handleWriteAccess
public void handleWriteAccess(PolicyBuilder policyBuilder, HierarchySpecification specification, BusinessUnit currentBusinessUnit) Description copied from interface:HierarchyStrategy
Modify or replace or addrules
to to achieve the desired behaviour for this write access strategy. -
getCondition
@Nullable protected @Nullable Node getCondition(HierarchySpecification specification, Entity businessUnit) Description copied from class:AbstractStrategyHandler
Override this method if a condition should be added to the rule.- Overrides:
getCondition
in classAbstractStrategyHandler
-