@Test public void testGroupAllowed() { presenter.init(DATA_MULTIPLE, DataSetLookupFactory.newDataSetLookupBuilder() .dataset(POPULATION_UUID) .column("year") .column("population") .buildLookup()); verify(view).setGroupEnabled(true); verify(view).enableGroupColumnSelectorHint(); verify(view).setAddColumnOptionEnabled(true); verify(event, never()).fire(any(DataSetLookupChangedEvent.class)); }
public void init(DataSetLookupConstraints lookupConstraints, final DataSetLookup dataSetLookup) { this.dataSetLookup = dataSetLookup; this.lookupConstraints = lookupConstraints; this.view.clearAll(); this.clientServices.getPublicDataSetDefs(new RemoteCallback<List<DataSetDef>>() { public void callback(List<DataSetDef> dataSetDefs) { showDataSetDefs(dataSetDefs); if (dataSetLookup != null && dataSetLookup.getDataSetUUID() != null) { fetchMetadata(dataSetLookup.getDataSetUUID(), new RemoteCallback<DataSetMetadata>() { public void callback(DataSetMetadata metadata) { updateDataSetLookup(); } }); } } }); }
DataSetLookupEditor implements IsWidget { public void init(DataSetLookupConstraints lookupConstraints, final DataSetLookup dataSetLookup) { this.dataSetLookup = dataSetLookup; this.lookupConstraints = lookupConstraints; this.view.clearAll(); this.clientServices.getPublicDataSetDefs(new RemoteCallback<List<DataSetDef>>() { public void callback(List<DataSetDef> dataSetDefs) { showDataSetDefs(dataSetDefs); if (dataSetLookup != null && dataSetLookup.getDataSetUUID() != null) { fetchMetadata(dataSetLookup.getDataSetUUID(), new RemoteCallback<DataSetMetadata>() { public void callback(DataSetMetadata metadata) { updateDataSetLookup(); } }); } } }); } }
DataSetLookupEditor implements IsWidget { public void init(DataSetLookupConstraints lookupConstraints, final DataSetLookup dataSetLookup) { this.dataSetLookup = dataSetLookup; this.lookupConstraints = lookupConstraints; this.view.clearAll(); this.clientServices.getPublicDataSetDefs(new RemoteCallback<List<DataSetDef>>() { public void callback(List<DataSetDef> dataSetDefs) { showDataSetDefs(dataSetDefs); if (dataSetLookup != null && dataSetLookup.getDataSetUUID() != null) { fetchMetadata(dataSetLookup.getDataSetUUID(), new RemoteCallback<DataSetMetadata>() { public void callback(DataSetMetadata metadata) { updateDataSetLookup(); } }); } } }); } @Inject  DataSetLookupEditor(final View view,
                               SyncBeanManager beanManager,
                               DataSetFilterEditor filterEditor,
                               DataSetGroupDateEditor groupDateEditor,
                               DataSetClientServices clientServices,
                               Event<DataSetLookupChangedEvent> event); }
DataSetLookupEditor implements IsWidget { public void init(DataSetLookupConstraints lookupConstraints, final DataSetLookup dataSetLookup) { this.dataSetLookup = dataSetLookup; this.lookupConstraints = lookupConstraints; this.view.clearAll(); this.clientServices.getPublicDataSetDefs(new RemoteCallback<List<DataSetDef>>() { public void callback(List<DataSetDef> dataSetDefs) { showDataSetDefs(dataSetDefs); if (dataSetLookup != null && dataSetLookup.getDataSetUUID() != null) { fetchMetadata(dataSetLookup.getDataSetUUID(), new RemoteCallback<DataSetMetadata>() { public void callback(DataSetMetadata metadata) { updateDataSetLookup(); } }); } } }); } @Inject  DataSetLookupEditor(final View view,
                               SyncBeanManager beanManager,
                               DataSetFilterEditor filterEditor,
                               DataSetGroupDateEditor groupDateEditor,
                               DataSetClientServices clientServices,
                               Event<DataSetLookupChangedEvent> event); void init(DataSetLookupConstraints lookupConstraints,
                     final DataSetLookup dataSetLookup); @Override Widget asWidget(); View getView(); DataSetFilterEditor getFilterEditor(); DataSetGroupDateEditor getGroupDateEditor(); DataSetLookup getDataSetLookup(); DataSetLookupConstraints getLookupConstraints(); void setDataSetDefFilter(DataSetDefFilter dataSetDefFilter); String getDataSetUUID(); String getColumnId(int index); ColumnType getColumnType(int index); ColumnType getColumnType(String columnId); DataSetGroup getFirstGroupOp(); boolean isFirstGroupOpDateBased(); List<GroupFunction> getFirstGroupFunctions(); int getFirstGroupFunctionIdx(GroupFunction gf); String getFirstGroupColumnId(); List<Integer> getAvailableGroupColumnIdxs(); void showDataSetDefs(List<DataSetDef> ds); void addDataSetDef(DataSetDef def); void removeDataSetDef(DataSetDef def); }
DataSetLookupEditor implements IsWidget { public void init(DataSetLookupConstraints lookupConstraints, final DataSetLookup dataSetLookup) { this.dataSetLookup = dataSetLookup; this.lookupConstraints = lookupConstraints; this.view.clearAll(); this.clientServices.getPublicDataSetDefs(new RemoteCallback<List<DataSetDef>>() { public void callback(List<DataSetDef> dataSetDefs) { showDataSetDefs(dataSetDefs); if (dataSetLookup != null && dataSetLookup.getDataSetUUID() != null) { fetchMetadata(dataSetLookup.getDataSetUUID(), new RemoteCallback<DataSetMetadata>() { public void callback(DataSetMetadata metadata) { updateDataSetLookup(); } }); } } }); } @Inject  DataSetLookupEditor(final View view,
                               SyncBeanManager beanManager,
                               DataSetFilterEditor filterEditor,
                               DataSetGroupDateEditor groupDateEditor,
                               DataSetClientServices clientServices,
                               Event<DataSetLookupChangedEvent> event); void init(DataSetLookupConstraints lookupConstraints,
                     final DataSetLookup dataSetLookup); @Override Widget asWidget(); View getView(); DataSetFilterEditor getFilterEditor(); DataSetGroupDateEditor getGroupDateEditor(); DataSetLookup getDataSetLookup(); DataSetLookupConstraints getLookupConstraints(); void setDataSetDefFilter(DataSetDefFilter dataSetDefFilter); String getDataSetUUID(); String getColumnId(int index); ColumnType getColumnType(int index); ColumnType getColumnType(String columnId); DataSetGroup getFirstGroupOp(); boolean isFirstGroupOpDateBased(); List<GroupFunction> getFirstGroupFunctions(); int getFirstGroupFunctionIdx(GroupFunction gf); String getFirstGroupColumnId(); List<Integer> getAvailableGroupColumnIdxs(); void showDataSetDefs(List<DataSetDef> ds); void addDataSetDef(DataSetDef def); void removeDataSetDef(DataSetDef def);  }