Package de.unirostock.sems.cbarchive.web
Class UserManager
- java.lang.Object
-
- de.unirostock.sems.cbarchive.web.UserManager
-
public class UserManager extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected UserData
data
protected File
workingDir
protected Workspace
workspace
protected WorkspaceManager
workspaceManager
-
Constructor Summary
Constructors Constructor Description UserManager()
UserManager(String workspaceId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
createArchive(String name)
String
createArchive(String name, de.unirostock.sems.cbarchive.meta.omex.VCard creator)
String
createArchive(String name, File existingArchive)
String
createArchive(String name, File existingArchive, de.unirostock.sems.cbarchive.meta.omex.VCard creator)
void
deleteArchive(String archiveId)
void
deleteArchiveSilent(String archiveId)
Archive
getArchive(String archiveId)
Archive
getArchive(String archiveId, boolean deepScan)
File
getArchiveFile(String archiveId)
List<Archive>
getArchives()
Lists all available archives for the user, with content.List<Archive>
getArchives(boolean deepScan)
Lists all available archives for the user ifdeepScan
is set to true, the content of the archives will be analysed.UserData
getData()
File
getWorkingDir()
Workspace
getWorkspace()
String
getWorkspaceId()
boolean
hasData()
void
renameArchive(String archiveId, String newName)
void
setData(UserData data)
void
updateArchiveEntry(String archiveId, ArchiveEntryDataholder newEntryDataholder)
-
-
-
Field Detail
-
workspaceManager
protected WorkspaceManager workspaceManager
-
workspace
protected Workspace workspace
-
workingDir
protected File workingDir
-
data
protected UserData data
-
-
Constructor Detail
-
UserManager
public UserManager() throws IOException
- Throws:
IOException
-
UserManager
public UserManager(String workspaceId) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getData
public UserData getData()
-
setData
public void setData(UserData data)
-
hasData
public boolean hasData()
-
getWorkspaceId
public String getWorkspaceId()
-
getWorkingDir
public File getWorkingDir()
-
getWorkspace
public Workspace getWorkspace()
-
getArchives
public List<Archive> getArchives()
Lists all available archives for the user, with content. Similar to getArchives(true);.- Returns:
- the archives
-
getArchives
public List<Archive> getArchives(boolean deepScan)
Lists all available archives for the user ifdeepScan
is set to true, the content of the archives will be analysed.- Parameters:
deepScan
- should we deep-scan?- Returns:
- the archives
-
getArchive
public Archive getArchive(String archiveId) throws FileNotFoundException, CombineArchiveWebException
-
getArchive
public Archive getArchive(String archiveId, boolean deepScan) throws CombineArchiveWebException, FileNotFoundException
-
getArchiveFile
public File getArchiveFile(String archiveId) throws FileNotFoundException
- Throws:
FileNotFoundException
-
renameArchive
public void renameArchive(String archiveId, String newName) throws IllegalArgumentException, FileNotFoundException, IOException
-
createArchive
public String createArchive(String name) throws IOException, org.jdom2.JDOMException, ParseException, de.unirostock.sems.cbarchive.CombineArchiveException, TransformerException
- Throws:
IOException
org.jdom2.JDOMException
ParseException
de.unirostock.sems.cbarchive.CombineArchiveException
TransformerException
-
createArchive
public String createArchive(String name, File existingArchive) throws IOException, org.jdom2.JDOMException, ParseException, de.unirostock.sems.cbarchive.CombineArchiveException, TransformerException
- Throws:
IOException
org.jdom2.JDOMException
ParseException
de.unirostock.sems.cbarchive.CombineArchiveException
TransformerException
-
createArchive
public String createArchive(String name, de.unirostock.sems.cbarchive.meta.omex.VCard creator) throws IOException, org.jdom2.JDOMException, ParseException, de.unirostock.sems.cbarchive.CombineArchiveException, TransformerException
- Throws:
IOException
org.jdom2.JDOMException
ParseException
de.unirostock.sems.cbarchive.CombineArchiveException
TransformerException
-
createArchive
public String createArchive(String name, File existingArchive, de.unirostock.sems.cbarchive.meta.omex.VCard creator) throws IOException, org.jdom2.JDOMException, ParseException, de.unirostock.sems.cbarchive.CombineArchiveException, TransformerException
- Throws:
IOException
org.jdom2.JDOMException
ParseException
de.unirostock.sems.cbarchive.CombineArchiveException
TransformerException
-
deleteArchive
public void deleteArchive(String archiveId) throws IOException
- Throws:
IOException
-
deleteArchiveSilent
public void deleteArchiveSilent(String archiveId)
-
updateArchiveEntry
public void updateArchiveEntry(String archiveId, ArchiveEntryDataholder newEntryDataholder) throws CombineArchiveWebException
- Throws:
CombineArchiveWebException
-
-