added test Scope

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/reports@71424 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2013-03-15 13:19:27 +00:00
parent cb2450d2ab
commit 209d730380
3 changed files with 20 additions and 22 deletions

View File

@ -571,12 +571,7 @@ public class Headerbar extends Composite{
} }
}; };
Command importFimes = new Command() {
public void execute() {
presenter.showImportPopup();
}
};
// Create the file menu // Create the file menu
@ -584,12 +579,9 @@ public class Headerbar extends Composite{
fileMenu.setAnimationEnabled(true); fileMenu.setAnimationEnabled(true);
MenuItem toReturn = new MenuItem("File", fileMenu); MenuItem toReturn = new MenuItem("File", fileMenu);
fileMenu.addItem("Open template...", openTemplate);
// fileMenu.addSeparator();
// fileMenu.addItem("Open saved Report", getNullCommand());
fileMenu.addSeparator();
fileMenu.addItem("Open Report", openReport); fileMenu.addItem("Open Report", openReport);
fileMenu.addItem("Open template...", openTemplate);
fileMenu.addSeparator();
fileMenu.addItem("Save", saveReport); fileMenu.addItem("Save", saveReport);
fileMenu.addItem("Save As ..", saveReportAs); fileMenu.addItem("Save As ..", saveReportAs);
fileMenu.addSeparator(); fileMenu.addSeparator();

View File

@ -250,12 +250,6 @@ public class Presenter {
//importDlg = new FimesFileUploadWindow(eventBus); //importDlg = new FimesFileUploadWindow(eventBus);
} }
public void showImportPopup() {
// importDlg.setVisible(true);
// importDlg.show();
}
public void showLastChangesPopup() { public void showLastChangesPopup() {
} }
@ -287,12 +281,12 @@ public class Presenter {
boolean toReturn = model.removeCitation(citekey); boolean toReturn = model.removeCitation(citekey);
if (toReturn) { //if has been removed from the model if (toReturn) { //if has been removed from the model
if (model.getCurrentPage() == model.getTotalPages()) { //if the view is displaying the bibliography, need to refresh it if (model.getCurrentPage() == model.getTotalPages()) { //if the view is displaying the bibliography, need to refresh it
GWT.log("SEI in BIBLIO");
seekSection(model.getTotalPages()); seekSection(model.getTotalPages());
} }
} }
return toReturn; return toReturn;
} }
/** /**
* look if a section with a specific metadata (that indicate sit is a biblio section) * look if a section with a specific metadata (that indicate sit is a biblio section)
* exists in the current report model: * exists in the current report model:
@ -438,7 +432,15 @@ public class Presenter {
//persists the change in the session //persists the change in the session
model.storeInSession(); model.storeInSession();
} }
/**
* when export is done this method is called
* @param filePath
* @param itemName
* @param type
*/
public void showExportSaveOptions(final String filePath, final String itemName, final TypeExporter type) {
}
/** /**
* just clean the page * just clean the page
*/ */

View File

@ -101,6 +101,10 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
* EXPORT DIR * EXPORT DIR
*/ */
private static final String EXPORTS_DIR = "EXPORTS"; private static final String EXPORTS_DIR = "EXPORTS";
/**
* EXPORT DIR
*/
private static final String TEST_SCOPE = "/gcube/devsec/devVRE";
/** /**
* *
@ -175,7 +179,7 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
if (user == null) { if (user == null) {
user = "massimiliano.assante"; user = "massimiliano.assante";
this.getThreadLocalRequest().getSession().setAttribute(ScopeHelper.USERNAME_ATTRIBUTE, user); this.getThreadLocalRequest().getSession().setAttribute(ScopeHelper.USERNAME_ATTRIBUTE, user);
SessionManager.getInstance().getASLSession(sessionID, user).setScope("/gcube/devsec"); SessionManager.getInstance().getASLSession(sessionID, user).setScope(TEST_SCOPE);
} }
if (!withinPortal) if (!withinPortal)
@ -573,7 +577,7 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
*/ */
public String getVreName() { public String getVreName() {
if (! ReportConstants.isDeployed) { if (! ReportConstants.isDeployed) {
return "d4science.research-infrastructures.eu/FARM/FCPPS"; return TEST_SCOPE;
} else { } else {
HttpServletRequest httpServletRequest = this.getThreadLocalRequest(); HttpServletRequest httpServletRequest = this.getThreadLocalRequest();
HttpSession session = httpServletRequest.getSession(); HttpSession session = httpServletRequest.getSession();
@ -582,7 +586,7 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
String scope = d4session.getScopeName(); String scope = d4session.getScopeName();
if(scope == null) { if(scope == null) {
scope = "gcube/devsec"; scope = TEST_SCOPE;
_log.warn("ASL Session scope NULL set to: " + scope); _log.warn("ASL Session scope NULL set to: " + scope);
} }