@ApplicationScoped public class TestToolsPresenter extends AbstractSubDockPresenter<TestToolsView> implements TestToolsView.Presenter
Modifier and Type | Field and Description |
---|---|
protected Map<String,FactModelTree> |
dataObjectFieldsMap |
protected boolean |
editingColumnEnabled |
protected com.google.gwt.event.shared.EventBus |
eventBus |
protected GridWidget |
gridWidget |
protected Map<String,FactModelTree> |
hiddenFieldsMap |
static String |
IDENTIFIER |
protected Map<String,FactModelTree> |
instanceFieldsMap |
protected FieldItemView |
selectedFieldItemView |
protected ListGroupItemView |
selectedListGroupItemView |
protected Map<String,FactModelTree> |
simpleJavaInstanceFieldsMap |
protected Map<String,FactModelTree> |
simpleJavaTypeFieldsMap |
currentPath, DEFAULT_PREFERRED_WIDHT, title, view
Constructor and Description |
---|
TestToolsPresenter() |
TestToolsPresenter(TestToolsView view,
ListGroupItemPresenter listGroupItemPresenter) |
Modifier and Type | Method and Description |
---|---|
void |
addDataObjectListGroupItemView(String factName,
FactModelTree factModelTree) |
void |
addInstanceListGroupItemView(String instanceName,
FactModelTree factModelTree) |
void |
addSimpleJavaInstanceListGroupItemView(String instanceName,
FactModelTree factModelTree) |
void |
addSimpleJavaTypeListGroupItemView(String factName,
FactModelTree factModelTree) |
void |
clearDataObjectList() |
void |
clearInstanceList() |
protected void |
clearLists() |
void |
clearSelection() |
void |
clearSimpleJavaInstanceFieldList() |
void |
clearSimpleJavaTypeList() |
protected boolean |
filterTerm(String key,
String search,
boolean notEqualsSearch)
It determines if a key (factTitle) is present or not in the search variable.
|
Optional<FactModelTree> |
getFactModelTreeFromFactTypeMap(String factName) |
FactModelTree |
getFactModelTreeFromHiddenMap(String factName) |
Optional<FactModelTree> |
getFactModelTreeFromInstanceMap(String factName) |
protected Optional<FactModelTree> |
getFactModelTreeFromMaps(String key) |
Optional<FactModelTree> |
getFactModelTreeFromSimpleJavaInstanceMap(String factName) |
Optional<FactModelTree> |
getFactModelTreeFromSimpleJavaTypeMap(String factName) |
protected Optional<String> |
getFullPackage(String className) |
void |
hideInstances()
Method to hide all the instance-related html
|
protected void |
hideProperties(Map<String,List<List<String>>> propertiesToHide) |
protected boolean |
isSimple(String key) |
void |
onClearSearch() |
void |
onClearStatus() |
void |
onDisableEditorTab()
By default the Editor Tab must be disabled (no user interaction allowed).
|
void |
onEnableEditorTab()
By default the Editor Tab is disabled (no user interaction allowed).
|
void |
onEnableEditorTab(String filterTerm,
List<String> propertyNameElements,
boolean notEqualsSearch)
By default the Editor Tab is disabled (no user interaction allowed).
|
void |
onModifyColumn()
Method to fire a
SetPropertyHeaderScenarioSImulationCommand or SetPropertyHeaderScenarioSImulationCommand ,
depending on the element currently selected |
void |
onPerfectMatchSearchedEvent(String search,
boolean notEqualsSearch)
Filter the data in the right panel if they are exactly the same as the given search string, case-sensitive.
|
void |
onSearchedEvent(String search)
Filter the data in the right panel if they contains the given search string, case-unsensitive.
|
void |
onShowClearButton() |
void |
onUndoSearch() |
void |
populateTestTools(TestToolsPresenterData data) |
void |
reset()
It resets the current status of the
SubDock component |
protected void |
setDataObjectFieldsMap(SortedMap<String,FactModelTree> dataObjectFieldsMap) |
void |
setEventBus(com.google.gwt.event.shared.EventBus eventBus) |
protected void |
setGridWidget(GridWidget gridWidget) |
protected void |
setHiddenFieldsMap(SortedMap<String,FactModelTree> hiddenFieldsMap) |
protected void |
setInstanceFieldsMap(SortedMap<String,FactModelTree> instanceFieldsMap) |
void |
setSelectedElement(FieldItemView selected)
Method to set the "selected" information - use this to set the property level header
|
void |
setSelectedElement(ListGroupItemView selected)
Method to set the "selected" information - use this to set the instance level header
|
protected void |
setSimpleJavaInstanceFieldsMap(SortedMap<String,FactModelTree> simpleJavaInstanceFieldsMap) |
protected void |
setSimpleJavaTypeFieldsMap(SortedMap<String,FactModelTree> simpleJavaTypeFieldsMap) |
void |
showInstanceListContainerSeparator(boolean show) |
protected void |
updateInstanceIsAssignedStatus(String key)
It navigates through the maps, to check if the given key is present or not in the keySet of these maps.
|
void |
updateInstanceListSeparator() |
asWidget, getDefaultPosition, getTitle, isCurrentlyShow, setCurrentPath, setup
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isCurrentlyShow, setCurrentPath
public static final String IDENTIFIER
protected Map<String,FactModelTree> dataObjectFieldsMap
protected Map<String,FactModelTree> simpleJavaTypeFieldsMap
protected Map<String,FactModelTree> instanceFieldsMap
protected Map<String,FactModelTree> simpleJavaInstanceFieldsMap
protected Map<String,FactModelTree> hiddenFieldsMap
protected com.google.gwt.event.shared.EventBus eventBus
protected GridWidget gridWidget
protected boolean editingColumnEnabled
protected ListGroupItemView selectedListGroupItemView
protected FieldItemView selectedFieldItemView
public TestToolsPresenter()
@Inject public TestToolsPresenter(TestToolsView view, ListGroupItemPresenter listGroupItemPresenter)
public void onClearSearch()
onClearSearch
in interface TestToolsView.Presenter
public void onUndoSearch()
onUndoSearch
in interface TestToolsView.Presenter
public void onClearStatus()
onClearStatus
in interface TestToolsView.Presenter
public void clearDataObjectList()
clearDataObjectList
in interface TestToolsView.Presenter
public void clearSimpleJavaTypeList()
clearSimpleJavaTypeList
in interface TestToolsView.Presenter
public void clearInstanceList()
clearInstanceList
in interface TestToolsView.Presenter
public void clearSimpleJavaInstanceFieldList()
clearSimpleJavaInstanceFieldList
in interface TestToolsView.Presenter
public void updateInstanceListSeparator()
updateInstanceListSeparator
in interface TestToolsView.Presenter
public void showInstanceListContainerSeparator(boolean show)
showInstanceListContainerSeparator
in interface TestToolsView.Presenter
public Optional<FactModelTree> getFactModelTreeFromFactTypeMap(String factName)
getFactModelTreeFromFactTypeMap
in interface TestToolsView.Presenter
public Optional<FactModelTree> getFactModelTreeFromSimpleJavaTypeMap(String factName)
getFactModelTreeFromSimpleJavaTypeMap
in interface TestToolsView.Presenter
public Optional<FactModelTree> getFactModelTreeFromInstanceMap(String factName)
getFactModelTreeFromInstanceMap
in interface TestToolsView.Presenter
public Optional<FactModelTree> getFactModelTreeFromSimpleJavaInstanceMap(String factName)
getFactModelTreeFromSimpleJavaInstanceMap
in interface TestToolsView.Presenter
public FactModelTree getFactModelTreeFromHiddenMap(String factName)
getFactModelTreeFromHiddenMap
in interface TestToolsView.Presenter
public void populateTestTools(TestToolsPresenterData data)
populateTestTools
in interface TestToolsView.Presenter
protected void setDataObjectFieldsMap(SortedMap<String,FactModelTree> dataObjectFieldsMap)
protected void setSimpleJavaTypeFieldsMap(SortedMap<String,FactModelTree> simpleJavaTypeFieldsMap)
protected void setInstanceFieldsMap(SortedMap<String,FactModelTree> instanceFieldsMap)
protected void setSimpleJavaInstanceFieldsMap(SortedMap<String,FactModelTree> simpleJavaInstanceFieldsMap)
protected void setHiddenFieldsMap(SortedMap<String,FactModelTree> hiddenFieldsMap)
public void onShowClearButton()
onShowClearButton
in interface TestToolsView.Presenter
public void setEventBus(com.google.gwt.event.shared.EventBus eventBus)
setEventBus
in interface TestToolsView.Presenter
protected void setGridWidget(GridWidget gridWidget)
public void onSearchedEvent(String search)
TestToolsView.Presenter
onSearchedEvent
in interface TestToolsView.Presenter
public void onPerfectMatchSearchedEvent(String search, boolean notEqualsSearch)
TestToolsView.Presenter
onPerfectMatchSearchedEvent
in interface TestToolsView.Presenter
notEqualsSearch
- set to true
to perform a not filter, i.e. to show only results different than filterTermpublic void addDataObjectListGroupItemView(String factName, FactModelTree factModelTree)
addDataObjectListGroupItemView
in interface TestToolsView.Presenter
public void addSimpleJavaTypeListGroupItemView(String factName, FactModelTree factModelTree)
addSimpleJavaTypeListGroupItemView
in interface TestToolsView.Presenter
public void addInstanceListGroupItemView(String instanceName, FactModelTree factModelTree)
addInstanceListGroupItemView
in interface TestToolsView.Presenter
public void addSimpleJavaInstanceListGroupItemView(String instanceName, FactModelTree factModelTree)
addSimpleJavaInstanceListGroupItemView
in interface TestToolsView.Presenter
public void onEnableEditorTab()
TestToolsView.Presenter
onEnableEditorTab
in interface TestToolsView.Presenter
public void onEnableEditorTab(String filterTerm, List<String> propertyNameElements, boolean notEqualsSearch)
TestToolsView.Presenter
onEnableEditorTab
in interface TestToolsView.Presenter
propertyNameElements
- The List
to eventually use to select the property in the test tools panelnotEqualsSearch
- set to true
to perform a not filter, i.e. to show only results different than filterTermpublic void onDisableEditorTab()
TestToolsView.Presenter
onDisableEditorTab
in interface TestToolsView.Presenter
public void setSelectedElement(ListGroupItemView selected)
TestToolsView.Presenter
setSelectedElement
in interface TestToolsView.Presenter
public void setSelectedElement(FieldItemView selected)
TestToolsView.Presenter
setSelectedElement
in interface TestToolsView.Presenter
public void clearSelection()
clearSelection
in interface TestToolsView.Presenter
public void onModifyColumn()
TestToolsView.Presenter
SetPropertyHeaderScenarioSImulationCommand
or SetPropertyHeaderScenarioSImulationCommand
,
depending on the element currently selectedonModifyColumn
in interface TestToolsView.Presenter
public void reset()
SubDockView.Presenter
SubDock
componentreset
in interface SubDockView.Presenter
public void hideInstances()
hideInstances
in interface TestToolsView.Presenter
protected void updateInstanceIsAssignedStatus(String key)
key
- protected Optional<FactModelTree> getFactModelTreeFromMaps(String key)
protected boolean isSimple(String key)
protected void clearLists()
protected boolean filterTerm(String key, String search, boolean notEqualsSearch)
key
- It's the title of the fact to searchsearch
- It represents a concatenation of titles, with ";" as separatornotEqualsSearch
- It establishes the method logic: to check if a key is present or not in search stringCopyright © 2001–2020 JBoss by Red Hat. All rights reserved.