public class ConditionServiceManagerImpl extends Object implements ConditionServiceManager
Constructor and Description |
---|
ConditionServiceManagerImpl() |
Modifier and Type | Method and Description |
---|---|
protected <T extends Condition> |
addConditionService(ConditionService<Condition> conditionService)
Called by the framework to add a ConditionService.
|
boolean |
evaluate(Condition condition,
org.eclipse.emf.ecore.EObject domainModel)
Evaluates the given condition using the provided domain model.
|
boolean |
evaluateChangedValues(Condition condition,
org.eclipse.emf.ecore.EObject domainModel,
Map<org.eclipse.emf.ecore.EStructuralFeature.Setting,Object> possibleNewValues)
Evaluates whether the given condition using the provided domain model will change if a specific setting will be
set to a specific value.
|
Set<UniqueSetting> |
getConditionSettings(Condition condition,
org.eclipse.emf.ecore.EObject domainModel)
Returns the conditionSetting for a condition and the corresponding domain model.
|
Set<VDomainModelReference> |
getDomainModelReferences(Condition condition)
The Set of DomainModelReferences this condition needs to evaluate.
|
protected void |
removeConditionService(ConditionService<Condition> conditionService)
Called by the framework to remove a ConditionService.
|
protected <T extends Condition> void addConditionService(ConditionService<Condition> conditionService)
T
- The type of the added ConditionServiceconditionService
- The ConditionService to addprotected void removeConditionService(ConditionService<Condition> conditionService)
conditionService
- The ConditionService to removepublic Set<UniqueSetting> getConditionSettings(Condition condition, org.eclipse.emf.ecore.EObject domainModel)
getConditionSettings
in interface ConditionServiceManager
condition
- The condition to get the settings fordomainModel
- The domain model this condition applies toConditionServiceManager.getConditionSettings(org.eclipse.emf.ecp.view.spi.rule.model.Condition,
org.eclipse.emf.ecore.EObject)
public boolean evaluate(Condition condition, org.eclipse.emf.ecore.EObject domainModel)
evaluate
in interface ConditionServiceManager
condition
- The condition to evaluate.domainModel
- The root domain object of this condition.true
, if the condition matches, false
otherwiseConditionServiceManager.evaluate(org.eclipse.emf.ecp.view.spi.rule.model.Condition,
org.eclipse.emf.ecore.EObject)
public boolean evaluateChangedValues(Condition condition, org.eclipse.emf.ecore.EObject domainModel, Map<org.eclipse.emf.ecore.EStructuralFeature.Setting,Object> possibleNewValues)
evaluateChangedValues
in interface ConditionServiceManager
condition
- The condition to evaluate.domainModel
- The root domain object of this condition.possibleNewValues
- the new value that should be compared against the expected value of the conditiontrue
, if the condition matches, false
otherwiseConditionServiceManager.evaluateChangedValues(org.eclipse.emf.ecp.view.spi.rule.model.Condition,
org.eclipse.emf.ecore.EObject, java.util.Map)
public Set<VDomainModelReference> getDomainModelReferences(Condition condition)
getDomainModelReferences
in interface ConditionServiceManager
condition
- The condition to retrieve the VDomainModelReferences forConditionServiceManager.getDomainModelReferences(org.eclipse.emf.ecp.view.spi.rule.model.Condition)
Copyright © 2016. All rights reserved.