Class RuleService
- java.lang.Object
-
- org.eclipse.emf.ecp.view.internal.rule.RuleService
-
- All Implemented Interfaces:
ViewModelService
,EMFFormsContextListener
public class RuleService extends java.lang.Object implements ViewModelService, EMFFormsContextListener
Rule service that, once instantiated, maintains and synchronizes the state of a rule with itsVElement
.- Author:
- emueller, jfaltermeier
-
-
Constructor Summary
Constructors Constructor Description RuleService()
Instantiates the rule service.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
childContextAdded(VElement parentElement, EMFFormsViewContext childContext)
Called when a child context is added.void
childContextDisposed(EMFFormsViewContext childContext)
Called when a child context is disposed.void
contextDispose()
Called by the context when the dispose is running.void
contextInitialised()
Called by the context when the initialization has finished.void
dispose()
Dispose.java.util.Map<VElement,java.lang.Boolean>
getDisabledRenderables(java.util.Map<org.eclipse.emf.ecore.EStructuralFeature.Setting,java.lang.Object> possibleValues, UniqueSetting setting)
Returns allVElement
s, that would we disabled ifpossibleValues
would be set for the givensetting
s.java.util.Map<VElement,java.lang.Boolean>
getHiddenRenderables(java.util.Map<org.eclipse.emf.ecore.EStructuralFeature.Setting,java.lang.Object> possibleValues, UniqueSetting setting)
int
getPriority()
Returns the priority for this view service.void
instantiate(ViewModelContext context)
Instantiate the view service.
-
-
-
Method Detail
-
instantiate
public void instantiate(ViewModelContext context)
Instantiate the view service.- Specified by:
instantiate
in interfaceViewModelService
- Parameters:
context
- theViewModelContext
- See Also:
ViewModelService.instantiate(org.eclipse.emf.ecp.view.spi.context.ViewModelContext)
-
getDisabledRenderables
public java.util.Map<VElement,java.lang.Boolean> getDisabledRenderables(java.util.Map<org.eclipse.emf.ecore.EStructuralFeature.Setting,java.lang.Object> possibleValues, UniqueSetting setting)
Returns allVElement
s, that would we disabled ifpossibleValues
would be set for the givensetting
s.- Parameters:
possibleValues
- a mapping of settings to their would-be new valuesetting
- the changed setting- Returns:
- the hidden
VElement
s and their new state ifpossibleValues
would be set
-
getHiddenRenderables
public java.util.Map<VElement,java.lang.Boolean> getHiddenRenderables(java.util.Map<org.eclipse.emf.ecore.EStructuralFeature.Setting,java.lang.Object> possibleValues, UniqueSetting setting)
- Parameters:
possibleValues
- a mapping of settings to their would-be new valuesetting
- the setting that was changed- Returns:
- the hidden
VElement
s and their new state ifpossibleValues
would be set
-
dispose
public void dispose()
Dispose.- Specified by:
dispose
in interfaceViewModelService
-
getPriority
public int getPriority()
Returns the priority for this view service.- Specified by:
getPriority
in interfaceViewModelService
- Returns:
- the priority
- See Also:
ViewModelService.getPriority()
-
childContextAdded
public void childContextAdded(VElement parentElement, EMFFormsViewContext childContext)
Called when a child context is added.- Specified by:
childContextAdded
in interfaceEMFFormsContextListener
- Parameters:
parentElement
- TheVElement
that is associated with the child contextchildContext
- TheEMFFormsViewContext
that was added- See Also:
EMFFormsContextListener.childContextAdded(org.eclipse.emf.ecp.view.spi.model.VElement, org.eclipse.emfforms.spi.core.services.view.EMFFormsViewContext)
-
childContextDisposed
public void childContextDisposed(EMFFormsViewContext childContext)
Called when a child context is disposed.- Specified by:
childContextDisposed
in interfaceEMFFormsContextListener
- Parameters:
childContext
- TheEMFFormsViewContext
that was disposed- See Also:
EMFFormsContextListener.childContextDisposed(org.eclipse.emfforms.spi.core.services.view.EMFFormsViewContext)
-
contextInitialised
public void contextInitialised()
Called by the context when the initialization has finished.- Specified by:
contextInitialised
in interfaceEMFFormsContextListener
- See Also:
EMFFormsContextListener.contextInitialised()
-
contextDispose
public void contextDispose()
Called by the context when the dispose is running.- Specified by:
contextDispose
in interfaceEMFFormsContextListener
- See Also:
EMFFormsContextListener.contextDispose()
-
-