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 UserDatadataprotected FileworkingDirprotected Workspaceworkspaceprotected WorkspaceManagerworkspaceManager
-
Constructor Summary
Constructors Constructor Description UserManager()UserManager(String workspaceId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcreateArchive(String name)StringcreateArchive(String name, de.unirostock.sems.cbarchive.meta.omex.VCard creator)StringcreateArchive(String name, File existingArchive)StringcreateArchive(String name, File existingArchive, de.unirostock.sems.cbarchive.meta.omex.VCard creator)voiddeleteArchive(String archiveId)voiddeleteArchiveSilent(String archiveId)ArchivegetArchive(String archiveId)ArchivegetArchive(String archiveId, boolean deepScan)FilegetArchiveFile(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 ifdeepScanis set to true, the content of the archives will be analysed.UserDatagetData()FilegetWorkingDir()WorkspacegetWorkspace()StringgetWorkspaceId()booleanhasData()voidrenameArchive(String archiveId, String newName)voidsetData(UserData data)voidupdateArchiveEntry(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 ifdeepScanis 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:
IOExceptionorg.jdom2.JDOMExceptionParseExceptionde.unirostock.sems.cbarchive.CombineArchiveExceptionTransformerException
-
createArchive
public String createArchive(String name, File existingArchive) throws IOException, org.jdom2.JDOMException, ParseException, de.unirostock.sems.cbarchive.CombineArchiveException, TransformerException
- Throws:
IOExceptionorg.jdom2.JDOMExceptionParseExceptionde.unirostock.sems.cbarchive.CombineArchiveExceptionTransformerException
-
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:
IOExceptionorg.jdom2.JDOMExceptionParseExceptionde.unirostock.sems.cbarchive.CombineArchiveExceptionTransformerException
-
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:
IOExceptionorg.jdom2.JDOMExceptionParseExceptionde.unirostock.sems.cbarchive.CombineArchiveExceptionTransformerException
-
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
-
-