Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@96225 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
2373bfb31b
commit
60b4f62ab6
|
@ -12,6 +12,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVImportMonitor;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVImportSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVImportSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVRowError;
|
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVRowError;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTServiceException;
|
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTServiceException;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.extract.ExtractCodelistMonitor;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.extract.ExtractCodelistSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.file.FileUploadMonitor;
|
import org.gcube.portlets.user.td.gwtservice.shared.file.FileUploadMonitor;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.file.HeaderPresence;
|
import org.gcube.portlets.user.td.gwtservice.shared.file.HeaderPresence;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.history.OpHistory;
|
import org.gcube.portlets.user.td.gwtservice.shared.history.OpHistory;
|
||||||
|
@ -228,9 +230,9 @@ public interface TDGWTService extends RemoteService {
|
||||||
*/
|
*/
|
||||||
public TaskResubmitMonitor getTaskResubmitMonitor()
|
public TaskResubmitMonitor getTaskResubmitMonitor()
|
||||||
throws TDGWTServiceException;
|
throws TDGWTServiceException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resubmit task
|
* Resubmit task
|
||||||
*
|
*
|
||||||
* @param taskResubmitSession
|
* @param taskResubmitSession
|
||||||
* @throws TDGWTServiceException
|
* @throws TDGWTServiceException
|
||||||
|
@ -238,7 +240,6 @@ public interface TDGWTService extends RemoteService {
|
||||||
public void startTaskResubmit(TaskResubmitSession taskResubmitSession)
|
public void startTaskResubmit(TaskResubmitSession taskResubmitSession)
|
||||||
throws TDGWTServiceException;
|
throws TDGWTServiceException;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Operation Monitor during the resume task
|
* Get Operation Monitor during the resume task
|
||||||
*
|
*
|
||||||
|
@ -247,9 +248,9 @@ public interface TDGWTService extends RemoteService {
|
||||||
*/
|
*/
|
||||||
public TaskResumeMonitor getTaskResumeMonitor()
|
public TaskResumeMonitor getTaskResumeMonitor()
|
||||||
throws TDGWTServiceException;
|
throws TDGWTServiceException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resume task
|
* Resume task
|
||||||
*
|
*
|
||||||
* @param taskResumeSession
|
* @param taskResumeSession
|
||||||
* @throws TDGWTServiceException
|
* @throws TDGWTServiceException
|
||||||
|
@ -257,8 +258,6 @@ public interface TDGWTService extends RemoteService {
|
||||||
public void startTaskResume(TaskResumeSession taskResumeSession)
|
public void startTaskResume(TaskResumeSession taskResumeSession)
|
||||||
throws TDGWTServiceException;
|
throws TDGWTServiceException;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Validations
|
// Validations
|
||||||
/**
|
/**
|
||||||
* Returns validations contained in the tasks
|
* Returns validations contained in the tasks
|
||||||
|
@ -884,4 +883,22 @@ public interface TDGWTService extends RemoteService {
|
||||||
*/
|
*/
|
||||||
OpHistory getLastOperationInfo(TRId trId) throws TDGWTServiceException;
|
OpHistory getLastOperationInfo(TRId trId) throws TDGWTServiceException;
|
||||||
|
|
||||||
|
// Extract Codelist
|
||||||
|
/**
|
||||||
|
* Get Operation Monitor during the Extract Codelist operation
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* @throws TDGWTServiceException
|
||||||
|
*/
|
||||||
|
public ExtractCodelistMonitor getExtractCodelistMonitor() throws TDGWTServiceException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Start Extract Codelist and invokes the client library
|
||||||
|
*
|
||||||
|
* @param extractCodelistSession
|
||||||
|
* @throws TDGWTServiceException
|
||||||
|
*/
|
||||||
|
public void startExtractCodelist(ExtractCodelistSession extractCodelistSession)
|
||||||
|
throws TDGWTServiceException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVExportSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVImportMonitor;
|
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVImportMonitor;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVImportSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVImportSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVRowError;
|
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVRowError;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.extract.ExtractCodelistMonitor;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.extract.ExtractCodelistSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.file.FileUploadMonitor;
|
import org.gcube.portlets.user.td.gwtservice.shared.file.FileUploadMonitor;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.file.HeaderPresence;
|
import org.gcube.portlets.user.td.gwtservice.shared.file.HeaderPresence;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.history.OpHistory;
|
import org.gcube.portlets.user.td.gwtservice.shared.history.OpHistory;
|
||||||
|
@ -207,7 +209,7 @@ public interface TDGWTServiceAsync {
|
||||||
void startDeleteColumn(DeleteColumnSession deleteColumnSession,AsyncCallback<Void> callback);
|
void startDeleteColumn(DeleteColumnSession deleteColumnSession,AsyncCallback<Void> callback);
|
||||||
void getLabelColumnMonitor(AsyncCallback<LabelColumnMonitor> callback);
|
void getLabelColumnMonitor(AsyncCallback<LabelColumnMonitor> callback);
|
||||||
void startLabelColumn(LabelColumnSession labelColumnSession,AsyncCallback<Void> callback);
|
void startLabelColumn(LabelColumnSession labelColumnSession,AsyncCallback<Void> callback);
|
||||||
|
|
||||||
//BatchReplace Operation
|
//BatchReplace Operation
|
||||||
void getOccurrencesForBatchReplace(OccurrencesForReplaceBatchColumnSession occurrencesForReplaceBatchColumnSession, AsyncCallback<ArrayList<Occurrences>> callback);
|
void getOccurrencesForBatchReplace(OccurrencesForReplaceBatchColumnSession occurrencesForReplaceBatchColumnSession, AsyncCallback<ArrayList<Occurrences>> callback);
|
||||||
void getReplaceBatchColumnMonitor(AsyncCallback<ReplaceBatchColumnMonitor> callback);
|
void getReplaceBatchColumnMonitor(AsyncCallback<ReplaceBatchColumnMonitor> callback);
|
||||||
|
@ -232,4 +234,8 @@ public interface TDGWTServiceAsync {
|
||||||
void getLastOperationInfo(AsyncCallback<OpHistory> callback);
|
void getLastOperationInfo(AsyncCallback<OpHistory> callback);
|
||||||
void getLastOperationInfo(TRId trId, AsyncCallback<OpHistory> callback);
|
void getLastOperationInfo(TRId trId, AsyncCallback<OpHistory> callback);
|
||||||
|
|
||||||
|
//Extract Codelist
|
||||||
|
void getExtractCodelistMonitor(AsyncCallback<ExtractCodelistMonitor> callback);
|
||||||
|
void startExtractCodelist(ExtractCodelistSession extractCodelistSession, AsyncCallback<Void> callback);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,9 +66,6 @@ import org.slf4j.LoggerFactory;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class SessionUtil {
|
public class SessionUtil {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected static Logger logger = LoggerFactory.getLogger(SessionUtil.class);
|
protected static Logger logger = LoggerFactory.getLogger(SessionUtil.class);
|
||||||
|
|
||||||
|
@ -78,15 +75,15 @@ public class SessionUtil {
|
||||||
ASLSession session;
|
ASLSession session;
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
logger.warn("no user found in session, using test one");
|
logger.warn("no user found in session, using test one");
|
||||||
throw new TDGWTSessionExpiredException("Session Expired!");
|
/*throw new TDGWTSessionExpiredException("Session Expired!");*/
|
||||||
/*
|
|
||||||
username = Constants.DEFAULT_USER;
|
username = Constants.DEFAULT_USER;
|
||||||
String scope = Constants.DEFAULT_SCOPE;
|
String scope = Constants.DEFAULT_SCOPE;
|
||||||
|
|
||||||
httpSession.setAttribute(ScopeHelper.USERNAME_ATTRIBUTE, username);
|
httpSession.setAttribute(ScopeHelper.USERNAME_ATTRIBUTE, username);
|
||||||
session = SessionManager.getInstance().getASLSession(
|
session = SessionManager.getInstance().getASLSession(
|
||||||
httpSession.getId(), username);
|
httpSession.getId(), username);
|
||||||
session.setScope(scope);*/
|
session.setScope(scope);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
session = SessionManager.getInstance().getASLSession(
|
session = SessionManager.getInstance().getASLSession(
|
||||||
|
|
|
@ -119,6 +119,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVParserConfiguration;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVRowError;
|
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVRowError;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTServiceException;
|
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTServiceException;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.extract.ExtractCodelistMonitor;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.extract.ExtractCodelistSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.file.FileUploadMonitor;
|
import org.gcube.portlets.user.td.gwtservice.shared.file.FileUploadMonitor;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.file.FileUploadState;
|
import org.gcube.portlets.user.td.gwtservice.shared.file.FileUploadState;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.file.HeaderPresence;
|
import org.gcube.portlets.user.td.gwtservice.shared.file.HeaderPresence;
|
||||||
|
@ -7095,4 +7097,19 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ExtractCodelistMonitor getExtractCodelistMonitor()
|
||||||
|
throws TDGWTServiceException {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void startExtractCodelist(
|
||||||
|
ExtractCodelistSession extractCodelistSession)
|
||||||
|
throws TDGWTServiceException {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -17,15 +18,17 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||||
public class ExtractCodelistSession implements Serializable {
|
public class ExtractCodelistSession implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -2537172740573310646L;
|
private static final long serialVersionUID = -2537172740573310646L;
|
||||||
|
|
||||||
|
protected TabResource tabResource;
|
||||||
protected ArrayList<ColumnData> sourceColumns;
|
protected ArrayList<ColumnData> sourceColumns;
|
||||||
protected ArrayList<ExtractCodelistTargetColumn> targetColumns;
|
protected ArrayList<ExtractCodelistTargetColumn> targetColumns;
|
||||||
|
|
||||||
public ExtractCodelistSession() {
|
public ExtractCodelistSession() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExtractCodelistSession(ArrayList<ColumnData> sourceColumns,
|
public ExtractCodelistSession(TabResource tabResource,ArrayList<ColumnData> sourceColumns,
|
||||||
ArrayList<ExtractCodelistTargetColumn> targetColumns) {
|
ArrayList<ExtractCodelistTargetColumn> targetColumns) {
|
||||||
|
this.tabResource= tabResource;
|
||||||
this.sourceColumns = sourceColumns;
|
this.sourceColumns = sourceColumns;
|
||||||
this.targetColumns = targetColumns;
|
this.targetColumns = targetColumns;
|
||||||
}
|
}
|
||||||
|
@ -47,10 +50,22 @@ public class ExtractCodelistSession implements Serializable {
|
||||||
this.targetColumns = targetColumns;
|
this.targetColumns = targetColumns;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public TabResource getTabResource() {
|
||||||
public String toString() {
|
return tabResource;
|
||||||
return "ExtractCodelistSession [sourceColumns=" + sourceColumns
|
|
||||||
+ ", targetColumns=" + targetColumns + "]";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setTabResource(TabResource tabResource) {
|
||||||
|
this.tabResource = tabResource;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ExtractCodelistSession [tabResource=" + tabResource
|
||||||
|
+ ", sourceColumns=" + sourceColumns + ", targetColumns="
|
||||||
|
+ targetColumns + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,10 +33,10 @@ public class ExtractCodelistTargetColumn implements Serializable {
|
||||||
this.codelist = codelist;
|
this.codelist = codelist;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExtractCodelistTargetColumn(ColumnData sourceColumn, DefNewColumn defColumn) {
|
public ExtractCodelistTargetColumn(ColumnData sourceColumn, DefNewColumn defNewColumn) {
|
||||||
this.newColumn = true;
|
this.newColumn = true;
|
||||||
this.sourceColumn = sourceColumn;
|
this.sourceColumn = sourceColumn;
|
||||||
this.defColumn=defColumn;
|
this.defColumn=defNewColumn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isNewColumn() {
|
public boolean isNewColumn() {
|
||||||
|
|
Loading…
Reference in New Issue