Updated OperationMonitor

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@99233 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-08-07 16:27:11 +00:00
parent 1142dbe5cc
commit 29584b59c7
5 changed files with 125 additions and 236 deletions

View File

@ -65,63 +65,36 @@ package org.gcube.portlets.user.td.gwtservice.shared;
*/
public enum UIOperationsId {
CSVImport("100"),
CSVExport("101"),
CLONE("102"),
SDMXCodelistImport("200"),
SDMXCodelistExport("201"),
SDMXDatasetImport("202"),
SDMXDatasetExport("203"),
JSONImport("300"),
JSONExport("301"),
ValidateCodelist("1000"),
ValidateDataset("1001"),
ChangeTableType("1002"),
CreateDatasetView("1003"),
RemoveColumn("1004"),
AddColumn("1005"),
ColumnNameAdd("1006"),
ColumnNameRemove("1007"),
TableNameAdd("1008"),
TableNameRemove("1009"),
ChangeToAnnotationColumn("2000"),
ChangeToAttributeColumn("2001"),
ChangeToMeasureColumn("2002"),
ChangeToCodeColumn("2003"),
ChangeToCodeName("2004"),
ChangeToCodeDescription("2005"),
ChangeToDimensionColumn("2006"),
ChangeToTimeDimensionColumn("2007"),
ModifyTuplesValuesByExpression("3000"),
ModifyTuplesValuesById("3001"),
ModifyTuplesValuesByValidation("3002"),
AddRow("3004"),
Denormalize("3005"),
GroupBy("3006"),
RemoveDuplicateTuples("3007"),
Normalize("3008"),
ReplaceColumnByExpression("3101"),
ReplaceById("3102"),
FilterByExpression("3201"),
RemoveRowById("3202"),
Union("3208"),
CodelistValidation("5001"),
ColumnTypeCastCheck("5002"),
DuplicateTupleValidation("5003"),
DuplicateValuesInColumnValidator("5004"),
PeriodFormatCheck("5005"),
ExpressionValidation("5006"),
AmbiguousExternalReferenceCheck("5007"),
DimensionColumnValidator("5010"),
ValidateTable("5011"),
ValidateDataSet("5012"),
ValidateGeneric("5013"),
StatisticalOperation("10001"),
ExportToStatisticalOperation("10002"),
ImportFromStatistical("10003"),
ExtractCodelist("11001"),
GuessCodelist("11002"),
CodelistMappingImport("12001");
CSVImport("CSV Import"),
CSVExport("CSV Export"),
Clone("Clone"),
SDMXImport("SDMX Import"),
SDMXExport("SDMX Export"),
JSONImport("JSON Import"),
JSONExport("JSON Export"),
ChangeTableType("Change Table Type"),
DeleteColumn("Delete Column"),
AddColumn("Add Column"),
ChangeColumnLabel("Change Column Label"),
ChangeColumnType("Change Column Type"),
EditRow("Edit Row"),
DeleteRow("Delete Row"),
Denormalize("Denormalize"),
GroupBy("Group By"),
MergeColumn("Merge Column"),
SplitColumn("Split Column"),
Normalize("Normalize"),
ReplaceValue("Replace Value"),
ReplaceBatch("Replace Batch"),
Filter("Filter"),
Union("Union"),
DuplicateTuples("Duplicate Tuples"),
ExtractCodelist("Extract Codelist"),
CodelistMappingImport("Codelist Mapping Import"),
ResumeTask("Resume Task"),
ResubmitTask("ResubmitTask"),
RollBack("Roll Back"),
ApplyTemplate("Apply Template");
/**
* @param text

View File

@ -1,94 +0,0 @@
/**
*
*/
package org.gcube.portlets.user.td.gwtservice.shared.csv;
import java.io.Serializable;
import org.gcube.portlets.user.td.gwtservice.shared.task.State;
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata.TabExportMetadata;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class CSVExportMonitor implements Serializable {
private static final long serialVersionUID = -5998841163159590481L;
protected float progress;
protected State status;
protected String statusDescription;
protected Throwable error;
protected TRId trId;
protected TabExportMetadata trExportMetadata;
public float getProgress(){
return progress;
};
public State getStatus(){
return status;
}
public String getStatusDescription(){
return statusDescription;
}
public void setProgress(float progress) {
this.progress = progress;
}
public void setStatus(State status) {
this.status = status;
}
public void setStatus(int status) {
this.status = State.values()[status];
}
public TabExportMetadata getTrExportMetadata() {
return trExportMetadata;
}
public void setTrExportMetadata(TabExportMetadata trExportMetadata) {
this.trExportMetadata = trExportMetadata;
}
public void setStatusDescription(String statusDescription) {
this.statusDescription = statusDescription;
}
public Throwable getError() {
return error;
}
public void setError(Throwable error) {
this.error = error;
}
public TRId getTrId() {
return trId;
}
public void setTrId(TRId trId) {
this.trId = trId;
}
@Override
public String toString() {
return "CSVExportMonitor [progress=" + progress + ", status=" + status
+ ", statusDescription=" + statusDescription + ", error="
+ error + ", trId=" + trId + ", trExportMetadata="
+ trExportMetadata + "]";
}
}

View File

@ -1,81 +0,0 @@
/**
*
*/
package org.gcube.portlets.user.td.gwtservice.shared.csv;
import java.io.Serializable;
import org.gcube.portlets.user.td.gwtservice.shared.task.State;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class CSVImportMonitor implements Serializable {
private static final long serialVersionUID = -5998841163159590481L;
protected float progress;
protected State status;
protected String statusDescription;
protected Throwable error;
protected TRId trId;
public float getProgress(){
return progress;
};
public State getStatus(){
return status;
}
public String getStatusDescription(){
return statusDescription;
}
public void setProgress(float progress) {
this.progress = progress;
}
public void setStatus(State status) {
this.status = status;
}
public void setStatus(int status) {
this.status = State.values()[status];
}
public void setStatusDescription(String statusDescription) {
this.statusDescription = statusDescription;
}
public Throwable getError() {
return error;
}
public void setError(Throwable error) {
this.error = error;
}
public TRId getTrId() {
return trId;
}
public void setTrId(TRId trId) {
this.trId = trId;
}
@Override
public String toString() {
return "CSVImportMonitor [progress=" + progress + ", status=" + status
+ ", statusDescription=" + statusDescription + ", error="
+ error + ", trId=" + trId + "]";
}
}

View File

@ -0,0 +1,78 @@
package org.gcube.portlets.user.td.gwtservice.shared.task;
import java.io.Serializable;
import org.gcube.data.analysis.tabulardata.service.operation.Task;
import org.gcube.portlets.user.td.gwtservice.shared.UIOperationsId;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
/**
*
* @author "Giancarlo Panichi"
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TaskWrapper implements Serializable {
private static final long serialVersionUID = -3291738536272488206L;
private Task task;
private UIOperationsId operationId;
private TRId trId;
public TaskWrapper(){
}
public TaskWrapper(Task task, UIOperationsId operationId, TRId trId) {
super();
this.task = task;
this.operationId = operationId;
this.trId = trId;
}
public Task getTask() {
return task;
}
public void setTask(Task task) {
this.task = task;
}
public UIOperationsId getOperationId() {
return operationId;
}
public void setOperationId(UIOperationsId operationId) {
this.operationId = operationId;
}
public TRId getTrId() {
return trId;
}
public void setTrId(TRId trId) {
this.trId = trId;
}
@Override
public String toString() {
return "TaskWrapper [task=" + task + ", operationId=" + operationId
+ ", trId=" + trId + "]";
}
}

View File

@ -14,7 +14,8 @@ public class CloneTabularResourceSession implements Serializable {
private static final long serialVersionUID = -1896235499708614266L;
protected TRId trId;
private TRId trId;
private TRId trIdClone;
public CloneTabularResourceSession(){
@ -22,6 +23,7 @@ public class CloneTabularResourceSession implements Serializable {
public CloneTabularResourceSession(TRId trId){
this.trId=trId;
this.trIdClone=null;
}
public TRId getTrId() {
@ -32,9 +34,20 @@ public class CloneTabularResourceSession implements Serializable {
this.trId = trId;
}
@Override
public String toString() {
return "CloneTabularResourceSession [trId=" + trId + "]";
public TRId getTrIdClone() {
return trIdClone;
}
public void setTrIdClone(TRId trIdClone) {
this.trIdClone = trIdClone;
}
@Override
public String toString() {
return "CloneTabularResourceSession [trId=" + trId + ", trIdClone="
+ trIdClone + "]";
}
}