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
ConstructorsConstructorDescriptionSelfStrategyHandler(BusinessUnitManager businessUnitManager, TypeManager typeManager) -
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
-
SelfStrategyHandler
-
-
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
-