Refs #21354: Improve accounting manager portlet by new persistence

Updated portlet behavior
This commit is contained in:
Giancarlo Panichi 2021-11-23 19:21:22 +01:00
parent 3ffb9f8523
commit ac4c236019
8 changed files with 216 additions and 91 deletions

View File

@ -46,7 +46,8 @@
<!-- <set-configuration-property name="CssResource.style" value="pretty"/> --> <!-- <set-configuration-property name="CssResource.style" value="pretty"/> -->
<!-- <set-property name="log_DivLogger" value="ENABLED" /> <set-property <!--
<set-property name="log_DivLogger" value="ENABLED" /> <set-property
name="log_ConsoleLogger" value="ENABLED" /> <set-property name="log_GWTLogger" name="log_ConsoleLogger" value="ENABLED" /> <set-property name="log_GWTLogger"
value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED" value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED"
/> --> /> -->
@ -56,8 +57,7 @@
<set-property name="log_ConsoleLogger" value="DISABLED" /> <set-property name="log_ConsoleLogger" value="DISABLED" />
<set-property name="log_GWTLogger" value="DISABLED" /> <set-property name="log_GWTLogger" value="DISABLED" />
<set-property name="log_SystemLogger" value="DISABLED" /> <set-property name="log_SystemLogger" value="DISABLED" />
<!-- Specify the paths for translatable code --> <!-- Specify the paths for translatable code -->
<source path='client' /> <source path='client' />

View File

@ -430,7 +430,7 @@ public class AccountingManagerController {
AccountingClientStateData accountingStateData = accountingState.getState(accountingType); AccountingClientStateData accountingStateData = accountingState.getState(accountingType);
SeriesRequest seriesRequest = null; SeriesRequest seriesRequest = null;
Context defaultContext=new Context(); Context defaultContext=availableContext;
switch (accountingType) { switch (accountingType) {
case JOB: case JOB:

View File

@ -93,6 +93,8 @@ import com.sencha.gxt.widget.core.client.grid.Grid;
import com.sencha.gxt.widget.core.client.grid.Grid.GridCell; import com.sencha.gxt.widget.core.client.grid.Grid.GridCell;
import com.sencha.gxt.widget.core.client.grid.GridSelectionModel; import com.sencha.gxt.widget.core.client.grid.GridSelectionModel;
import com.sencha.gxt.widget.core.client.grid.editing.GridRowEditing; import com.sencha.gxt.widget.core.client.grid.editing.GridRowEditing;
import com.sencha.gxt.widget.core.client.grid.filters.GridFilters;
import com.sencha.gxt.widget.core.client.grid.filters.StringFilter;
import com.sencha.gxt.widget.core.client.toolbar.ToolBar; import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
/** /**
@ -113,6 +115,8 @@ public class ActiveFiltersPanel extends SimpleContainer {
private ListStore<ContextData> storeScopes; private ListStore<ContextData> storeScopes;
private CheckBoxSelectionModel<ContextData> smScopes; private CheckBoxSelectionModel<ContextData> smScopes;
private ColumnConfig<ContextData, String> labelScopesCol; private ColumnConfig<ContextData, String> labelScopesCol;
private StringFilter<ContextData> scopeFilter;
private boolean addStatus; private boolean addStatus;
private AccountingClientStateData accountingStateData; private AccountingClientStateData accountingStateData;
private ListStore<FilterKey> storeComboFilterKey; private ListStore<FilterKey> storeComboFilterKey;
@ -428,6 +432,21 @@ public class ActiveFiltersPanel extends SimpleContainer {
gridScopes.getView().setAutoExpandColumn(labelScopesCol); gridScopes.getView().setAutoExpandColumn(labelScopesCol);
gridScopes.getView().setSortingEnabled(true); gridScopes.getView().setSortingEnabled(true);
//gridScopes.setStateful(true);
//gridScopes.setStateId("gridScopesDefault");
scopeFilter = new StringFilter<ContextData>(propsScopeData.label());
GridFilters<ContextData> gridScopesFilters = new GridFilters<ContextData>();
gridScopesFilters.initPlugin(gridScopes);
gridScopesFilters.setLocal(true);
gridScopesFilters.addFilter(scopeFilter);
//GridFilterStateHandler<ContextData> handler = new GridFilterStateHandler<ContextData>(gridScopes,
// gridScopesFilters);
//handler.loadState();
// ChartTypeSelection // ChartTypeSelection
storeComboChartType = new ListStore<ChartType>(new ModelKeyProvider<ChartType>() { storeComboChartType = new ListStore<ChartType>(new ModelKeyProvider<ChartType>() {
@ -541,7 +560,7 @@ public class ActiveFiltersPanel extends SimpleContainer {
VerticalLayoutContainer vlc = new VerticalLayoutContainer(); VerticalLayoutContainer vlc = new VerticalLayoutContainer();
vlc.add(gridScopes, new VerticalLayoutData(1, -1, new Margins(0))); vlc.add(gridScopes, new VerticalLayoutData(1, -1, new Margins(0)));
vlc.add(comboChartTypeLabel, new VerticalLayoutData(1, -1, new Margins(10,0,0,0))); vlc.add(comboChartTypeLabel, new VerticalLayoutData(1, -1, new Margins(10, 0, 0, 0)));
vlc.add(comboTopFilterKeyLabel, new VerticalLayoutData(1, -1, new Margins(0))); vlc.add(comboTopFilterKeyLabel, new VerticalLayoutData(1, -1, new Margins(0)));
vlc.add(showOthersLabel, new VerticalLayoutData(1, -1, new Margins(0))); vlc.add(showOthersLabel, new VerticalLayoutData(1, -1, new Margins(0)));
vlc.add(topNumberLabel, new VerticalLayoutData(1, -1, new Margins(0))); vlc.add(topNumberLabel, new VerticalLayoutData(1, -1, new Margins(0)));
@ -549,15 +568,15 @@ public class ActiveFiltersPanel extends SimpleContainer {
vlc.add(gridFilter, new VerticalLayoutData(1, 1, new Margins(0))); vlc.add(gridFilter, new VerticalLayoutData(1, 1, new Margins(0)));
FieldSet fieldSet = new FieldSet(); FieldSet fieldSet = new FieldSet();
//fieldSet.setHeight("360px"); // fieldSet.setHeight("360px");
fieldSet.setHeight("480px"); fieldSet.setHeight("480px");
fieldSet.setHeadingHtml("<b>Active Filters</b>"); fieldSet.setHeadingHtml("<b>Active Filters</b>");
fieldSet.setCollapsible(false); fieldSet.setCollapsible(false);
fieldSet.add(vlc); fieldSet.add(vlc);
add(fieldSet, new MarginData(0)); add(fieldSet, new MarginData(0));
comboChartTypeLabel.setVisible(false); //gridScopes.setVisible(true);
gridScopes.setVisible(false); //comboChartTypeLabel.setVisible(true);
comboTopFilterKeyLabel.setVisible(false); comboTopFilterKeyLabel.setVisible(false);
showOthersLabel.setVisible(false); showOthersLabel.setVisible(false);
topNumberLabel.setVisible(false); topNumberLabel.setVisible(false);
@ -685,6 +704,7 @@ public class ActiveFiltersPanel extends SimpleContainer {
} }
private void changeActiveFiltersForBasic() { private void changeActiveFiltersForBasic() {
Log.debug("ChangeActiveFiltersForBasic");
if (accountingStateData.getSeriesRequest() != null if (accountingStateData.getSeriesRequest() != null
&& accountingStateData.getSeriesRequest().getAccountingFilterDefinition() != null && accountingStateData && accountingStateData.getSeriesRequest().getAccountingFilterDefinition() != null && accountingStateData
.getSeriesRequest().getAccountingFilterDefinition() instanceof AccountingFilterBasic) { .getSeriesRequest().getAccountingFilterDefinition() instanceof AccountingFilterBasic) {
@ -704,14 +724,27 @@ public class ActiveFiltersPanel extends SimpleContainer {
scopes.add(contextData); scopes.add(contextData);
} }
storeScopes.clear(); storeScopes.clear();
storeScopes.setEnableFilters(false);
storeScopes.addAll(scopes); storeScopes.addAll(scopes);
storeScopes.commitChanges(); storeScopes.commitChanges();
Log.debug("ScopeFilterActive: "+accountingFilterBasic.getScopeFilterActive());
if (accountingFilterBasic.getScopeFilterActive() != null
&& !accountingFilterBasic.getScopeFilterActive().isEmpty()) {
scopeFilter.setValue(accountingFilterBasic.getScopeFilterActive());
scopeFilter.setActive(true, false);
storeScopes.setEnableFilters(true);
storeScopes.commitChanges();
} else {
scopeFilter.setValue(null);
scopeFilter.setActive(false, false);
}
smScopes.deselectAll(); smScopes.deselectAll();
if (accountingFilterBasic.getContext().getContexts() == null if (accountingFilterBasic.getContext().getContexts() != null
|| accountingFilterBasic.getContext().getContexts().isEmpty()) { &&!accountingFilterBasic.getContext().getContexts().isEmpty()) {
} else {
ArrayList<ContextData> selected = new ArrayList<>(); ArrayList<ContextData> selected = new ArrayList<>();
for (String c : accountingFilterBasic.getContext().getContexts()) { for (String c : accountingFilterBasic.getContext().getContexts()) {
for (ContextData contextData : storeScopes.getAll()) { for (ContextData contextData : storeScopes.getAll()) {
@ -723,15 +756,18 @@ public class ActiveFiltersPanel extends SimpleContainer {
} }
if (!selected.isEmpty()) { if (!selected.isEmpty()) {
if (selected.size() == storeScopes.getAll().size()) { if (selected.size() == storeScopes.getAll().size()) {
Log.debug("Select All Scope");
smScopes.selectAll(); smScopes.selectAll();
} else { } else {
Log.debug("Select Scope: "+selected);
smScopes.select(selected, false); smScopes.select(selected, false);
} }
} }
} }
smScopes.refresh(); smScopes.refresh();
} else { } else {
repopulatesContexts(); repopulatesContexts();
} }
@ -768,6 +804,7 @@ public class ActiveFiltersPanel extends SimpleContainer {
gridScopes.setVisible(true); gridScopes.setVisible(true);
labelScopesCol.setHeader("Scope"); labelScopesCol.setHeader("Scope");
gridScopes.getView().refresh(true); gridScopes.getView().refresh(true);
comboChartType.setValue(ChartType.Basic); comboChartType.setValue(ChartType.Basic);
comboTopFilterKey.reset(); comboTopFilterKey.reset();
comboTopFilterKeyLabel.setVisible(false); comboTopFilterKeyLabel.setVisible(false);
@ -781,6 +818,7 @@ public class ActiveFiltersPanel extends SimpleContainer {
} }
private void changeActiveFiltersForTop() { private void changeActiveFiltersForTop() {
Log.debug("ChangeActiveFiltersForTop");
if (accountingStateData.getSeriesRequest() != null if (accountingStateData.getSeriesRequest() != null
&& accountingStateData.getSeriesRequest().getAccountingFilterDefinition() != null && accountingStateData && accountingStateData.getSeriesRequest().getAccountingFilterDefinition() != null && accountingStateData
.getSeriesRequest().getAccountingFilterDefinition() instanceof AccountingFilterTop) { .getSeriesRequest().getAccountingFilterDefinition() instanceof AccountingFilterTop) {
@ -799,15 +837,30 @@ public class ActiveFiltersPanel extends SimpleContainer {
ContextData contextData = new ContextData(context); ContextData contextData = new ContextData(context);
scopes.add(contextData); scopes.add(contextData);
} }
storeScopes.clear(); storeScopes.clear();
storeScopes.setEnableFilters(false);
storeScopes.addAll(scopes); storeScopes.addAll(scopes);
storeScopes.commitChanges(); storeScopes.commitChanges();
Log.debug("ScopeFilterActive: "+accountingFilterTop.getScopeFilterActive());
if (accountingFilterTop.getScopeFilterActive() != null
&& !accountingFilterTop.getScopeFilterActive().isEmpty()) {
scopeFilter.setValue(accountingFilterTop.getScopeFilterActive());
scopeFilter.setActive(true, false);
storeScopes.setEnableFilters(true);
storeScopes.commitChanges();
} else {
scopeFilter.setValue(null);
scopeFilter.setActive(false, false);
}
smScopes.deselectAll(); smScopes.deselectAll();
if (accountingFilterTop.getContext().getContexts() == null if (accountingFilterTop.getContext().getContexts() != null &&
|| accountingFilterTop.getContext().getContexts().isEmpty()) { !accountingFilterTop.getContext().getContexts().isEmpty()) {
} else {
ArrayList<ContextData> selected = new ArrayList<>(); ArrayList<ContextData> selected = new ArrayList<>();
for (String c : accountingFilterTop.getContext().getContexts()) { for (String c : accountingFilterTop.getContext().getContexts()) {
for (ContextData contextData : storeScopes.getAll()) { for (ContextData contextData : storeScopes.getAll()) {
@ -819,15 +872,18 @@ public class ActiveFiltersPanel extends SimpleContainer {
} }
if (!selected.isEmpty()) { if (!selected.isEmpty()) {
if (selected.size() == storeScopes.getAll().size()) { if (selected.size() == storeScopes.getAll().size()) {
Log.debug("Select All Scope");
smScopes.selectAll(); smScopes.selectAll();
} else { } else {
Log.debug("Select Scope: "+selected);
smScopes.select(selected, false); smScopes.select(selected, false);
} }
} }
} }
smScopes.refresh(); smScopes.refresh();
} else { } else {
repopulatesContexts(); repopulatesContexts();
} }
@ -878,18 +934,22 @@ public class ActiveFiltersPanel extends SimpleContainer {
for (String context : contexts) { for (String context : contexts) {
scopes.add(new ContextData(context)); scopes.add(new ContextData(context));
} }
storeScopes.clear(); storeScopes.clear();
storeScopes.setEnableFilters(false);
storeScopes.addAll(scopes); storeScopes.addAll(scopes);
storeScopes.commitChanges(); storeScopes.commitChanges();
smScopes.deselectAll();
} else { } else {
storeScopes.clear(); storeScopes.clear();
storeScopes.setEnableFilters(false);
storeScopes.commitChanges(); storeScopes.commitChanges();
smScopes.deselectAll();
} }
scopeFilter.setValue(null);
scopeFilter.setActive(false, false);
smScopes.deselectAll();
comboTopFilterKey.reset(); comboTopFilterKey.reset();
showOthersToggle.reset(); showOthersToggle.reset();
showOthersNo.setValue(true); showOthersNo.setValue(true);
@ -904,6 +964,7 @@ public class ActiveFiltersPanel extends SimpleContainer {
gridScopes.setVisible(true); gridScopes.setVisible(true);
labelScopesCol.setHeader("Scope"); labelScopesCol.setHeader("Scope");
gridScopes.getView().refresh(true); gridScopes.getView().refresh(true);
comboChartType.setValue(ChartType.Top); comboChartType.setValue(ChartType.Top);
comboTopFilterKeyLabel.setVisible(true); comboTopFilterKeyLabel.setVisible(true);
showOthersLabel.setVisible(true); showOthersLabel.setVisible(true);
@ -924,6 +985,8 @@ public class ActiveFiltersPanel extends SimpleContainer {
private void resetContexts() { private void resetContexts() {
storeScopes.clear(); storeScopes.clear();
storeScopes.commitChanges(); storeScopes.commitChanges();
scopeFilter.setValue(null);
scopeFilter.setActive(false, false);
smScopes.deselectAll(); smScopes.deselectAll();
smScopes.refresh(); smScopes.refresh();
} }
@ -938,8 +1001,11 @@ public class ActiveFiltersPanel extends SimpleContainer {
storeScopes.clear(); storeScopes.clear();
storeScopes.addAll(contextList); storeScopes.addAll(contextList);
storeScopes.commitChanges(); storeScopes.commitChanges();
scopeFilter.setValue(null);
scopeFilter.setActive(false, false);
smScopes.selectAll(); smScopes.selectAll();
smScopes.refresh(); smScopes.refresh();
} }
/* /*
@ -1030,8 +1096,8 @@ public class ActiveFiltersPanel extends SimpleContainer {
return getActiveFiltersForBasic(); return getActiveFiltersForBasic();
case Top: case Top:
return getActiveFiltersForTop(); return getActiveFiltersForTop();
//case Spaces: // case Spaces:
// return getActiveFiltersForSpaces(); // return getActiveFiltersForSpaces();
default: default:
return null; return null;
@ -1058,8 +1124,16 @@ public class ActiveFiltersPanel extends SimpleContainer {
Log.debug("Context selected: " + context); Log.debug("Context selected: " + context);
String scopeFilterActive = null;
if (scopeFilter.isActive()) {
scopeFilterActive = (String) scopeFilter.getValue();
}
Log.debug("Scope Filter Active: " + scopeFilterActive);
if (storeFilter == null || storeFilter.size() <= 0) { if (storeFilter == null || storeFilter.size() <= 0) {
return new AccountingFilterBasic(context); return new AccountingFilterBasic(context, scopeFilterActive);
} else { } else {
List<AccountingFilter> filtersActives = storeFilter.getAll(); List<AccountingFilter> filtersActives = storeFilter.getAll();
ArrayList<AccountingFilter> filtersReady = new ArrayList<AccountingFilter>(); ArrayList<AccountingFilter> filtersReady = new ArrayList<AccountingFilter>();
@ -1070,9 +1144,9 @@ public class ActiveFiltersPanel extends SimpleContainer {
} }
if (filtersReady.size() > 0) { if (filtersReady.size() > 0) {
return new AccountingFilterBasic(context, filtersReady); return new AccountingFilterBasic(context, scopeFilterActive, filtersReady);
} else { } else {
return new AccountingFilterBasic(context); return new AccountingFilterBasic(context, scopeFilterActive);
} }
} }
@ -1090,15 +1164,21 @@ public class ActiveFiltersPanel extends SimpleContainer {
Log.debug("Context selected: " + context); Log.debug("Context selected: " + context);
String scopeFilterActive = null;
if (scopeFilter.isActive()) {
scopeFilterActive = (String) scopeFilter.getValue();
}
Log.debug("Scope Filter Active: " + scopeFilterActive);
Boolean showOthersValue = showOthersYes.getValue(); Boolean showOthersValue = showOthersYes.getValue();
Integer topN = topNumber.getCurrentValue(); Integer topN = topNumber.getCurrentValue();
FilterKey filterKey = comboTopFilterKey.getCurrentValue(); FilterKey filterKey = comboTopFilterKey.getCurrentValue();
if (filterKey == null) { if (filterKey == null) {
return new AccountingFilterTop(context, showOthersValue, topN); return new AccountingFilterTop(context, scopeFilterActive, showOthersValue, topN);
} else { } else {
if (storeFilter == null || storeFilter.size() <= 0) { if (storeFilter == null || storeFilter.size() <= 0) {
return new AccountingFilterTop(context, filterKey, null, showOthersValue, topN); return new AccountingFilterTop(context, scopeFilterActive, filterKey, null, showOthersValue, topN);
} else { } else {
List<AccountingFilter> filtersActives = storeFilter.getAll(); List<AccountingFilter> filtersActives = storeFilter.getAll();
ArrayList<AccountingFilter> filtersReady = new ArrayList<AccountingFilter>(); ArrayList<AccountingFilter> filtersReady = new ArrayList<AccountingFilter>();
@ -1108,9 +1188,10 @@ public class ActiveFiltersPanel extends SimpleContainer {
} }
} }
if (filtersReady.size() > 0) { if (filtersReady.size() > 0) {
return new AccountingFilterTop(context, filterKey, filtersReady, showOthersValue, topN); return new AccountingFilterTop(context, scopeFilterActive, filterKey, filtersReady, showOthersValue,
topN);
} else { } else {
return new AccountingFilterTop(context, filterKey, null, showOthersValue, topN); return new AccountingFilterTop(context, scopeFilterActive, filterKey, null, showOthersValue, topN);
} }
} }
@ -1119,32 +1200,26 @@ public class ActiveFiltersPanel extends SimpleContainer {
} }
/* /*
private AccountingFilterDefinition getActiveFiltersForSpaces() { * private AccountingFilterDefinition getActiveFiltersForSpaces() {
ArrayList<String> spacesSelected = new ArrayList<String>(); * ArrayList<String> spacesSelected = new ArrayList<String>(); if
if (storeSpaces != null && storeSpaces.size() > 0 && smSpaces != null) { * (storeSpaces != null && storeSpaces.size() > 0 && smSpaces != null) {
List<SpacesData> selected = smSpaces.getSelectedItems(); * List<SpacesData> selected = smSpaces.getSelectedItems(); for (SpacesData
for (SpacesData cd : selected) { * cd : selected) { spacesSelected.add(cd.getSpace()); } } Spaces spaces =
spacesSelected.add(cd.getSpace()); * new Spaces(spacesSelected);
} *
} * Log.debug("Spaces selected: " + spaces);
Spaces spaces = new Spaces(spacesSelected); *
* List<AccountingFilter> filtersActives = storeFilter.getAll();
Log.debug("Spaces selected: " + spaces); * ArrayList<AccountingFilter> filtersReady = new
* ArrayList<AccountingFilter>(); for (AccountingFilter filter :
List<AccountingFilter> filtersActives = storeFilter.getAll(); * filtersActives) { if (filter.getFilterValue() != null &&
ArrayList<AccountingFilter> filtersReady = new ArrayList<AccountingFilter>(); * !filter.getFilterValue().isEmpty()) { filtersReady.add(filter); } } if
for (AccountingFilter filter : filtersActives) { * (filtersReady.size() > 0) { return new AccountingFilterSpaces(spaces,
if (filter.getFilterValue() != null && !filter.getFilterValue().isEmpty()) { * filtersReady); } else { return new AccountingFilterSpaces(spaces, null);
filtersReady.add(filter); * }
} *
} * }
if (filtersReady.size() > 0) { */
return new AccountingFilterSpaces(spaces, filtersReady);
} else {
return new AccountingFilterSpaces(spaces, null);
}
}*/
private void addNewFilter(SelectEvent event) { private void addNewFilter(SelectEvent event) {
List<AccountingFilter> filtersSet = storeFilter.getAll(); List<AccountingFilter> filtersSet = storeFilter.getAll();
@ -1370,24 +1445,15 @@ public class ActiveFiltersPanel extends SimpleContainer {
forceLayout(); forceLayout();
break; break;
/* /*
case Spaces: * case Spaces: reconfigureSpaces(); comboScopeLabel.setVisible(false);
reconfigureSpaces(); * gridScopes.setVisible(true); labelScopesCol.setHeader("Space");
comboScopeLabel.setVisible(false); * gridScopes.getView().refresh(true); comboTopFilterKey.reset();
gridScopes.setVisible(true); * comboTopFilterKeyLabel.setVisible(false); showOthersToggle.reset();
labelScopesCol.setHeader("Space"); * showOthersNo.setValue(true); showOthersLabel.setVisible(false);
gridScopes.getView().refresh(true); * topNumber.reset(); topNumberLabel.setVisible(false);
comboTopFilterKey.reset(); * storeFilter.clear(); storeFilter.commitChanges(); seq = 0;
comboTopFilterKeyLabel.setVisible(false); * forceLayout(); break;
showOthersToggle.reset(); */
showOthersNo.setValue(true);
showOthersLabel.setVisible(false);
topNumber.reset();
topNumberLabel.setVisible(false);
storeFilter.clear();
storeFilter.commitChanges();
seq = 0;
forceLayout();
break;*/
default: default:
break; break;

View File

@ -68,7 +68,7 @@ public class AccountingClientStateData implements Serializable {
*/ */
public AccountingClientStateData(AccountingType accountingType, SeriesRequest seriesRequest, public AccountingClientStateData(AccountingType accountingType, SeriesRequest seriesRequest,
SeriesResponse seriesResponse, ArrayList<FilterKey> availableFilterKeys, Context availableContext, SeriesResponse seriesResponse, ArrayList<FilterKey> availableFilterKeys, Context availableContext,
Spaces availableSpaces, Boolean rootScope) { String scopeFilterActive, Spaces availableSpaces, Boolean rootScope) {
super(); super();
this.accountingType = accountingType; this.accountingType = accountingType;
this.seriesRequest = seriesRequest; this.seriesRequest = seriesRequest;

View File

@ -14,12 +14,14 @@ public class AccountingFilterBasic extends AccountingFilterDefinition implements
private static final long serialVersionUID = -6805006183397381154L; private static final long serialVersionUID = -6805006183397381154L;
private ArrayList<AccountingFilter> filters; private ArrayList<AccountingFilter> filters;
private Context context; private Context context;
private String scopeFilterActive;
public AccountingFilterBasic() { public AccountingFilterBasic() {
super(); super();
this.chartType = ChartType.Basic; this.chartType = ChartType.Basic;
filters = null; filters = null;
context = null; context = null;
scopeFilterActive = null;
} }
public AccountingFilterBasic(Context context) { public AccountingFilterBasic(Context context) {
@ -27,14 +29,40 @@ public class AccountingFilterBasic extends AccountingFilterDefinition implements
chartType = ChartType.Basic; chartType = ChartType.Basic;
this.filters = null; this.filters = null;
this.context = context; this.context = context;
this.scopeFilterActive = null;
} }
public AccountingFilterBasic(Context context,String scopeFilterActive) {
super();
chartType = ChartType.Basic;
this.filters = null;
this.context = context;
this.scopeFilterActive = scopeFilterActive;
}
public AccountingFilterBasic(Context context, ArrayList<AccountingFilter> filters) { public AccountingFilterBasic(Context context, ArrayList<AccountingFilter> filters) {
super(); super();
chartType = ChartType.Basic; chartType = ChartType.Basic;
this.filters = filters; this.filters = filters;
this.context = context; this.context = context;
this.scopeFilterActive = null;
}
public AccountingFilterBasic(Context context, String scopeFilterActive, ArrayList<AccountingFilter> filters) {
super();
chartType = ChartType.Basic;
this.filters = filters;
this.context = context;
this.scopeFilterActive = scopeFilterActive;
}
public String getScopeFilterActive() {
return scopeFilterActive;
}
public void setScopeFilterActive(String scopeFilterActive) {
this.scopeFilterActive = scopeFilterActive;
} }
public ArrayList<AccountingFilter> getFilters() { public ArrayList<AccountingFilter> getFilters() {
@ -55,7 +83,8 @@ public class AccountingFilterBasic extends AccountingFilterDefinition implements
@Override @Override
public String toString() { public String toString() {
return "AccountingFilterBasic [filters=" + filters + ", context=" + context + ", chartType=" + chartType + "]"; return "AccountingFilterBasic [filters=" + filters + ", context=" + context + ", scopeFilterActive="
+ scopeFilterActive + ", chartType=" + chartType + "]";
} }

View File

@ -13,6 +13,7 @@ public class AccountingFilterTop extends AccountingFilterDefinition implements S
private static final long serialVersionUID = -6805006183397381154L; private static final long serialVersionUID = -6805006183397381154L;
private Context context; private Context context;
private String scopeFilterActive;
private FilterKey filterKey; private FilterKey filterKey;
private Boolean showOthers; private Boolean showOthers;
private Integer topNumber; private Integer topNumber;
@ -22,6 +23,7 @@ public class AccountingFilterTop extends AccountingFilterDefinition implements S
super(); super();
this.chartType = ChartType.Top; this.chartType = ChartType.Top;
context = null; context = null;
scopeFilterActive = null;
showOthers = false; showOthers = false;
topNumber = 5; topNumber = 5;
filterKey = null; filterKey = null;
@ -33,6 +35,19 @@ public class AccountingFilterTop extends AccountingFilterDefinition implements S
super(); super();
this.chartType = ChartType.Top; this.chartType = ChartType.Top;
this.context = context; this.context = context;
this.scopeFilterActive = null;
this.showOthers = showOthers;
this.topNumber = topNumber;
filterKey = null;
filters = null;
}
public AccountingFilterTop(Context context, String scopeFilterActive, Boolean showOthers, Integer topNumber) {
super();
this.chartType = ChartType.Top;
this.context = context;
this.scopeFilterActive = scopeFilterActive;
this.showOthers = showOthers; this.showOthers = showOthers;
this.topNumber = topNumber; this.topNumber = topNumber;
filterKey = null; filterKey = null;
@ -45,11 +60,23 @@ public class AccountingFilterTop extends AccountingFilterDefinition implements S
super(); super();
chartType = ChartType.Top; chartType = ChartType.Top;
this.context = context; this.context = context;
this.scopeFilterActive = null;
this.filterKey = filterKey; this.filterKey = filterKey;
this.filters = filters; this.filters = filters;
this.showOthers = showOthers; this.showOthers = showOthers;
this.topNumber = topNumber; this.topNumber = topNumber;
}
public AccountingFilterTop(Context context, String scopeFilterActive, FilterKey filterKey,
ArrayList<AccountingFilter> filters, Boolean showOthers, Integer topNumber) {
super();
chartType = ChartType.Top;
this.context = context;
this.scopeFilterActive = scopeFilterActive;
this.filterKey = filterKey;
this.filters = filters;
this.showOthers = showOthers;
this.topNumber = topNumber;
} }
public Context getContext() { public Context getContext() {
@ -92,12 +119,20 @@ public class AccountingFilterTop extends AccountingFilterDefinition implements S
this.filters = filters; this.filters = filters;
} }
public String getScopeFilterActive() {
return scopeFilterActive;
}
public void setScopeFilterActive(String scopeFilterActive) {
this.scopeFilterActive = scopeFilterActive;
}
@Override @Override
public String toString() { public String toString() {
return "AccountingFilterTop [context=" + context + ", filterKey=" + filterKey + ", showOthers=" + showOthers return "AccountingFilterTop [context=" + context + ", scopeFilterActive=" + scopeFilterActive + ", filterKey="
+ ", topNumber=" + topNumber + ", filters=" + filters + ", chartType=" + chartType + "]"; + filterKey + ", showOthers=" + showOthers + ", topNumber=" + topNumber + ", filters=" + filters
+ ", chartType=" + chartType + "]";
} }
} }

View File

@ -21,8 +21,7 @@ public class SeriesRequest implements Serializable {
super(); super();
} }
public SeriesRequest(AccountingPeriod accountingPeriod, public SeriesRequest(AccountingPeriod accountingPeriod, AccountingFilterDefinition accountingFilterDefinition) {
AccountingFilterDefinition accountingFilterDefinition) {
super(); super();
this.accountingPeriod = accountingPeriod; this.accountingPeriod = accountingPeriod;
this.accountingFilterDefinition = accountingFilterDefinition; this.accountingFilterDefinition = accountingFilterDefinition;
@ -40,18 +39,14 @@ public class SeriesRequest implements Serializable {
return accountingFilterDefinition; return accountingFilterDefinition;
} }
public void setAccountingFilterDefinition( public void setAccountingFilterDefinition(AccountingFilterDefinition accountingFilterDefinition) {
AccountingFilterDefinition accountingFilterDefinition) {
this.accountingFilterDefinition = accountingFilterDefinition; this.accountingFilterDefinition = accountingFilterDefinition;
} }
@Override @Override
public String toString() { public String toString() {
return "SeriesRequest [accountingPeriod=" + accountingPeriod return "SeriesRequest [accountingPeriod=" + accountingPeriod + ", accountingFilterDefinition="
+ ", accountingFilterDefinition=" + accountingFilterDefinition + accountingFilterDefinition + "]";
+ "]";
} }
} }

View File

@ -55,11 +55,11 @@
<set-property name="log_ConsoleLogger" value="ENABLED" /> <set-property <set-property name="log_ConsoleLogger" value="ENABLED" /> <set-property
name="log_DivLogger" value="ENABLED" /> <set-property name="log_GWTLogger" name="log_DivLogger" value="ENABLED" /> <set-property name="log_GWTLogger"
value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED" value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED"
/> --> /> -->
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="ENABLED" <!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="ENABLED"
/> --> /> -->
<set-property name="log_ConsoleLogger" value="DISABLED" /> <set-property name="log_ConsoleLogger" value="DISABLED" />
<set-property name="log_DivLogger" value="DISABLED" /> <set-property name="log_DivLogger" value="DISABLED" />
<set-property name="log_GWTLogger" value="DISABLED" /> <set-property name="log_GWTLogger" value="DISABLED" />