Bug #1829 Reports Manager setting dev mode when session expires to any user
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/reports@121946 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
1ba9552677
commit
e92cda5e47
4
pom.xml
4
pom.xml
|
@ -85,6 +85,10 @@
|
||||||
<version>${gwtVersion}</version>
|
<version>${gwtVersion}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.gwtbootstrap</groupId>
|
||||||
|
<artifactId>gwt-bootstrap</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portlets.widgets</groupId>
|
<groupId>org.gcube.portlets.widgets</groupId>
|
||||||
<artifactId>session-checker</artifactId>
|
<artifactId>session-checker</artifactId>
|
||||||
|
|
|
@ -117,6 +117,7 @@ public class Presenter {
|
||||||
|
|
||||||
private UserBean currentUser;
|
private UserBean currentUser;
|
||||||
private String currentScope;
|
private String currentScope;
|
||||||
|
private String currentReportsStoreGatewayURL;
|
||||||
|
|
||||||
private ClientImage selectedImage;
|
private ClientImage selectedImage;
|
||||||
|
|
||||||
|
@ -329,9 +330,10 @@ public class Presenter {
|
||||||
public void onFailure(Throwable caught) {}
|
public void onFailure(Throwable caught) {}
|
||||||
|
|
||||||
public void onSuccess(final SessionInfo sessionInfo) {
|
public void onSuccess(final SessionInfo sessionInfo) {
|
||||||
currentUser = sessionInfo.getUsername();
|
currentUser = sessionInfo.getUserName();
|
||||||
currentScope = sessionInfo.getScope();
|
currentScope = sessionInfo.getScope();
|
||||||
isVME = sessionInfo.isVME();
|
isVME = sessionInfo.isVME();
|
||||||
|
currentReportsStoreGatewayURL = sessionInfo.getRsgEndpoint();
|
||||||
addTextToolBar(true);
|
addTextToolBar(true);
|
||||||
if (sessionInfo.isWorkflowDocument()) {
|
if (sessionInfo.isWorkflowDocument()) {
|
||||||
model.getModelService().getWorkflowDocumentFromDocumentLibrary(new AsyncCallback<Model>() {
|
model.getModelService().getWorkflowDocumentFromDocumentLibrary(new AsyncCallback<Model>() {
|
||||||
|
@ -382,7 +384,7 @@ public class Presenter {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showOpenOptions() {
|
public void showOpenOptions() {
|
||||||
wp.showOpenOptions(isVME);
|
wp.showOpenOptions(isVME, currentReportsStoreGatewayURL);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showLoading() {
|
public void showLoading() {
|
||||||
|
|
|
@ -9,6 +9,8 @@ import org.gcube.portlets.user.reportgenerator.client.uibinder.OpenOptions;
|
||||||
import org.gcube.portlets.user.reportgenerator.client.uibinder.OpenOptionsVME;
|
import org.gcube.portlets.user.reportgenerator.client.uibinder.OpenOptionsVME;
|
||||||
import org.gcube.portlets.user.reportgenerator.client.uibinder.ShowLoading;
|
import org.gcube.portlets.user.reportgenerator.client.uibinder.ShowLoading;
|
||||||
|
|
||||||
|
import com.github.gwtbootstrap.client.ui.AlertBlock;
|
||||||
|
import com.github.gwtbootstrap.client.ui.constants.AlertType;
|
||||||
import com.google.gwt.user.client.ui.Composite;
|
import com.google.gwt.user.client.ui.Composite;
|
||||||
import com.google.gwt.user.client.ui.FlowPanel;
|
import com.google.gwt.user.client.ui.FlowPanel;
|
||||||
import com.google.gwt.user.client.ui.Widget;
|
import com.google.gwt.user.client.ui.Widget;
|
||||||
|
@ -73,9 +75,13 @@ public class WorkspacePanel extends Composite {
|
||||||
//showOpenOptions();
|
//showOpenOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showOpenOptions(boolean isVME) {
|
public void showOpenOptions(boolean isVME, String rsgURL) {
|
||||||
if (isVME)
|
if (isVME) {
|
||||||
|
AlertBlock connectInfo = new AlertBlock(AlertType.SUCCESS);
|
||||||
|
connectInfo.setHeading("Succesfully connected to: " + rsgURL);
|
||||||
|
mainLayout.add(connectInfo);
|
||||||
mainLayout.add(new OpenOptionsVME(presenter));
|
mainLayout.add(new OpenOptionsVME(presenter));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
mainLayout.add(new OpenOptions(presenter));
|
mainLayout.add(new OpenOptions(presenter));
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ public class DownloadImageServlet extends HttpServlet {
|
||||||
_log.warn("Found scope null, setting infrastructure scope="+scope2Set);
|
_log.warn("Found scope null, setting infrastructure scope="+scope2Set);
|
||||||
}
|
}
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
user = ReportServiceImpl.getDevUser();
|
user = ReportServiceImpl.TEST_USER;
|
||||||
ScopeProvider.instance.set(ReportServiceImpl.TEST_SCOPE);
|
ScopeProvider.instance.set(ReportServiceImpl.TEST_SCOPE);
|
||||||
_log.warn("User is null in session, setting dev user = " + user);
|
_log.warn("User is null in session, setting dev user = " + user);
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,9 +134,6 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
|
||||||
|
|
||||||
private static final Logger _log = LoggerFactory.getLogger(ReportServiceImpl.class);
|
private static final Logger _log = LoggerFactory.getLogger(ReportServiceImpl.class);
|
||||||
|
|
||||||
public static final String TEST_SCOPE = "/gcube/devsec/devVRE";
|
|
||||||
//public static final String TEST_SCOPE = "/gcube/devNext/NextNext";
|
|
||||||
|
|
||||||
protected static final String IMAGE_SERVICE_URL = "reports/DownloadService";
|
protected static final String IMAGE_SERVICE_URL = "reports/DownloadService";
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -156,7 +153,8 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
|
||||||
public static final String RSG_WS_ADDRESS = "RSG-WS-ENDPOINT";
|
public static final String RSG_WS_ADDRESS = "RSG-WS-ENDPOINT";
|
||||||
|
|
||||||
private static final String REPORT_IMAGES_FOLDER = "Report Images";
|
private static final String REPORT_IMAGES_FOLDER = "Report Images";
|
||||||
|
public static final String TEST_USER = "test.user";
|
||||||
|
public static final String TEST_SCOPE = "/gcube/devsec/devVRE";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the WF DB Store
|
* the WF DB Store
|
||||||
|
@ -186,22 +184,26 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
|
||||||
|
|
||||||
String user = (String) this.getThreadLocalRequest().getSession().getAttribute(ScopeHelper.USERNAME_ATTRIBUTE);
|
String user = (String) this.getThreadLocalRequest().getSession().getAttribute(ScopeHelper.USERNAME_ATTRIBUTE);
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
user = getDevUser();
|
user = getDevelopmentUser();
|
||||||
this.getThreadLocalRequest().getSession().setAttribute(ScopeHelper.USERNAME_ATTRIBUTE, user);
|
if (user.compareTo(TEST_USER) != 0) {
|
||||||
SessionManager.getInstance().getASLSession(sessionID, user).setScope(TEST_SCOPE);
|
SessionManager.getInstance().getASLSession(sessionID, user).setScope(TEST_SCOPE);
|
||||||
String email = user+"@isti.cnr.it";
|
this.getThreadLocalRequest().getSession().setAttribute(ScopeHelper.USERNAME_ATTRIBUTE, user);
|
||||||
String fullName = "Massimiliano Assante";
|
String email = user+"@isti.cnr.it";
|
||||||
String thumbnailURL = "images/Avatar_default.png";
|
String fullName = "Andrea Rossi";
|
||||||
SessionManager.getInstance().getASLSession(sessionID, user).setUserEmailAddress(email);
|
String thumbnailURL = "images/Avatar_default.png";
|
||||||
SessionManager.getInstance().getASLSession(sessionID, user).setUserAvatarId(thumbnailURL);
|
SessionManager.getInstance().getASLSession(sessionID, user).setUserEmailAddress(email);
|
||||||
SessionManager.getInstance().getASLSession(sessionID, user).setUserFullName(fullName);
|
SessionManager.getInstance().getASLSession(sessionID, user).setUserAvatarId(thumbnailURL);
|
||||||
|
SessionManager.getInstance().getASLSession(sessionID, user).setUserFullName(fullName);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return SessionManager.getInstance().getASLSession(sessionID, user);
|
return SessionManager.getInstance().getASLSession(sessionID, user);
|
||||||
|
|
||||||
}
|
}
|
||||||
public static String getDevUser() {
|
public String getDevelopmentUser() {
|
||||||
return "massimiliano.assante";
|
String user = TEST_USER;
|
||||||
|
// user = "andrea.rossi";
|
||||||
|
return user;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -708,13 +710,15 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
|
||||||
|
|
||||||
private RSGAccessPoint getRSGWSAddress() {
|
private RSGAccessPoint getRSGWSAddress() {
|
||||||
RSGAccessPoint rsgAp = (RSGAccessPoint) this.getThreadLocalRequest().getSession().getAttribute(RSG_WS_ADDRESS);
|
RSGAccessPoint rsgAp = (RSGAccessPoint) this.getThreadLocalRequest().getSession().getAttribute(RSG_WS_ADDRESS);
|
||||||
_log.trace("getRSGWSAddress: " + rsgAp.getRestUrl());
|
if (rsgAp != null)
|
||||||
|
_log.trace("getRSGWSAddress: " + rsgAp.getRestUrl());
|
||||||
return rsgAp;
|
return rsgAp;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setRSGWSAddress(RSGAccessPoint rsgAp) {
|
private void setRSGWSAddress(RSGAccessPoint rsgAp) {
|
||||||
this.getThreadLocalRequest().getSession().setAttribute(RSG_WS_ADDRESS, rsgAp);
|
this.getThreadLocalRequest().getSession().setAttribute(RSG_WS_ADDRESS, rsgAp);
|
||||||
_log.trace("setting RSG WS address to " + rsgAp.getRestUrl());
|
if (rsgAp != null)
|
||||||
|
_log.trace("setting RSG WS address to " + rsgAp.getRestUrl());
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -889,8 +893,8 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
|
||||||
else if (imageItem.getFolderItemType()==FolderItemType.IMAGE_DOCUMENT){
|
else if (imageItem.getFolderItemType()==FolderItemType.IMAGE_DOCUMENT){
|
||||||
GCubeItem image = (GCubeItem)item;
|
GCubeItem image = (GCubeItem)item;
|
||||||
if (image.getMimeType().equals("image/tiff"))
|
if (image.getMimeType().equals("image/tiff"))
|
||||||
// image.getProperties().getProperties().get(NodeProperty.THUMBNAIL_DATA); //this is a problem
|
// image.getProperties().getProperties().get(NodeProperty.THUMBNAIL_DATA); //this is a problem
|
||||||
// else
|
// else
|
||||||
data = image.getData();
|
data = image.getData();
|
||||||
}
|
}
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
|
@ -1312,24 +1316,27 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
|
||||||
*/
|
*/
|
||||||
public SessionInfo getSessionInfo(String currentHost) {
|
public SessionInfo getSessionInfo(String currentHost) {
|
||||||
if (testWorkflow) {
|
if (testWorkflow) {
|
||||||
|
|
||||||
getASLSession().setAttribute(WfDocsLibrary.WORKFLOW_ID_ATTRIBUTE, "1");
|
getASLSession().setAttribute(WfDocsLibrary.WORKFLOW_ID_ATTRIBUTE, "1");
|
||||||
getASLSession().setAttribute(WfDocsLibrary.WORKFLOW_GIVEN_NAME, "TEST REPORT");
|
getASLSession().setAttribute(WfDocsLibrary.WORKFLOW_GIVEN_NAME, "TEST REPORT");
|
||||||
getASLSession().setAttribute(WfDocsLibrary.WORKFLOW_READONLY_ATTRIBUTE, true);
|
getASLSession().setAttribute(WfDocsLibrary.WORKFLOW_READONLY_ATTRIBUTE, true);
|
||||||
return new SessionInfo(getUserBean(), getVreName(), true, true, false);
|
return new SessionInfo(getUserBean(), getVreName(), true, true, false, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isVME = isReportsStoreGatewayAvailable();
|
boolean isVME = isReportsStoreGatewayAvailable();
|
||||||
|
|
||||||
if (getASLSession().getAttribute(WfDocsLibrary.WORKFLOW_ID_ATTRIBUTE) == null) {
|
if (getASLSession().getAttribute(WfDocsLibrary.WORKFLOW_ID_ATTRIBUTE) == null) {
|
||||||
_log.debug("WfDocsLibrary.WORKFLOW_ID_ATTRIBUTE is NULL: ");
|
_log.debug("WfDocsLibrary.WORKFLOW_ID_ATTRIBUTE is NULL: ");
|
||||||
return new SessionInfo(getUserBean(), getVreName(), false, false, isVME);
|
String rsgEndpoint = "";
|
||||||
|
if (getRSGWSAddress() != null)
|
||||||
|
rsgEndpoint = ((RSGAccessPoint) getRSGWSAddress()).getRestUrl();
|
||||||
|
return new SessionInfo(getUserBean(), getVreName(), false, false, isVME, rsgEndpoint);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_log.debug("FOUND WORKFLOW_ID_ATTRIBUTE ***** ");
|
_log.debug("FOUND WORKFLOW_ID_ATTRIBUTE ***** ");
|
||||||
//String workflowid = getASLSession().getAttribute(WfDocsLibrary.WORKFLOW_ID_ATTRIBUTE).toString();
|
//String workflowid = getASLSession().getAttribute(WfDocsLibrary.WORKFLOW_ID_ATTRIBUTE).toString();
|
||||||
Boolean canEdit = ! (Boolean) getASLSession().getAttribute(WfDocsLibrary.WORKFLOW_READONLY_ATTRIBUTE);
|
Boolean canEdit = ! (Boolean) getASLSession().getAttribute(WfDocsLibrary.WORKFLOW_READONLY_ATTRIBUTE);
|
||||||
return new SessionInfo(getUserBean(), getVreName(), true, canEdit, false);
|
return new SessionInfo(getUserBean(), getVreName(), true, canEdit, false, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1652,7 +1659,7 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
|
||||||
}
|
}
|
||||||
return rsgReadClient;
|
return rsgReadClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
private RsgWriteClient getRsgSecureClient() {
|
private RsgWriteClient getRsgSecureClient() {
|
||||||
RSGAccessPoint rsgWsAddr = getRSGWSAddress();
|
RSGAccessPoint rsgWsAddr = getRSGWSAddress();
|
||||||
if (rsgWriteClient == null) {
|
if (rsgWriteClient == null) {
|
||||||
|
|
|
@ -10,29 +10,27 @@ public class SessionInfo implements Serializable {
|
||||||
private Boolean isWorkflowDocument;
|
private Boolean isWorkflowDocument;
|
||||||
private Boolean isEditable;
|
private Boolean isEditable;
|
||||||
private Boolean isVME;
|
private Boolean isVME;
|
||||||
|
private String rsgEndpoint;
|
||||||
|
|
||||||
public SessionInfo() { }
|
public SessionInfo() { }
|
||||||
|
|
||||||
public SessionInfo(
|
public SessionInfo(UserBean user, String scope, Boolean isWorkflowDocument,
|
||||||
org.gcube.portlets.user.reportgenerator.shared.UserBean user,
|
Boolean isEditable, Boolean isVME, String rsgEndpoint) {
|
||||||
String scope, Boolean isWorkflowDocument, Boolean isEditable,
|
|
||||||
Boolean isVME) {
|
|
||||||
super();
|
super();
|
||||||
this.user = user;
|
this.user = user;
|
||||||
this.scope = scope;
|
this.scope = scope;
|
||||||
this.isWorkflowDocument = isWorkflowDocument;
|
this.isWorkflowDocument = isWorkflowDocument;
|
||||||
this.isEditable = isEditable;
|
this.isEditable = isEditable;
|
||||||
this.isVME = isVME;
|
this.isVME = isVME;
|
||||||
|
this.rsgEndpoint = rsgEndpoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public UserBean getUserName() {
|
||||||
|
|
||||||
public UserBean getUsername() {
|
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UserBean(UserBean userBean) {
|
public void setUser(UserBean user) {
|
||||||
this.user = userBean;
|
this.user = user;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getScope() {
|
public String getScope() {
|
||||||
|
@ -47,7 +45,7 @@ public class SessionInfo implements Serializable {
|
||||||
return isWorkflowDocument;
|
return isWorkflowDocument;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIsWorkflowDocument(Boolean isWorkflowDocument) {
|
public void setWorkflowDocument(Boolean isWorkflowDocument) {
|
||||||
this.isWorkflowDocument = isWorkflowDocument;
|
this.isWorkflowDocument = isWorkflowDocument;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,8 +53,8 @@ public class SessionInfo implements Serializable {
|
||||||
return isEditable;
|
return isEditable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEditable(Boolean canEdit) {
|
public void setEditable(Boolean isEditable) {
|
||||||
this.isEditable = canEdit;
|
this.isEditable = isEditable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean isVME() {
|
public Boolean isVME() {
|
||||||
|
@ -66,6 +64,82 @@ public class SessionInfo implements Serializable {
|
||||||
public void setIsVME(Boolean isVME) {
|
public void setIsVME(Boolean isVME) {
|
||||||
this.isVME = isVME;
|
this.isVME = isVME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getRsgEndpoint() {
|
||||||
|
return rsgEndpoint;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRsgEndpoint(String rsgEndpoint) {
|
||||||
|
this.rsgEndpoint = rsgEndpoint;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "SessionInfo [user=" + user + ", scope=" + scope
|
||||||
|
+ ", isWorkflowDocument=" + isWorkflowDocument
|
||||||
|
+ ", isEditable=" + isEditable + ", isVME=" + isVME
|
||||||
|
+ ", rsgEndpoint=" + rsgEndpoint + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
final int prime = 31;
|
||||||
|
int result = 1;
|
||||||
|
result = prime * result
|
||||||
|
+ ((isEditable == null) ? 0 : isEditable.hashCode());
|
||||||
|
result = prime * result + ((isVME == null) ? 0 : isVME.hashCode());
|
||||||
|
result = prime
|
||||||
|
* result
|
||||||
|
+ ((isWorkflowDocument == null) ? 0 : isWorkflowDocument
|
||||||
|
.hashCode());
|
||||||
|
result = prime * result
|
||||||
|
+ ((rsgEndpoint == null) ? 0 : rsgEndpoint.hashCode());
|
||||||
|
result = prime * result + ((scope == null) ? 0 : scope.hashCode());
|
||||||
|
result = prime * result + ((user == null) ? 0 : user.hashCode());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object obj) {
|
||||||
|
if (this == obj)
|
||||||
|
return true;
|
||||||
|
if (obj == null)
|
||||||
|
return false;
|
||||||
|
if (getClass() != obj.getClass())
|
||||||
|
return false;
|
||||||
|
SessionInfo other = (SessionInfo) obj;
|
||||||
|
if (isEditable == null) {
|
||||||
|
if (other.isEditable != null)
|
||||||
|
return false;
|
||||||
|
} else if (!isEditable.equals(other.isEditable))
|
||||||
|
return false;
|
||||||
|
if (isVME == null) {
|
||||||
|
if (other.isVME != null)
|
||||||
|
return false;
|
||||||
|
} else if (!isVME.equals(other.isVME))
|
||||||
|
return false;
|
||||||
|
if (isWorkflowDocument == null) {
|
||||||
|
if (other.isWorkflowDocument != null)
|
||||||
|
return false;
|
||||||
|
} else if (!isWorkflowDocument.equals(other.isWorkflowDocument))
|
||||||
|
return false;
|
||||||
|
if (rsgEndpoint == null) {
|
||||||
|
if (other.rsgEndpoint != null)
|
||||||
|
return false;
|
||||||
|
} else if (!rsgEndpoint.equals(other.rsgEndpoint))
|
||||||
|
return false;
|
||||||
|
if (scope == null) {
|
||||||
|
if (other.scope != null)
|
||||||
|
return false;
|
||||||
|
} else if (!scope.equals(other.scope))
|
||||||
|
return false;
|
||||||
|
if (user == null) {
|
||||||
|
if (other.user != null)
|
||||||
|
return false;
|
||||||
|
} else if (!user.equals(other.user))
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
<inherits name='org.gcube.portlets.widgets.fileupload.FileUpload' />
|
<inherits name='org.gcube.portlets.widgets.fileupload.FileUpload' />
|
||||||
<inherits name='org.gcube.portlets.widgets.exporter.Report_exporter_widget' />
|
<inherits name='org.gcube.portlets.widgets.exporter.Report_exporter_widget' />
|
||||||
<inherits name='org.gcube.portlets.widgets.sessionchecker.SessionChecker' />
|
<inherits name='org.gcube.portlets.widgets.sessionchecker.SessionChecker' />
|
||||||
|
<inherits name="com.github.gwtbootstrap.Bootstrap" />
|
||||||
<!-- Specify the app entry point class. -->
|
<!-- Specify the app entry point class. -->
|
||||||
<entry-point
|
<entry-point
|
||||||
class='org.gcube.portlets.user.reportgenerator.client.ReportGenerator' />
|
class='org.gcube.portlets.user.reportgenerator.client.ReportGenerator' />
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
package org.gcube.portlets.user.reportgenerator.test;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.reportgenerator.server.servlet.ReportServiceImpl;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
public class TestForDeploy {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testUserIsTestUser() {
|
||||||
|
ReportServiceImpl serviceImpl = new ReportServiceImpl();
|
||||||
|
String username = serviceImpl.getDevelopmentUser();
|
||||||
|
System.out.println("username for deploy is: " + username);
|
||||||
|
assertTrue(username.compareTo("test.user") == 0);
|
||||||
|
System.out.println("Test OK!");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Reference in New Issue