Class EMFFormsKeyAttributeDMRExpander
- java.lang.Object
-
- org.eclipse.emfforms.internal.core.services.domainexpander.keyattribute.EMFFormsKeyAttributeDMRExpander
-
- All Implemented Interfaces:
EMFFormsDMRExpander
public class EMFFormsKeyAttributeDMRExpander extends java.lang.Object implements EMFFormsDMRExpander
- Author:
- Lucas Koehler
-
-
Field Summary
-
Fields inherited from interface org.eclipse.emfforms.spi.core.services.domainexpander.EMFFormsDMRExpander
NOT_APPLICABLE
-
-
Constructor Summary
Constructors Constructor Description EMFFormsKeyAttributeDMRExpander()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
activate(org.osgi.framework.BundleContext bundleContext)
Called by the framework when the component gets activated.protected void
deactivate(org.osgi.framework.BundleContext bundleContext)
Called by the framework when the component gets deactivated.double
isApplicable(VDomainModelReference domainModelReference)
Returns how suitable thisEMFFormsDMRExpander
is for the givenVDomainModelReference
.void
prepareDomainObject(VDomainModelReference domainModelReference, org.eclipse.emf.ecore.EObject domainObject)
Prepares adomain object
for the givenVDomainModelReference
.protected void
setEMFFormsDatabinding(EMFFormsDatabinding emfFormsDatabinding)
Called by the framework to set theEMFFormsDatabinding
.protected void
setReportService(ReportService reportService)
Called by the framework to set theReportService
.
-
-
-
Method Detail
-
setReportService
protected void setReportService(ReportService reportService)
Called by the framework to set theReportService
.- Parameters:
reportService
- TheReportService
-
activate
protected void activate(org.osgi.framework.BundleContext bundleContext)
Called by the framework when the component gets activated.- Parameters:
bundleContext
- TheBundleContext
-
deactivate
protected void deactivate(org.osgi.framework.BundleContext bundleContext)
Called by the framework when the component gets deactivated.- Parameters:
bundleContext
- TheBundleContext
-
setEMFFormsDatabinding
protected void setEMFFormsDatabinding(EMFFormsDatabinding emfFormsDatabinding)
Called by the framework to set theEMFFormsDatabinding
.- Parameters:
emfFormsDatabinding
- TheEMFFormsDatabinding
-
prepareDomainObject
public void prepareDomainObject(VDomainModelReference domainModelReference, org.eclipse.emf.ecore.EObject domainObject) throws EMFFormsExpandingFailedException
Prepares adomain object
for the givenVDomainModelReference
. Thereby, the path defined by theVDomainModelReference
is analyzed and missing objects in the domain model are created. Thereby, theVDomainModelReference
is not changed.Example:
DMR: A -> B -> x
domain model is instance of A but does not reference an instance of B
=> An instance of B is created and referenced by the domain model.- Specified by:
prepareDomainObject
in interfaceEMFFormsDMRExpander
- Parameters:
domainModelReference
- TheVDomainModelReference
for which thedomain object
should be prepared.domainObject
- Thedomain object
to prepare.- Throws:
EMFFormsExpandingFailedException
- if the domain expansion fails.- See Also:
EMFFormsDMRExpander.prepareDomainObject(org.eclipse.emf.ecp.view.spi.model.VDomainModelReference, org.eclipse.emf.ecore.EObject)
-
isApplicable
public double isApplicable(VDomainModelReference domainModelReference)
Returns how suitable thisEMFFormsDMRExpander
is for the givenVDomainModelReference
.- Specified by:
isApplicable
in interfaceEMFFormsDMRExpander
- Parameters:
domainModelReference
- TheVDomainModelReference
for which adomain object
should be prepared.- Returns:
- a value indicating how suitable this
EMFFormsDMRExpander
is to expand adomain object
for the givenVDomainModelReference
. Returns NOT_APPLICABLE if it's not applicable. - See Also:
EMFFormsDMRExpander.isApplicable(org.eclipse.emf.ecp.view.spi.model.VDomainModelReference)
-
-