2014-08-28 13:18:30 +02:00
|
|
|
package org.gcube.portlets.user.td.monitorwidget.client.details;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.monitor.OperationMonitor;
|
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.task.ValidationsTasksMetadata;
|
2014-08-28 20:12:34 +02:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.task.WorkerState;
|
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.task.WorkerStateParser;
|
2014-11-21 18:55:08 +01:00
|
|
|
import org.gcube.portlets.user.td.monitorwidget.client.custom.ExtendedTreeGridView;
|
2014-08-28 13:18:30 +02:00
|
|
|
import org.gcube.portlets.user.td.monitorwidget.client.details.tree.MonitorBaseDto;
|
|
|
|
import org.gcube.portlets.user.td.monitorwidget.client.details.tree.MonitorFolderDto;
|
|
|
|
import org.gcube.portlets.user.td.monitorwidget.client.details.tree.MonitorTreeDataGenerator;
|
|
|
|
import org.gcube.portlets.user.td.monitorwidget.client.details.tree.MonitorValidationJobSDto;
|
|
|
|
import org.gcube.portlets.user.td.monitorwidget.client.resources.ResourceBundle;
|
2014-10-21 17:07:35 +02:00
|
|
|
import org.gcube.portlets.user.td.monitorwidget.client.utils.UtilsGXT3;
|
2014-08-28 13:18:30 +02:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
|
|
|
|
|
|
|
import com.allen_sauer.gwt.log.client.Log;
|
|
|
|
import com.google.gwt.cell.client.AbstractCell;
|
|
|
|
import com.google.gwt.cell.client.Cell.Context;
|
|
|
|
import com.google.gwt.resources.client.ImageResource;
|
|
|
|
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
|
|
|
|
import com.google.gwt.safehtml.shared.SafeHtmlUtils;
|
|
|
|
import com.google.web.bindery.event.shared.EventBus;
|
|
|
|
import com.sencha.gxt.cell.core.client.ProgressBarCell;
|
|
|
|
import com.sencha.gxt.core.client.ToStringValueProvider;
|
|
|
|
import com.sencha.gxt.core.client.ValueProvider;
|
2014-08-28 20:12:34 +02:00
|
|
|
import com.sencha.gxt.core.client.util.Margins;
|
2014-08-28 13:18:30 +02:00
|
|
|
import com.sencha.gxt.data.shared.IconProvider;
|
|
|
|
import com.sencha.gxt.data.shared.ModelKeyProvider;
|
|
|
|
import com.sencha.gxt.data.shared.TreeStore;
|
|
|
|
import com.sencha.gxt.widget.core.client.FramedPanel;
|
|
|
|
import com.sencha.gxt.widget.core.client.button.TextButton;
|
|
|
|
import com.sencha.gxt.widget.core.client.container.MarginData;
|
|
|
|
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
|
|
|
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
|
|
|
|
import com.sencha.gxt.widget.core.client.event.CollapseItemEvent;
|
|
|
|
import com.sencha.gxt.widget.core.client.event.CollapseItemEvent.CollapseItemHandler;
|
|
|
|
import com.sencha.gxt.widget.core.client.event.ExpandItemEvent;
|
|
|
|
import com.sencha.gxt.widget.core.client.event.ExpandItemEvent.ExpandItemHandler;
|
|
|
|
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
|
|
|
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
|
|
|
import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
|
|
|
|
import com.sencha.gxt.widget.core.client.grid.ColumnModel;
|
|
|
|
import com.sencha.gxt.widget.core.client.menu.Menu;
|
|
|
|
import com.sencha.gxt.widget.core.client.menu.MenuItem;
|
|
|
|
import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
|
|
|
import com.sencha.gxt.widget.core.client.treegrid.TreeGrid;
|
|
|
|
|
|
|
|
public class MonitorDetailPanel extends FramedPanel {
|
2014-08-29 19:31:26 +02:00
|
|
|
protected static final String WIDTH = "618px";
|
2014-08-28 20:12:34 +02:00
|
|
|
protected static final String HEIGHT = "256px";
|
2014-08-29 19:31:26 +02:00
|
|
|
protected static final String GRIDHEIGHT = "332px";
|
2014-10-01 18:31:33 +02:00
|
|
|
|
2014-08-29 19:31:26 +02:00
|
|
|
protected static final int CC1WIDTH = 168;
|
|
|
|
protected static final int CC2WIDTH = 100;
|
|
|
|
protected static final int CC3WIDTH = 140;
|
|
|
|
protected static final int CC4WIDTH = 100;
|
2014-08-29 12:07:13 +02:00
|
|
|
|
2014-08-28 13:18:30 +02:00
|
|
|
protected MonitorDetailPanel thisPanel;
|
|
|
|
|
|
|
|
protected Menu contextMenu;
|
|
|
|
protected MenuItem resumeItem;
|
|
|
|
protected MenuItem resolveItem;
|
|
|
|
|
|
|
|
protected TRId trId;
|
|
|
|
protected VerticalLayoutContainer con;
|
|
|
|
protected EventBus eventBus;
|
|
|
|
protected ValidationsTasksMetadata validationsTasksMetadata;
|
|
|
|
|
|
|
|
protected MonitorTreeDataGenerator gen;
|
|
|
|
protected TreeStore<MonitorBaseDto> store;
|
|
|
|
protected TreeGrid<MonitorBaseDto> tree;
|
|
|
|
private OperationMonitor operationMonitor;
|
2014-11-21 18:55:08 +01:00
|
|
|
private ExtendedTreeGridView<MonitorBaseDto> gridView;
|
2014-08-28 13:18:30 +02:00
|
|
|
|
|
|
|
class KeyProvider implements ModelKeyProvider<MonitorBaseDto> {
|
|
|
|
@Override
|
|
|
|
public String getKey(MonitorBaseDto item) {
|
|
|
|
return (item instanceof MonitorFolderDto ? "f-" : "v-")
|
|
|
|
+ item.getId();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param eventBus
|
|
|
|
*/
|
|
|
|
public MonitorDetailPanel(EventBus eventBus) {
|
|
|
|
super();
|
|
|
|
Log.debug("MonitorDetailPanel");
|
|
|
|
this.eventBus = eventBus;
|
|
|
|
this.thisPanel = this;
|
|
|
|
forceLayoutOnResize = true;
|
|
|
|
init();
|
2014-08-29 12:07:13 +02:00
|
|
|
create();
|
2014-08-28 13:18:30 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
protected void init() {
|
|
|
|
setWidth(WIDTH);
|
|
|
|
setHeight(HEIGHT);
|
|
|
|
setHeaderVisible(false);
|
|
|
|
setBodyBorder(false);
|
2014-10-01 18:31:33 +02:00
|
|
|
|
2014-08-28 13:18:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
protected void create() {
|
|
|
|
con = new VerticalLayoutContainer();
|
2014-08-29 19:31:26 +02:00
|
|
|
// con.setScrollMode(ScrollMode.AUTO);
|
2014-08-28 13:18:30 +02:00
|
|
|
|
|
|
|
store = new TreeStore<MonitorBaseDto>(new KeyProvider());
|
2014-08-29 19:31:26 +02:00
|
|
|
|
2014-08-29 12:07:13 +02:00
|
|
|
addChildrensToStore();
|
2014-08-29 19:31:26 +02:00
|
|
|
|
2014-08-28 13:18:30 +02:00
|
|
|
ColumnConfig<MonitorBaseDto, String> cc1 = new ColumnConfig<MonitorBaseDto, String>(
|
2014-10-01 18:31:33 +02:00
|
|
|
new ToStringValueProvider<MonitorBaseDto>("task"), CC1WIDTH,
|
|
|
|
"Task");
|
2014-08-28 13:18:30 +02:00
|
|
|
cc1.setHeader("Task");
|
|
|
|
cc1.setCell(new AbstractCell<String>() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void render(Context context, String value, SafeHtmlBuilder sb) {
|
|
|
|
sb.appendHtmlConstant("<span title='"
|
2014-10-21 17:07:35 +02:00
|
|
|
+ SafeHtmlUtils.htmlEscape(value) + "'>"
|
|
|
|
+ SafeHtmlUtils.htmlEscape(value) + "</span>");
|
2014-08-28 13:18:30 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2014-08-28 20:12:34 +02:00
|
|
|
ColumnConfig<MonitorBaseDto, String> cc2 = new ColumnConfig<MonitorBaseDto, String>(
|
|
|
|
new ValueProvider<MonitorBaseDto, String>() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getValue(MonitorBaseDto object) {
|
|
|
|
String state = null;
|
|
|
|
if (object instanceof MonitorValidationJobSDto) {
|
2014-08-29 19:31:26 +02:00
|
|
|
state = ((MonitorValidationJobSDto) object)
|
|
|
|
.getWorkerState().toString();
|
|
|
|
|
2014-08-28 20:12:34 +02:00
|
|
|
}
|
|
|
|
if (object instanceof MonitorFolderDto) {
|
|
|
|
state = ((MonitorFolderDto) object).getState();
|
2014-08-29 19:31:26 +02:00
|
|
|
}
|
2014-08-28 20:12:34 +02:00
|
|
|
return state;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void setValue(MonitorBaseDto object, String value) {
|
|
|
|
if (object instanceof MonitorValidationJobSDto) {
|
2014-08-29 19:31:26 +02:00
|
|
|
WorkerState workerState = WorkerStateParser.parse(value);
|
2014-08-28 20:12:34 +02:00
|
|
|
((MonitorValidationJobSDto) object)
|
|
|
|
.setWorkerState(workerState);
|
2014-08-29 19:31:26 +02:00
|
|
|
|
2014-08-28 20:12:34 +02:00
|
|
|
}
|
|
|
|
if (object instanceof MonitorFolderDto) {
|
2014-08-29 19:31:26 +02:00
|
|
|
((MonitorFolderDto) object).setState(value);
|
2014-08-28 20:12:34 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getPath() {
|
|
|
|
return "status";
|
|
|
|
}
|
2014-08-29 19:31:26 +02:00
|
|
|
}, CC2WIDTH, "Status");
|
2014-08-28 20:12:34 +02:00
|
|
|
cc2.setHeader("Status");
|
2014-08-29 19:31:26 +02:00
|
|
|
|
|
|
|
ColumnConfig<MonitorBaseDto, String> cc3 = new ColumnConfig<MonitorBaseDto, String>(
|
|
|
|
new ValueProvider<MonitorBaseDto, String>() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getValue(MonitorBaseDto object) {
|
|
|
|
String state = null;
|
|
|
|
if (object instanceof MonitorValidationJobSDto) {
|
|
|
|
state = ((MonitorValidationJobSDto) object).getHumanReadableStatus();
|
|
|
|
}
|
|
|
|
if (object instanceof MonitorFolderDto) {
|
2014-10-01 18:31:33 +02:00
|
|
|
state = ((MonitorFolderDto) object)
|
|
|
|
.getHumanReadableStatus();
|
2014-08-29 19:31:26 +02:00
|
|
|
}
|
|
|
|
return state;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void setValue(MonitorBaseDto object, String value) {
|
|
|
|
if (object instanceof MonitorValidationJobSDto) {
|
|
|
|
((MonitorValidationJobSDto) object)
|
|
|
|
.setHumanReadableStatus(value);
|
|
|
|
|
|
|
|
}
|
|
|
|
if (object instanceof MonitorFolderDto) {
|
2014-10-01 18:31:33 +02:00
|
|
|
((MonitorFolderDto) object)
|
|
|
|
.setHumanReadableStatus(value);
|
2014-08-29 19:31:26 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getPath() {
|
|
|
|
return "humanreadablestatus";
|
|
|
|
}
|
|
|
|
}, CC3WIDTH, "Human Readble");
|
|
|
|
cc3.setHeader("Human Readble");
|
|
|
|
|
|
|
|
ColumnConfig<MonitorBaseDto, Double> cc4 = new ColumnConfig<MonitorBaseDto, Double>(
|
2014-08-28 13:18:30 +02:00
|
|
|
new ValueProvider<MonitorBaseDto, Double>() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public Double getValue(MonitorBaseDto object) {
|
|
|
|
Double d = null;
|
|
|
|
if (object instanceof MonitorValidationJobSDto) {
|
|
|
|
Float f = ((MonitorValidationJobSDto) object).getProgress();
|
|
|
|
d = new Double(f);
|
|
|
|
}
|
2014-08-28 20:12:34 +02:00
|
|
|
if (object instanceof MonitorFolderDto) {
|
|
|
|
Float f = ((MonitorFolderDto) object).getProgress();
|
|
|
|
d = new Double(f);
|
|
|
|
}
|
2014-08-29 19:31:26 +02:00
|
|
|
|
2014-08-28 13:18:30 +02:00
|
|
|
return d;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void setValue(MonitorBaseDto object, Double value) {
|
|
|
|
if (object instanceof MonitorValidationJobSDto) {
|
|
|
|
((MonitorValidationJobSDto) object)
|
|
|
|
.setProgress(value.floatValue());
|
|
|
|
}
|
2014-08-28 20:12:34 +02:00
|
|
|
if (object instanceof MonitorFolderDto) {
|
2014-08-29 19:31:26 +02:00
|
|
|
((MonitorFolderDto) object).setProgress(value
|
|
|
|
.floatValue());
|
2014-08-28 20:12:34 +02:00
|
|
|
}
|
2014-08-28 13:18:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getPath() {
|
|
|
|
return "progress";
|
|
|
|
}
|
2014-08-29 19:31:26 +02:00
|
|
|
}, CC4WIDTH, "Progress");
|
|
|
|
cc4.setHeader("Progress");
|
2014-08-28 13:18:30 +02:00
|
|
|
|
|
|
|
ProgressBarCell progress = new ProgressBarCell() {
|
|
|
|
@Override
|
|
|
|
public boolean handlesSelection() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
progress.setProgressText("{0}% Complete");
|
2014-08-28 20:12:34 +02:00
|
|
|
progress.setWidth(110);
|
2014-08-28 13:18:30 +02:00
|
|
|
|
2014-08-29 19:31:26 +02:00
|
|
|
cc4.setCell(progress);
|
|
|
|
|
2014-08-28 13:18:30 +02:00
|
|
|
List<ColumnConfig<MonitorBaseDto, ?>> l = new ArrayList<ColumnConfig<MonitorBaseDto, ?>>();
|
|
|
|
l.add(cc1);
|
|
|
|
l.add(cc2);
|
2014-08-28 20:12:34 +02:00
|
|
|
l.add(cc3);
|
2014-08-29 19:31:26 +02:00
|
|
|
l.add(cc4);
|
2014-08-28 13:18:30 +02:00
|
|
|
ColumnModel<MonitorBaseDto> cm = new ColumnModel<MonitorBaseDto>(l);
|
2014-11-21 18:55:08 +01:00
|
|
|
|
|
|
|
gridView=new ExtendedTreeGridView<MonitorBaseDto>();
|
|
|
|
|
2014-08-28 13:18:30 +02:00
|
|
|
tree = new TreeGrid<MonitorBaseDto>(store, cm, cc1);
|
2014-11-21 18:55:08 +01:00
|
|
|
tree.setView(gridView);
|
2014-08-28 13:18:30 +02:00
|
|
|
tree.getView().setAutoFill(true);
|
|
|
|
tree.setBorders(false);
|
|
|
|
tree.setLoadMask(true);
|
|
|
|
tree.setColumnResize(true);
|
|
|
|
tree.getView().setAutoExpandColumn(cc1);
|
2014-08-28 20:12:34 +02:00
|
|
|
tree.setHeight(GRIDHEIGHT);
|
2014-08-28 13:18:30 +02:00
|
|
|
|
|
|
|
IconProvider<MonitorBaseDto> iconProvider = new IconProvider<MonitorBaseDto>() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ImageResource getIcon(MonitorBaseDto model) {
|
|
|
|
ImageResource img = null;
|
|
|
|
if (model instanceof MonitorFolderDto) {
|
|
|
|
String type = ((MonitorFolderDto) model).getType();
|
|
|
|
if (type.compareTo("job") == 0) {
|
|
|
|
img = ResourceBundle.INSTANCE.cog();
|
|
|
|
} else {
|
|
|
|
if (type.compareTo("task") == 0) {
|
|
|
|
img = ResourceBundle.INSTANCE.basket();
|
|
|
|
} else {
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
img = ResourceBundle.INSTANCE.tableValidation();
|
|
|
|
}
|
|
|
|
return img;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
tree.setIconProvider(iconProvider);
|
|
|
|
|
|
|
|
tree.addExpandHandler(new ExpandItemHandler<MonitorBaseDto>() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onExpand(ExpandItemEvent<MonitorBaseDto> event) {
|
|
|
|
forceLayout();
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
tree.addCollapseHandler(new CollapseItemHandler<MonitorBaseDto>() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onCollapse(CollapseItemEvent<MonitorBaseDto> event) {
|
|
|
|
forceLayout();
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2014-08-29 19:31:26 +02:00
|
|
|
// createContextMenu();
|
2014-08-28 13:18:30 +02:00
|
|
|
|
|
|
|
ToolBar toolBar = new ToolBar();
|
|
|
|
|
|
|
|
TextButton btnExpandAll = new TextButton();
|
|
|
|
btnExpandAll.setIcon(ResourceBundle.INSTANCE.magnifierZoomIn());
|
|
|
|
btnExpandAll.setToolTip("Expand All");
|
|
|
|
btnExpandAll.addSelectHandler(new SelectHandler() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onSelect(SelectEvent event) {
|
|
|
|
tree.expandAll();
|
|
|
|
forceLayout();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
toolBar.add(btnExpandAll);
|
|
|
|
|
|
|
|
TextButton btnCollapseAll = new TextButton();
|
|
|
|
btnCollapseAll.setIcon(ResourceBundle.INSTANCE.magnifierZoomOut());
|
|
|
|
btnCollapseAll.setToolTip("Collapse All");
|
|
|
|
btnCollapseAll.addSelectHandler(new SelectHandler() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onSelect(SelectEvent event) {
|
|
|
|
tree.collapseAll();
|
|
|
|
forceLayout();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
toolBar.add(btnCollapseAll);
|
|
|
|
|
2014-08-29 19:31:26 +02:00
|
|
|
con.add(toolBar, new VerticalLayoutData(1, -1, new Margins(0)));
|
2014-08-28 20:12:34 +02:00
|
|
|
con.add(tree, new VerticalLayoutData(1, -1, new Margins(0)));
|
2014-08-28 13:18:30 +02:00
|
|
|
|
|
|
|
add(con, new MarginData(0));
|
2014-08-29 19:31:26 +02:00
|
|
|
|
2014-08-29 12:07:13 +02:00
|
|
|
tree.expandAll();
|
2014-08-28 13:18:30 +02:00
|
|
|
forceLayout();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
protected void requestOperationOnKey(Context context) {
|
|
|
|
String key = (String) context.getKey();
|
|
|
|
@SuppressWarnings("unused")
|
|
|
|
MonitorBaseDto d = store.findModelWithKey(key);
|
|
|
|
|
2014-08-29 12:07:13 +02:00
|
|
|
}
|
2014-08-28 13:18:30 +02:00
|
|
|
|
|
|
|
public void update(OperationMonitor operationMonitor) {
|
|
|
|
this.operationMonitor = operationMonitor;
|
2014-10-21 17:07:35 +02:00
|
|
|
|
2014-08-29 12:07:13 +02:00
|
|
|
store.clear();
|
2014-08-29 19:31:26 +02:00
|
|
|
store.commitChanges();
|
2014-10-21 17:07:35 +02:00
|
|
|
//con.remove(tree);
|
|
|
|
//con.add(tree, new VerticalLayoutData(1, -1, new Margins(0)));
|
2014-08-29 12:07:13 +02:00
|
|
|
addChildrensToStore();
|
|
|
|
store.commitChanges();
|
|
|
|
tree.expandAll();
|
2014-10-21 17:07:35 +02:00
|
|
|
|
2014-08-29 12:07:13 +02:00
|
|
|
forceLayout();
|
2014-08-28 13:18:30 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-08-29 12:07:13 +02:00
|
|
|
private void addChildrensToStore() {
|
2014-09-09 19:17:22 +02:00
|
|
|
gen = new MonitorTreeDataGenerator();
|
2014-08-29 19:31:26 +02:00
|
|
|
|
2014-09-09 19:17:22 +02:00
|
|
|
MonitorFolderDto root = gen.getRootNoTask(operationMonitor);
|
2014-10-21 17:07:35 +02:00
|
|
|
if (root != null) {
|
|
|
|
for (MonitorBaseDto base : root.getChildrens()) {
|
|
|
|
try {
|
|
|
|
store.add(base);
|
|
|
|
if (base instanceof MonitorFolderDto) {
|
|
|
|
processFolder(store, (MonitorFolderDto) base);
|
|
|
|
}
|
|
|
|
} catch (Throwable e) {
|
|
|
|
Log.error(e.getLocalizedMessage());
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
|
2014-08-29 12:07:13 +02:00
|
|
|
}
|
2014-10-21 17:07:35 +02:00
|
|
|
|
|
|
|
} else {
|
|
|
|
Log.error("Error generating the task informations");
|
|
|
|
UtilsGXT3.alert("Error", "Error generating task informations");
|
2014-08-29 12:07:13 +02:00
|
|
|
}
|
|
|
|
}
|
2014-08-28 13:18:30 +02:00
|
|
|
|
|
|
|
private void processFolder(TreeStore<MonitorBaseDto> store,
|
|
|
|
MonitorFolderDto folder) {
|
2014-10-21 17:07:35 +02:00
|
|
|
|
2014-08-28 13:18:30 +02:00
|
|
|
for (MonitorBaseDto child : folder.getChildrens()) {
|
2014-10-01 18:31:33 +02:00
|
|
|
try {
|
|
|
|
store.add(folder, child);
|
2014-10-21 17:07:35 +02:00
|
|
|
if (child instanceof MonitorFolderDto) {
|
|
|
|
processFolder(store, (MonitorFolderDto) child);
|
|
|
|
}
|
|
|
|
|
2014-10-01 18:31:33 +02:00
|
|
|
} catch (Throwable e) {
|
|
|
|
Log.error(e.getLocalizedMessage());
|
2014-10-21 17:07:35 +02:00
|
|
|
e.printStackTrace();
|
2014-08-28 13:18:30 +02:00
|
|
|
}
|
|
|
|
}
|
2014-10-21 17:07:35 +02:00
|
|
|
|
2014-08-28 13:18:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|