migrating to shub
This commit is contained in:
parent
7280ed8138
commit
40c24e29c5
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue