Constructor and Description |
---|
RuleRegistry(ViewModelContext context)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes this
RuleRegistry . |
Map<T,VElement> |
getAffectedRenderables(UniqueSetting setting)
Returns all rules that would be affected if the value of given setting is changed.
|
Set<UniqueSetting> |
getSettings()
Returns the settings of this registry.
|
Set<UniqueSetting> |
register(VElement renderable,
T rule,
Condition condition,
org.eclipse.emf.ecore.EObject domainModel)
|
VElement |
removeCondition(Condition condition)
Removes the given condition from the registry.
|
void |
removeRenderable(VElement renderable)
Removes the given
VElement from the registry. |
VElement |
removeRule(T rule)
Removes the given rule from the registry.
|
public RuleRegistry(ViewModelContext context)
context
- the view model context of the RuleService
using this registrypublic Set<UniqueSetting> register(VElement renderable, T rule, Condition condition, org.eclipse.emf.ecore.EObject domainModel)
renderable
- the VElement
to be updated in case the condition changesrule
- the parent rule holding the Condition
condition
- contains the attribute that the condition is depending ondomainModel
- the domain object that owns the attribute possibly being
changedUniqueSettings
public VElement removeRule(T rule)
rule
- the rule to be removedVElement
that belonged to the removed rulepublic void removeRenderable(VElement renderable)
VElement
from the registry.renderable
- the renderable to be removedpublic VElement removeCondition(Condition condition)
condition
- the condition to be removedVElement
that belonged to the removed conditionpublic Set<UniqueSetting> getSettings()
public Map<T,VElement> getAffectedRenderables(UniqueSetting setting)
setting
- the settingVElement
s that are affected of the setting changepublic void dispose()
RuleRegistry
.Copyright © 2018. All rights reserved.