Added Chart
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@101556 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
dd7e16bd7b
commit
25830d5b39
|
@ -17,6 +17,7 @@ import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.file.CSVFileUploadSession;
|
import org.gcube.portlets.user.td.gwtservice.server.file.CSVFileUploadSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.file.CodelistMappingFileUploadSession;
|
import org.gcube.portlets.user.td.gwtservice.server.file.CodelistMappingFileUploadSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.trservice.TRTasksManager;
|
import org.gcube.portlets.user.td.gwtservice.server.trservice.TRTasksManager;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.Constants;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.chart.ChartTopRatingSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.chart.ChartTopRatingSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.codelisthelper.CodelistMappingSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.codelisthelper.CodelistMappingSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVExportSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVExportSession;
|
||||||
|
@ -82,17 +83,17 @@ 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!"); */
|
||||||
|
|
||||||
// Remove comment for Test
|
// Remove comment for Test
|
||||||
/*
|
|
||||||
* username = Constants.DEFAULT_USER; String scope =
|
username = Constants.DEFAULT_USER;
|
||||||
* Constants.DEFAULT_SCOPE;
|
String scope = Constants.DEFAULT_SCOPE;
|
||||||
*
|
|
||||||
* httpSession.setAttribute(ScopeHelper.USERNAME_ATTRIBUTE,
|
httpSession.setAttribute(ScopeHelper.USERNAME_ATTRIBUTE, username);
|
||||||
* username); session = SessionManager.getInstance().getASLSession(
|
session = SessionManager.getInstance().getASLSession(
|
||||||
* httpSession.getId(), username); session.setScope(scope);
|
httpSession.getId(), username);
|
||||||
*/
|
session.setScope(scope);
|
||||||
} else {
|
} else {
|
||||||
session = SessionManager.getInstance().getASLSession(
|
session = SessionManager.getInstance().getASLSession(
|
||||||
httpSession.getId(), username);
|
httpSession.getId(), username);
|
||||||
|
@ -1564,7 +1565,8 @@ public class SessionUtil {
|
||||||
ChartTopRatingSession chart = (ChartTopRatingSession) httpSession
|
ChartTopRatingSession chart = (ChartTopRatingSession) httpSession
|
||||||
.getAttribute(SessionConstants.CHART_TOPRATING_SESSION);
|
.getAttribute(SessionConstants.CHART_TOPRATING_SESSION);
|
||||||
if (chart != null) {
|
if (chart != null) {
|
||||||
httpSession.removeAttribute(SessionConstants.CHART_TOPRATING_SESSION);
|
httpSession
|
||||||
|
.removeAttribute(SessionConstants.CHART_TOPRATING_SESSION);
|
||||||
}
|
}
|
||||||
httpSession.setAttribute(SessionConstants.CHART_TOPRATING_SESSION,
|
httpSession.setAttribute(SessionConstants.CHART_TOPRATING_SESSION,
|
||||||
chartTopRatingSession);
|
chartTopRatingSession);
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,81 @@
|
||||||
|
package org.gcube.portlets.user.td.gwtservice.shared.chart;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.user.UserInfo;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||||
|
|
||||||
|
import com.google.web.bindery.event.shared.EventBus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chart Session
|
||||||
|
*
|
||||||
|
* @author giancarlo
|
||||||
|
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ChartSession implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -51554111438593905L;
|
||||||
|
private TRId trId;
|
||||||
|
private UserInfo userInfo;
|
||||||
|
private EventBus eventBus;
|
||||||
|
private ArrayList<ColumnData> columns;
|
||||||
|
|
||||||
|
public ChartSession() {
|
||||||
|
super();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public ChartSession(TRId trId, UserInfo userInfo, EventBus eventBus,
|
||||||
|
ArrayList<ColumnData> columns) {
|
||||||
|
super();
|
||||||
|
this.trId = trId;
|
||||||
|
this.userInfo = userInfo;
|
||||||
|
this.eventBus = eventBus;
|
||||||
|
this.columns = columns;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TRId getTrId() {
|
||||||
|
return trId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTrId(TRId trId) {
|
||||||
|
this.trId = trId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserInfo getUserInfo() {
|
||||||
|
return userInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserInfo(UserInfo userInfo) {
|
||||||
|
this.userInfo = userInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EventBus getEventBus() {
|
||||||
|
return eventBus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEventBus(EventBus eventBus) {
|
||||||
|
this.eventBus = eventBus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<ColumnData> getColumns() {
|
||||||
|
return columns;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColumns(ArrayList<ColumnData> columns) {
|
||||||
|
this.columns = columns;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ChartSession [trId=" + trId + ", userInfo=" + userInfo
|
||||||
|
+ ", eventBus=" + eventBus + ", columns=" + columns + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -43,47 +43,38 @@ public class ChartTopRatingSession implements Serializable {
|
||||||
this.valueOperation = valueOperation;
|
this.valueOperation = valueOperation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public TRId getTrId() {
|
public TRId getTrId() {
|
||||||
return trId;
|
return trId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setTrId(TRId trId) {
|
public void setTrId(TRId trId) {
|
||||||
this.trId = trId;
|
this.trId = trId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public ColumnData getColumn() {
|
public ColumnData getColumn() {
|
||||||
return column;
|
return column;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setColumn(ColumnData column) {
|
public void setColumn(ColumnData column) {
|
||||||
this.column = column;
|
this.column = column;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Integer getSampleSize() {
|
public Integer getSampleSize() {
|
||||||
return sampleSize;
|
return sampleSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setSampleSize(Integer sampleSize) {
|
public void setSampleSize(Integer sampleSize) {
|
||||||
this.sampleSize = sampleSize;
|
this.sampleSize = sampleSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String getValueOperation() {
|
public String getValueOperation() {
|
||||||
return valueOperation;
|
return valueOperation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setValueOperation(String valueOperation) {
|
public void setValueOperation(String valueOperation) {
|
||||||
this.valueOperation = valueOperation;
|
this.valueOperation = valueOperation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ChartTopRatingSession [trId=" + trId + ", column=" + column
|
return "ChartTopRatingSession [trId=" + trId + ", column=" + column
|
||||||
|
@ -95,4 +86,7 @@ public class ChartTopRatingSession implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,13 +45,16 @@ import org.slf4j.LoggerFactory;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class BackgroundOperationMonitorCreator {
|
public class BackgroundOperationMonitorCreator {
|
||||||
protected static Logger logger = LoggerFactory
|
private static final String SECURITY_EXCEPTION_RIGHTS = "Security exception, you don't have the required rights!";
|
||||||
|
|
||||||
|
private static Logger logger = LoggerFactory
|
||||||
.getLogger(BackgroundOperationMonitorCreator.class);
|
.getLogger(BackgroundOperationMonitorCreator.class);
|
||||||
|
|
||||||
protected static SimpleDateFormat sdf = new SimpleDateFormat(
|
private static SimpleDateFormat sdf = new SimpleDateFormat(
|
||||||
"yyyy-MM-dd HH:mm");
|
"yyyy-MM-dd HH:mm");
|
||||||
|
|
||||||
protected static SimpleDateFormat sdfDate = new SimpleDateFormat(
|
@SuppressWarnings("unused")
|
||||||
|
private static SimpleDateFormat sdfDate = new SimpleDateFormat(
|
||||||
"yyyy-MM-dd");
|
"yyyy-MM-dd");
|
||||||
|
|
||||||
protected HttpSession session;
|
protected HttpSession session;
|
||||||
|
@ -345,7 +348,7 @@ public class BackgroundOperationMonitorCreator {
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(
|
throw new TDGWTServiceException(
|
||||||
"Security exception, you haven't rights!");
|
SECURITY_EXCEPTION_RIGHTS);
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException("Error in Client Library Request: "
|
throw new TDGWTServiceException("Error in Client Library Request: "
|
||||||
|
|
|
@ -46,13 +46,16 @@ import org.slf4j.LoggerFactory;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class OperationMonitorCreator {
|
public class OperationMonitorCreator {
|
||||||
protected static Logger logger = LoggerFactory
|
private static final String SECURITY_EXCEPTION_RIGHTS = "Security exception, you don't have the required rights!";
|
||||||
|
|
||||||
|
private static Logger logger = LoggerFactory
|
||||||
.getLogger(OperationMonitorCreator.class);
|
.getLogger(OperationMonitorCreator.class);
|
||||||
|
|
||||||
protected static SimpleDateFormat sdf = new SimpleDateFormat(
|
private static SimpleDateFormat sdf = new SimpleDateFormat(
|
||||||
"yyyy-MM-dd HH:mm");
|
"yyyy-MM-dd HH:mm");
|
||||||
|
|
||||||
protected static SimpleDateFormat sdfDate = new SimpleDateFormat(
|
@SuppressWarnings("unused")
|
||||||
|
private static SimpleDateFormat sdfDate = new SimpleDateFormat(
|
||||||
"yyyy-MM-dd");
|
"yyyy-MM-dd");
|
||||||
|
|
||||||
protected HttpSession session;
|
protected HttpSession session;
|
||||||
|
@ -399,7 +402,7 @@ public class OperationMonitorCreator {
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(
|
throw new TDGWTServiceException(
|
||||||
"Security exception, you haven't rights!");
|
SECURITY_EXCEPTION_RIGHTS);
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException("Error Retrieving Basic Data: "
|
throw new TDGWTServiceException("Error Retrieving Basic Data: "
|
||||||
|
|
Loading…
Reference in New Issue