Class EMFFormsAbstractLegacyServiceFactory<T extends ViewModelService>
- java.lang.Object
-
- org.eclipse.emfforms.internal.core.services.legacy.EMFFormsAbstractLegacyServiceFactory<T>
-
- Type Parameters:
T
- The actual type of the service
- All Implemented Interfaces:
EMFFormsViewServiceFactory<T>
- Direct Known Subclasses:
EMFFormsLegacyGlobalServiceFactory
,EMFFormsLegacyLocalServiceFactory
public abstract class EMFFormsAbstractLegacyServiceFactory<T extends ViewModelService> extends java.lang.Object implements EMFFormsViewServiceFactory<T>
An abstract implementation for theEMFFormsViewServiceFactory
.- Author:
- Eugen Neufeld
-
-
Constructor Summary
Constructors Constructor Description EMFFormsAbstractLegacyServiceFactory(java.lang.Class<T> type, double priority, ReportService reportService)
Default constructor used to create anEMFFormsLegacyGlobalServiceFactory
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
createService(EMFFormsViewContext emfFormsViewContext)
Creates a new instance of the provided service.double
getPriority()
The priority of the service.java.lang.Class<T>
getType()
The type of the actual service provided by this provider.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.emfforms.spi.core.services.view.EMFFormsViewServiceFactory
getPolicy, getScope
-
-
-
-
Constructor Detail
-
EMFFormsAbstractLegacyServiceFactory
public EMFFormsAbstractLegacyServiceFactory(java.lang.Class<T> type, double priority, ReportService reportService)
Default constructor used to create anEMFFormsLegacyGlobalServiceFactory
.- Parameters:
type
- The type of the service to wrappriority
- The priority of the wrapped servicereportService
- TheReportService
to use for logging
-
-
Method Detail
-
getPriority
public double getPriority()
The priority of the service. The usage of this service is twofold:- A service with a higher priority is more likely to be used if more than one service of the same type is registered.
- A service with lower priority is instantiated and thereby executed earlier than other services of all types with higher priorities
- Specified by:
getPriority
in interfaceEMFFormsViewServiceFactory<T extends ViewModelService>
- Returns:
- The priority of this service
- See Also:
EMFFormsViewServiceFactory.getPriority()
-
getType
public java.lang.Class<T> getType()
The type of the actual service provided by this provider.- Specified by:
getType
in interfaceEMFFormsViewServiceFactory<T extends ViewModelService>
- Returns:
- The Class of the actual service
- See Also:
EMFFormsViewServiceFactory.getType()
-
createService
public T createService(EMFFormsViewContext emfFormsViewContext)
Creates a new instance of the provided service.- Specified by:
createService
in interfaceEMFFormsViewServiceFactory<T extends ViewModelService>
- Parameters:
emfFormsViewContext
- TheEMFFormsViewContext
to use during the creation of the service- Returns:
- A new instance of the provided service or null if the service should not be created
- See Also:
EMFFormsViewServiceFactory.createService(EMFFormsViewContext)
-
-