@Test public void testIsGuidedDecisionTableEditableWhenDecisionTableDoesNotHaveEditableColumns() { final GuidedDecisionTableView.Presenter dtPresenter = mock(GuidedDecisionTableView.Presenter.class); final GuidedDecisionTablePresenter.Access access = mock(GuidedDecisionTablePresenter.Access.class); doReturn(access).when(dtPresenter).getAccess(); doReturn(false).when(access).isReadOnly(); doReturn(false).when(access).hasEditableColumns(); final boolean isGuidedDecisionTableEditable = presenter.isGuidedDecisionTableEditable(dtPresenter); assertFalse(isGuidedDecisionTableEditable); }
boolean isGuidedDecisionTableEditable(final GuidedDecisionTableView.Presenter decisionTablePresenter) { final GuidedDecisionTablePresenter.Access access = decisionTablePresenter.getAccess(); final boolean decisionTableIsEditable = !access.isReadOnly(); final boolean decisionTableHasEditableColumns = access.hasEditableColumns(); return decisionTableIsEditable && decisionTableHasEditableColumns; }
BaseGuidedDecisionTableEditorPresenter extends KieMultipleDocumentEditor<GuidedDecisionTableView.Presenter> { boolean isGuidedDecisionTableEditable(final GuidedDecisionTableView.Presenter decisionTablePresenter) { final GuidedDecisionTablePresenter.Access access = decisionTablePresenter.getAccess(); final boolean decisionTableIsEditable = !access.isReadOnly(); final boolean decisionTableHasEditableColumns = access.hasEditableColumns(); return decisionTableIsEditable && decisionTableHasEditableColumns; } }
BaseGuidedDecisionTableEditorPresenter extends KieMultipleDocumentEditor<GuidedDecisionTableView.Presenter> { boolean isGuidedDecisionTableEditable(final GuidedDecisionTableView.Presenter decisionTablePresenter) { final GuidedDecisionTablePresenter.Access access = decisionTablePresenter.getAccess(); final boolean decisionTableIsEditable = !access.isReadOnly(); final boolean decisionTableHasEditableColumns = access.hasEditableColumns(); return decisionTableIsEditable && decisionTableHasEditableColumns; } BaseGuidedDecisionTableEditorPresenter(final View view,
                                                  final Caller<GuidedDecisionTableEditorService> service,
                                                  final AuthoringWorkbenchDocks docks,
                                                  final PerspectiveManager perspectiveManager,
                                                  final Event<NotificationEvent> notification,
                                                  final Event<DecisionTableSelectedEvent> decisionTableSelectedEvent,
                                                  final GuidedDecisionTableDocksHandler guidedDecisionTableDocksHandler,
                                                  final AnalysisReportScreen analysisReportScreen,
                                                  final ValidationPopup validationPopup,
                                                  final ClientResourceType resourceType,
                                                  final EditMenuBuilder editMenuBuilder,
                                                  final ViewMenuBuilder viewMenuBuilder,
                                                  final InsertMenuBuilder insertMenuBuilder,
                                                  final RadarMenuBuilder radarMenuBuilder,
                                                  final GuidedDecisionTableModellerView.Presenter modeller,
                                                  final SyncBeanManager beanManager,
                                                  final PlaceManager placeManager,
                                                  final ColumnsPage columnsPage,
                                                  final AlertsButtonMenuItemBuilder alertsButtonMenuItemBuilder,
                                                  final DownloadMenuItemBuilder downloadMenuItemBuilder); }
BaseGuidedDecisionTableEditorPresenter extends KieMultipleDocumentEditor<GuidedDecisionTableView.Presenter> { boolean isGuidedDecisionTableEditable(final GuidedDecisionTableView.Presenter decisionTablePresenter) { final GuidedDecisionTablePresenter.Access access = decisionTablePresenter.getAccess(); final boolean decisionTableIsEditable = !access.isReadOnly(); final boolean decisionTableHasEditableColumns = access.hasEditableColumns(); return decisionTableIsEditable && decisionTableHasEditableColumns; } BaseGuidedDecisionTableEditorPresenter(final View view,
                                                  final Caller<GuidedDecisionTableEditorService> service,
                                                  final AuthoringWorkbenchDocks docks,
                                                  final PerspectiveManager perspectiveManager,
                                                  final Event<NotificationEvent> notification,
                                                  final Event<DecisionTableSelectedEvent> decisionTableSelectedEvent,
                                                  final GuidedDecisionTableDocksHandler guidedDecisionTableDocksHandler,
                                                  final AnalysisReportScreen analysisReportScreen,
                                                  final ValidationPopup validationPopup,
                                                  final ClientResourceType resourceType,
                                                  final EditMenuBuilder editMenuBuilder,
                                                  final ViewMenuBuilder viewMenuBuilder,
                                                  final InsertMenuBuilder insertMenuBuilder,
                                                  final RadarMenuBuilder radarMenuBuilder,
                                                  final GuidedDecisionTableModellerView.Presenter modeller,
                                                  final SyncBeanManager beanManager,
                                                  final PlaceManager placeManager,
                                                  final ColumnsPage columnsPage,
                                                  final AlertsButtonMenuItemBuilder alertsButtonMenuItemBuilder,
                                                  final DownloadMenuItemBuilder downloadMenuItemBuilder); void onShowDiagramEditorDocks(@Observes PlaceGainFocusEvent event); void onHideDocks(@Observes PlaceHiddenEvent event); void showDocks(); void hideDocks(); boolean verifyEventIdentifier(AbstractPlaceEvent event); @Override String getDocumentTitle(final GuidedDecisionTableView.Presenter dtPresenter); @Override void onClose(); @Override void refreshDocument(final GuidedDecisionTableView.Presenter dtPresenter); @Override void removeDocument(final GuidedDecisionTableView.Presenter dtPresenter); @Override void onValidate(final GuidedDecisionTableView.Presenter dtPresenter); @Override void onSave(final GuidedDecisionTableView.Presenter dtPresenter,
                       final String commitMessage); @Override void onSourceTabSelected(final GuidedDecisionTableView.Presenter dtPresenter); }
BaseGuidedDecisionTableEditorPresenter extends KieMultipleDocumentEditor<GuidedDecisionTableView.Presenter> { boolean isGuidedDecisionTableEditable(final GuidedDecisionTableView.Presenter decisionTablePresenter) { final GuidedDecisionTablePresenter.Access access = decisionTablePresenter.getAccess(); final boolean decisionTableIsEditable = !access.isReadOnly(); final boolean decisionTableHasEditableColumns = access.hasEditableColumns(); return decisionTableIsEditable && decisionTableHasEditableColumns; } BaseGuidedDecisionTableEditorPresenter(final View view,
                                                  final Caller<GuidedDecisionTableEditorService> service,
                                                  final AuthoringWorkbenchDocks docks,
                                                  final PerspectiveManager perspectiveManager,
                                                  final Event<NotificationEvent> notification,
                                                  final Event<DecisionTableSelectedEvent> decisionTableSelectedEvent,
                                                  final GuidedDecisionTableDocksHandler guidedDecisionTableDocksHandler,
                                                  final AnalysisReportScreen analysisReportScreen,
                                                  final ValidationPopup validationPopup,
                                                  final ClientResourceType resourceType,
                                                  final EditMenuBuilder editMenuBuilder,
                                                  final ViewMenuBuilder viewMenuBuilder,
                                                  final InsertMenuBuilder insertMenuBuilder,
                                                  final RadarMenuBuilder radarMenuBuilder,
                                                  final GuidedDecisionTableModellerView.Presenter modeller,
                                                  final SyncBeanManager beanManager,
                                                  final PlaceManager placeManager,
                                                  final ColumnsPage columnsPage,
                                                  final AlertsButtonMenuItemBuilder alertsButtonMenuItemBuilder,
                                                  final DownloadMenuItemBuilder downloadMenuItemBuilder); void onShowDiagramEditorDocks(@Observes PlaceGainFocusEvent event); void onHideDocks(@Observes PlaceHiddenEvent event); void showDocks(); void hideDocks(); boolean verifyEventIdentifier(AbstractPlaceEvent event); @Override String getDocumentTitle(final GuidedDecisionTableView.Presenter dtPresenter); @Override void onClose(); @Override void refreshDocument(final GuidedDecisionTableView.Presenter dtPresenter); @Override void removeDocument(final GuidedDecisionTableView.Presenter dtPresenter); @Override void onValidate(final GuidedDecisionTableView.Presenter dtPresenter); @Override void onSave(final GuidedDecisionTableView.Presenter dtPresenter,
                       final String commitMessage); @Override void onSourceTabSelected(final GuidedDecisionTableView.Presenter dtPresenter);  }