Package org.openrefine
Class ProjectManagerStub
- java.lang.Object
-
- org.openrefine.ProjectManager
-
- org.openrefine.ProjectManagerStub
-
public class ProjectManagerStub extends ProjectManager
Stub used to avoid saves and stub HistoryEntryManager
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openrefine.ProjectManager
ProjectManager.SaveRecord
-
-
Field Summary
-
Fields inherited from class org.openrefine.ProjectManager
_facetCountCacheManager, _lookupCacheManager, _preferenceStore, _projects, _projectsMetadata, _projectsTags, EXPRESSION_HISTORY_MAX, PROJECT_FLUSH_DELAY, QUICK_SAVE_MAX_TIME, singleton
-
-
Constructor Summary
Constructors Constructor Description ProjectManagerStub(Runner runner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteProject(long projectID)
Remove project from data storevoid
exportProject(long projectId, org.apache.commons.compress.archivers.tar.TarArchiveOutputStream tos)
Export project to a Refine archiveChangeDataStore
getChangeDataStore(long projectID)
Return the change data store for a given projectGridCache
getGridCache(long projectId)
Return the cached grid store for a given projectHistoryEntryManager
getHistoryEntryManager()
The history entry manager deals with changesvoid
importProject(long projectID, InputStream inputStream, boolean gziped)
Import project from a Refine archiveprotected Project
loadProject(long id)
Loads a project from the data store into memoryboolean
loadProjectMetadata(long projectID)
Load project metadata from data storagevoid
reloadProjectFromWorkspace(long id, ProgressReporter progressReporter)
Ensures a project is saved in the workspace and its grids are read from there.void
saveMetadata(ProjectMetadata metadata, long projectId)
Save project metadata to the data storevoid
saveProject(Project project, ProgressReporter reporter)
Save project to the data storevoid
saveProjects()
Saves all projects to the data storeprotected void
saveWorkspace()
Saves the workspace to the data store-
Methods inherited from class org.openrefine.ProjectManager
addLatestExpression, deleteProject, dispose, disposeUnmodifiedProjects, ensureProjectSaved, getAllProjectMetadata, getAllProjectTags, getExpressions, getFacetCountCache, getLoadedProject, getLookupCacheManager, getPreferenceStore, getProject, getProjectID, getProjectMetadata, getProjectMetadata, mergeEmptyUserMetadata, preparePreferenceStore, registerProject, removeProject, save
-
-
-
-
Constructor Detail
-
ProjectManagerStub
public ProjectManagerStub(Runner runner)
-
-
Method Detail
-
deleteProject
public void deleteProject(long projectID)
Description copied from class:ProjectManager
Remove project from data store- Specified by:
deleteProject
in classProjectManager
-
getHistoryEntryManager
public HistoryEntryManager getHistoryEntryManager()
Description copied from class:ProjectManager
The history entry manager deals with changes- Specified by:
getHistoryEntryManager
in classProjectManager
- Returns:
- manager for handling history
-
importProject
public void importProject(long projectID, InputStream inputStream, boolean gziped) throws IOException
Description copied from class:ProjectManager
Import project from a Refine archive- Specified by:
importProject
in classProjectManager
- Throws:
IOException
-
loadProject
protected Project loadProject(long id)
Description copied from class:ProjectManager
Loads a project from the data store into memory- Specified by:
loadProject
in classProjectManager
-
loadProjectMetadata
public boolean loadProjectMetadata(long projectID)
Description copied from class:ProjectManager
Load project metadata from data storage- Specified by:
loadProjectMetadata
in classProjectManager
-
saveMetadata
public void saveMetadata(ProjectMetadata metadata, long projectId) throws Exception
Description copied from class:ProjectManager
Save project metadata to the data store- Specified by:
saveMetadata
in classProjectManager
- Throws:
Exception
-
saveProject
public void saveProject(Project project, ProgressReporter reporter)
Description copied from class:ProjectManager
Save project to the data store- Specified by:
saveProject
in classProjectManager
-
saveProjects
public void saveProjects()
Description copied from class:ProjectManager
Saves all projects to the data store- Overrides:
saveProjects
in classProjectManager
-
saveWorkspace
protected void saveWorkspace()
Description copied from class:ProjectManager
Saves the workspace to the data store- Specified by:
saveWorkspace
in classProjectManager
-
getChangeDataStore
public ChangeDataStore getChangeDataStore(long projectID)
Description copied from class:ProjectManager
Return the change data store for a given project- Specified by:
getChangeDataStore
in classProjectManager
-
exportProject
public void exportProject(long projectId, org.apache.commons.compress.archivers.tar.TarArchiveOutputStream tos) throws IOException
Description copied from class:ProjectManager
Export project to a Refine archive- Specified by:
exportProject
in classProjectManager
- Throws:
IOException
-
reloadProjectFromWorkspace
public void reloadProjectFromWorkspace(long id, ProgressReporter progressReporter) throws IOException
Description copied from class:ProjectManager
Ensures a project is saved in the workspace and its grids are read from there.- Specified by:
reloadProjectFromWorkspace
in classProjectManager
- Parameters:
id
- the project id to load- Throws:
IOException
-
getGridCache
public GridCache getGridCache(long projectId)
Description copied from class:ProjectManager
Return the cached grid store for a given project- Specified by:
getGridCache
in classProjectManager
-
-