Interface ConditionService<T extends Condition>
-
- Type Parameters:
T
- The type of the Condition this service applies to
- All Known Implementing Classes:
AndConditionService
,FalseConditionService
,IsProxyConditionService
,IterateConditionService
,LeafConditionService
,NotConditionService
,OrConditionService
,TrueConditionService
public interface ConditionService<T extends Condition>
TheConditionService
is used to retrieve the relevant information for conditions.- Since:
- 1.10
- Author:
- Eugen Neufeld
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
evaluate(T condition, org.eclipse.emf.ecore.EObject domainModel)
Evaluates the given condition.boolean
evaluateChangedValues(T condition, org.eclipse.emf.ecore.EObject domainModel, java.util.Map<org.eclipse.emf.ecore.EStructuralFeature.Setting,java.lang.Object> possibleNewValues)
Evaluates the given condition.java.util.Set<UniqueSetting>
getConditionSettings(T condition, org.eclipse.emf.ecore.EObject domainModel)
The set ofUniqueSetting
that are relevant for the provided condition and domain model.org.eclipse.emf.ecore.EClass
getConditionType()
The EClass this ConditionService is implemented for.java.util.Set<VDomainModelReference>
getDomainModelReferences(T condition)
The Set ofVDomainModelReference
that are relevant for the condition.
-
-
-
Method Detail
-
getConditionType
org.eclipse.emf.ecore.EClass getConditionType()
The EClass this ConditionService is implemented for.- Returns:
- The EClass of the
Condition
-
getConditionSettings
java.util.Set<UniqueSetting> getConditionSettings(T condition, org.eclipse.emf.ecore.EObject domainModel)
The set ofUniqueSetting
that are relevant for the provided condition and domain model.- Parameters:
condition
- TheCondition
to get the UniqueSettings fordomainModel
- TheEObject
to use for retrieving- Returns:
- The Set of UniqueSettings. This Set must not be null.
-
evaluate
boolean evaluate(T condition, org.eclipse.emf.ecore.EObject domainModel)
Evaluates the given condition.- Parameters:
condition
- The Condition to evaluatedomainModel
- The root domain object of this condition.- Returns:
true
, if the condition matches,false
otherwise
-
evaluateChangedValues
boolean evaluateChangedValues(T condition, org.eclipse.emf.ecore.EObject domainModel, java.util.Map<org.eclipse.emf.ecore.EStructuralFeature.Setting,java.lang.Object> possibleNewValues)
Evaluates the given condition.- Parameters:
condition
- The Condition to evaluatedomainModel
- The root domain object of this condition.possibleNewValues
- the new value that should be compared against the expected value of the condition- Returns:
true
, if the condition matches,false
otherwise
-
getDomainModelReferences
java.util.Set<VDomainModelReference> getDomainModelReferences(T condition)
The Set ofVDomainModelReference
that are relevant for the condition.- Parameters:
condition
- TheCondition
to retrieve the VDMRs for- Returns:
- The Set of VDomainModelReferences. This Set must not be null.
-
-