Class WorkspaceHistory
- java.lang.Object
-
- de.unirostock.sems.cbarchive.web.dataholder.WorkspaceHistory
-
public class WorkspaceHistory extends Object
-
-
Constructor Summary
Constructors Constructor Description WorkspaceHistory()
WorkspaceHistory(List<Workspace> recentWorkspaces)
WorkspaceHistory(List<Workspace> recentWorkspaces, String currentWorkspace)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanUpHistory()
Removes all not existing workspaces from the historyboolean
containsWorkspace(String workspaceId)
static WorkspaceHistory
fromCookieJson(String json)
String
getCurrentWorkspace()
List<Workspace>
getRecentWorkspaces()
Workspace
getWorkspace(String workspaceId)
void
removeWorkspaceFromHistory(String workspaceId)
void
setCurrentWorkspace(String currentWorkspace)
String
toCookieJson()
-
-
-
Method Detail
-
getCurrentWorkspace
public String getCurrentWorkspace()
-
setCurrentWorkspace
public void setCurrentWorkspace(String currentWorkspace)
-
cleanUpHistory
public void cleanUpHistory()
Removes all not existing workspaces from the history
-
containsWorkspace
public boolean containsWorkspace(String workspaceId)
-
getWorkspace
public Workspace getWorkspace(String workspaceId) throws CombineArchiveWebException
- Throws:
CombineArchiveWebException
-
removeWorkspaceFromHistory
public void removeWorkspaceFromHistory(String workspaceId)
-
toCookieJson
public String toCookieJson() throws com.fasterxml.jackson.core.JsonProcessingException
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
fromCookieJson
public static WorkspaceHistory fromCookieJson(String json) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException
- Throws:
com.fasterxml.jackson.core.JsonParseException
com.fasterxml.jackson.databind.JsonMappingException
IOException
-
-