org.eclipse.papyrus.emf.facet.efacet.sdk.ui.internal.query
Class AbstractQueryDialogFactory<Q extends Query>
java.lang.Object
org.eclipse.papyrus.emf.facet.efacet.sdk.ui.internal.query.AbstractQueryDialogFactory<Q>
- All Implemented Interfaces:
- IQueryDialogFactory
public abstract class AbstractQueryDialogFactory<Q extends Query>
- extends java.lang.Object
- implements IQueryDialogFactory
This abstract class must be extended by the plug-in which has to extend this
plug-in. This abstract class must provide a simple way to create an dialog
for the creation of the query
The #createWidget()
method must return a widget that extends
AbstractQueryWidget
class add provide a widget for the edition of the
query.
The createQuery()
method must return the final query created. The query
must be a subclass of Query
.
The getDialogMessage()
method must return a simple text that will
notice the user that he successfully create the query.
- See Also:
WidgetProperties
,
PropertyElement
,
AbstractQueryWidget
,
Query
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QUERY_NAME
public static final ETypedElement QUERY_NAME
QUERY_TYPE
public static final ETypedElement QUERY_TYPE
CAN_BE_CACHED
public static final ETypedElement CAN_BE_CACHED
SIDE_EFFECTS
public static final ETypedElement SIDE_EFFECTS
AbstractQueryDialogFactory
public AbstractQueryDialogFactory()
createWidget
public abstract createWidget(Composite parent)
- Returns:
- the widget associated to the dialog. The widget will contain all
the necessaries
AbstractWidget
for the creation of the
query.
createSpecificProperties
public abstract java.util.Map<ETypedElement,PropertyElement> createSpecificProperties()
- Return a map with the specific properties of the query.
- Returns:
- the properties
createQuery
public abstract Query createQuery()
- Specified by:
createQuery
in interface IQueryDialogFactory
- Returns:
- the query created by this widget. Null if no query have been
created.
getDialogMessage
public abstract java.lang.String getDialogMessage()
- Returns:
- the message description of the dialog.
getDialogTitle
public abstract java.lang.String getDialogTitle()
- Returns:
- the title of the dialog.
getConclusionText
public abstract java.lang.String getConclusionText()
- Specified by:
getConclusionText
in interface IQueryDialogFactory
- Returns:
- a text that the extension must set for the main dialog (to let
the user know that he create the query).
getParent
public getParent()
- Returns:
- the parentDialog
setQueryName
public void setQueryName(java.lang.String queryName)
- Parameters:
queryName
- the queryName to set
getDerivedTypedElement
public DerivedTypedElement getDerivedTypedElement()
- Returns:
- the facetset
setQueryType
public void setQueryType(EClassifier queryType)
- Parameters:
queryName
- the queryName to set
getQueryTypeProperty
public PropertyElement getQueryTypeProperty()
- Returns:
- the query type.
getProperties
public getProperties()
- This method return a singleton of the properties
WidgetProperties
with the initialization of some standard properties as: - The
query name :
getQueryNameProperty()
- If the query can be
cached :
getCanBeCachedProperty()
- If the query can have
side effects :
getCanHaveSideEffects()
- Returns:
- the properties
addSpecificProperties
public void addSpecificProperties()
- The the specific properties to the existing properties.
getQueryNameProperty
public PropertyElement getQueryNameProperty()
- Returns:
- the queryNameProperty
getCanBeCachedProperty
public PropertyElement getCanBeCachedProperty()
- Returns:
- the CanBeCachedProperty
isCanBeCachedPropertyValue
public boolean isCanBeCachedPropertyValue()
getCanHaveSideEffects
public PropertyElement getCanHaveSideEffects()
- Returns:
- the CanHaveSideEffects
isCanHaveSideEffectsValue
public boolean isCanHaveSideEffectsValue()
getInitialQuery
public Q getInitialQuery()
- Returns:
- the initialQuery
setInitialQuery
public void setInitialQuery(Q initialQuery)
- Parameters:
initialQuery
- the initialQuery to set
commit
public void commit()
cancel
public void cancel()
open
public int open()
isDialogValid
public boolean isDialogValid()