Class KeyAttributeDomainModelReferenceConverter
- java.lang.Object
-
- org.eclipse.emfforms.internal.core.services.databinding.keyattribute.KeyAttributeDomainModelReferenceConverter
-
- All Implemented Interfaces:
DomainModelReferenceConverter
,DomainModelReferenceConverterEMF
public class KeyAttributeDomainModelReferenceConverter extends java.lang.Object implements DomainModelReferenceConverterEMF
An implementation ofDomainModelReferenceConverterEMF
that convertsVKeyAttributeDomainModelReferences
.- Author:
- Lucas Koehler
-
-
Field Summary
-
Fields inherited from interface org.eclipse.emfforms.spi.core.services.databinding.DomainModelReferenceConverter
NOT_APPLICABLE
-
-
Constructor Summary
Constructors Constructor Description KeyAttributeDomainModelReferenceConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
activate(org.osgi.framework.BundleContext bundleContext)
This method is called by the OSGI framework when thisDomainModelReferenceConverterEMF
is activated.org.eclipse.emf.databinding.IEMFListProperty
convertToListProperty(VDomainModelReference domainModelReference, org.eclipse.emf.ecore.EObject object)
Converts aVDomainModelReference
to anIListProperty
.org.eclipse.emf.databinding.IEMFValueProperty
convertToValueProperty(VDomainModelReference domainModelReference, org.eclipse.emf.ecore.EClass rootEClass, org.eclipse.emf.edit.domain.EditingDomain editingDomain)
org.eclipse.emf.databinding.IEMFValueProperty
convertToValueProperty(VDomainModelReference domainModelReference, org.eclipse.emf.ecore.EObject object)
Converts aVDomainModelReference
to aIValueProperty
.protected void
deactivate(org.osgi.framework.BundleContext bundleContext)
This method is called by the OSGI framework when thisDomainModelReferenceConverterEMF
is deactivated.org.eclipse.emf.ecore.EStructuralFeature.Setting
getSetting(VDomainModelReference domainModelReference, org.eclipse.emf.ecore.EObject object)
Retrieve the Setting which is described by the providedVDomainModelReference
and the providedEObject
.double
isApplicable(VDomainModelReference domainModelReference)
Checks whether the givenVDomainModelReference
can be converted by thisDomainModelReferenceConverter
to aIValueProperty
.
-
-
-
Method Detail
-
activate
protected final void activate(org.osgi.framework.BundleContext bundleContext)
This method is called by the OSGI framework when thisDomainModelReferenceConverterEMF
is activated. It retrieves theEMF Forms databinding service
.- Parameters:
bundleContext
- TheBundleContext
of this classes bundle.
-
deactivate
protected final void deactivate(org.osgi.framework.BundleContext bundleContext)
This method is called by the OSGI framework when thisDomainModelReferenceConverterEMF
is deactivated. It frees theEMF Forms databinding service
.- Parameters:
bundleContext
- TheBundleContext
of this classes bundle.
-
convertToValueProperty
public org.eclipse.emf.databinding.IEMFValueProperty convertToValueProperty(VDomainModelReference domainModelReference, org.eclipse.emf.ecore.EObject object) throws DatabindingFailedException
Description copied from interface:DomainModelReferenceConverter
Converts aVDomainModelReference
to aIValueProperty
.- Specified by:
convertToValueProperty
in interfaceDomainModelReferenceConverter
- Specified by:
convertToValueProperty
in interfaceDomainModelReferenceConverterEMF
- Parameters:
domainModelReference
- TheVDomainModelReference
that will be converted to aIValueProperty
object
- The root object of the rendered form- Returns:
- The created
IValueProperty
, does not returnnull
. - Throws:
DatabindingFailedException
- if no value property could be created due to an invalidVDomainModelReference
.
-
convertToValueProperty
public org.eclipse.emf.databinding.IEMFValueProperty convertToValueProperty(VDomainModelReference domainModelReference, org.eclipse.emf.ecore.EClass rootEClass, org.eclipse.emf.edit.domain.EditingDomain editingDomain) throws DatabindingFailedException
Description copied from interface:DomainModelReferenceConverterEMF
- Specified by:
convertToValueProperty
in interfaceDomainModelReferenceConverterEMF
- Parameters:
rootEClass
- in this implementation, this parameter is ignored and might benull
domainModelReference
- TheVDomainModelReference
that will be converted to aIValueProperty
editingDomain
- TheEditingDomain
used by the createdvalue property
. The EditingDomain might benull
but in this case the value property will not support set functionality- Returns:
- The created
IValueProperty
, does not returnnull
. - Throws:
DatabindingFailedException
- if no value property could be created due to an invalidVDomainModelReference
.
-
convertToListProperty
public org.eclipse.emf.databinding.IEMFListProperty convertToListProperty(VDomainModelReference domainModelReference, org.eclipse.emf.ecore.EObject object) throws DatabindingFailedException
Description copied from interface:DomainModelReferenceConverter
Converts aVDomainModelReference
to anIListProperty
.- Specified by:
convertToListProperty
in interfaceDomainModelReferenceConverter
- Specified by:
convertToListProperty
in interfaceDomainModelReferenceConverterEMF
- Parameters:
domainModelReference
- TheVDomainModelReference
that will be converted to anIListProperty
object
- The root object of the rendered form- Returns:
- The created
IListProperty
, does not returnnull
. - Throws:
DatabindingFailedException
- if no value property could be created due to an invalidVDomainModelReference
.
-
getSetting
public org.eclipse.emf.ecore.EStructuralFeature.Setting getSetting(VDomainModelReference domainModelReference, org.eclipse.emf.ecore.EObject object) throws DatabindingFailedException
Description copied from interface:DomainModelReferenceConverterEMF
Retrieve the Setting which is described by the providedVDomainModelReference
and the providedEObject
.- Specified by:
getSetting
in interfaceDomainModelReferenceConverterEMF
- Parameters:
domainModelReference
- TheVDomainModelReference
to use to retrieve the settingobject
- TheEObject
to use to retrieve the setting- Returns:
- The Setting being described by the
VDomainModelReference
- Throws:
DatabindingFailedException
- if the databinding could not be executed successfully.
-
isApplicable
public double isApplicable(VDomainModelReference domainModelReference)
Description copied from interface:DomainModelReferenceConverter
Checks whether the givenVDomainModelReference
can be converted by thisDomainModelReferenceConverter
to aIValueProperty
. The return value is the priority of this converter. The higher the priority, the better suits the converter the givenVDomainModelReference
.- Specified by:
isApplicable
in interfaceDomainModelReferenceConverter
- Parameters:
domainModelReference
- TheVDomainModelReference
whose priority is wanted.- Returns:
- The priority of the given
VDomainModelReference
; negative infinity if this converter is not applicable.
-
-