migrating to shub

This commit is contained in:
Francesco Mangiacrapa 2020-04-09 17:58:17 +02:00
parent 7280ed8138
commit 40c24e29c5
1 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,48 @@
package org.gcube.portlets.user.workspaceexplorerapp.server.workspace;
import java.io.Serializable;
import javax.servlet.http.HttpSession;
import org.gcube.common.storagehubwrapper.server.tohl.Workspace;
/**
* The Class WorkspaceInstance.
*
* @author Francesco Mangiacrapa at ISTI-CNR Pisa (Italy)
* Apr 9, 2020
*/
public class WorkspaceInstance implements Serializable{
/**
*
*/
private static final long serialVersionUID = 5109673588015843212L;
private HttpSession httpSession;
private Workspace workspace;
/**
* Instantiates a new workspace instance.
*
* @param session the session
*/
public WorkspaceInstance(HttpSession session) {
this.httpSession = session;
}
/**
* Gets the.
*
* @return the workspace
* @throws Exception the exception
*/
public Workspace get() throws Exception{
if(workspace==null)
workspace = WsUtil.getWorkspace(httpSession);
return workspace;
}
}