Class SelfStrategyHandler
java.lang.Object
ch.tocco.nice2.businessunit.impl.hierarchy.AbstractStrategyHandler
ch.tocco.nice2.businessunit.impl.hierarchy.strategies.SelfStrategyHandler
- All Implemented Interfaces:
HierarchyStrategy
The strategy handler for the
HierarchyStrategyType.SELF
type. Gives write access only to entities within the
same business unit.-
Constructor Summary
ConstructorDescriptionSelfStrategyHandler
(BusinessUnitManager businessUnitManager, TypeManager typeManager) -
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
-
SelfStrategyHandler
-
-
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
-