public interface ProjectStorage
Project
management.Modifier and Type | Method and Description |
---|---|
void |
activateProject(Project project)
Activates a deactivated project.
|
String |
checkProject(Project project) |
Project |
createProject(String name,
String description)
Create a new Project.
|
void |
deactivateProject(Project project)
Deactivates a project.
|
void |
deleteExportFile(ExportFile exportFile)
Delete export file on server.
|
InputStream |
downloadExportFile(ExportFile exportFile)
Downoad a export file.
|
List<Project> |
getFontUsages(String name)
Returns a list of
projects using the font specified by the given name. |
List<String> |
getInstalledExportFiles(long projectId)
Get filename list of installed exports and backups.
|
int |
getMaxProjects()
Returns maximum number of allowed projects (possible license restriction).
|
Project |
getProject(long id)
Returns the project by id, regardless whether it's active or not.
|
Project |
getProject(String name)
Returns the project by name, regardless whether it's active or not.
|
ProjectInfo |
getProjectInfo(ExportFile exportFile)
Parse info out of ExportFile contents
|
Project[] |
getProjects()
Returns all (active and inactive) projects.
|
Project[] |
getProjects(boolean active)
Returns either all active or inactive projects.
|
List<Properties> |
getUnmappedLayers(long projectId,
String snapshotFileName,
List<ExportFile> backups)
Get unmapped layer information for installing backup files.
|
List<ExportFile> |
listBackupFiles()
List incremental, differential and snapshot backup files.
|
List<ExportFile> |
listExportFiles()
List all export files on server.
|
void |
rebuildReferences(Project project)
Starts reference rebuilding for the given
project with it's
latest revision . |
void |
rebuildSearchIndex(IDProvider element)
Refreshes the search index for the given
element . |
void |
rebuildSearchIndex(Project project)
Since FirstSpirit v5 this starts the project schedule entry with the name "Rebuild search index".
|
void |
refreshProjects()
Resets the cache of the project list
|
void |
removeProject(Project project)
Remove a project from server.
|
ServerActionHandle<ExportProgress,Boolean> |
startDifferentialBackup(BackupParameters backupParameters)
Start differential project repository backup export.
|
ServerActionHandle<ExportProgress,Boolean> |
startExport(ExportParameters exportParameters)
Start project export.
|
ServerActionHandle<ImportProgress,Boolean> |
startImport(ImportParameters importParameters)
Start project import.
|
ServerActionHandle<ExportProgress,Boolean> |
startIncrementalBackup(BackupParameters backupParameters)
Start incremental project repository backup export.
|
ServerActionHandle<ImportProgress,Boolean> |
startPartialInstall(long projectId,
Map<String,String> layerMappings,
List<ExportFile> backups)
Install incremental or differential backup file into a existing project.
|
ServerActionHandle<ImportProgress,Boolean> |
startProjectRevert(long projectId,
String snapshotFileName)
Revert a project to a state after a snapshot has been installed.
|
ServerActionHandle<ExportProgress,Boolean> |
startSnapshotExport(BackupParameters backupParameters)
Start project snapshot export.
|
void |
updateVersionInfo(Project project) |
ExportFile |
uploadExportFile(String fileName,
InputStream fileData)
Upload single export file or last part of files to server.
|
void |
uploadExportFilePart(String name,
InputStream fileData)
Upload a part of a splitted export file.
|
@NotNull Project createProject(String name, String description)
name
- the name of the projectdescription
- the unique description of the projectIOException
- if something goes wrong during project creationSecurityException
- if the user isn't the server admin
@Nullable Project getProject(String name)
name
- project name.null
if it doesn't exist.@Nullable Project getProject(long id)
id
- project id.null
if it doesn't exist.Project[] getProjects()
Project[] getProjects(boolean active)
active
- true
for active, false
for inactive projects.void removeProject(Project project)
project
- the project to removeSecurityException
- if the user isn't the server admin
int getMaxProjects()
void activateProject(Project project) throws AccessRuntimeException
project
- to activate.AccessRuntimeException
- if the project couldn't be activated, e.g. in case of missing project directorySecurityException
- if the user isn't the server admin
void deactivateProject(Project project)
locked
.
Calling Lockable.save()
isn't necessary.project
- to deactivate.SecurityException
- if the user isn't the server admin
void updateVersionInfo(Project project)
void rebuildReferences(Project project)
project
with it's
latest revision
.project
- which references should be rebuilded.void rebuildSearchIndex(Project project)
void rebuildSearchIndex(IDProvider element)
element
. Supports all FirstSpirit element types,
particularly Media
and Dataset
objects.void refreshProjects()
getProjects()
,
getProjects(boolean)
void uploadExportFilePart(String name, InputStream fileData) throws IOException
deleteExportFile(ExportFile)
to delete export files on server.IOException
ExportFile uploadExportFile(String fileName, InputStream fileData) throws IOException
deleteExportFile(ExportFile)
to delete export files on server.fileName
- the file name of the uploaded file (e.g. export.tar.gz)IOException
List<ExportFile> listExportFiles() throws IOException
IOException
void deleteExportFile(ExportFile exportFile) throws FileNotFoundException
FileNotFoundException
ProjectInfo getProjectInfo(ExportFile exportFile) throws IOException
exportFile
- IOException
ServerActionHandle<ImportProgress,Boolean> startImport(ImportParameters importParameters) throws IOException
importParameters
- The import parametersSecurityException
- if the user isn't the server admin
IOException
InputStream downloadExportFile(ExportFile exportFile) throws IOException
IOException
ServerActionHandle<ExportProgress,Boolean> startExport(ExportParameters exportParameters) throws IOException
exportParameters
- The export parametersSecurityException
- if the user isn't a project admin
of the projectIOException
List<Project> getFontUsages(String name)
projects
using the font specified by the given name.FontStorage.getFontNames()
ServerActionHandle<ExportProgress,Boolean> startSnapshotExport(BackupParameters backupParameters)
SecurityException
- if the user isn't a project admin
of the projectList<ExportFile> listBackupFiles() throws IOException
IOException
ServerActionHandle<ExportProgress,Boolean> startIncrementalBackup(BackupParameters backupParameters) throws IllegalStateException
IllegalStateException
- Thrown if no snapshot or incremental backup tag was found in this project.SecurityException
- if the user isn't a project admin
of the projectServerActionHandle<ExportProgress,Boolean> startDifferentialBackup(BackupParameters backupParameters) throws IllegalStateException
IllegalStateException
- Thrown if no snapshot tag was found in this project.SecurityException
- if the user isn't a project admin
of the projectServerActionHandle<ImportProgress,Boolean> startPartialInstall(long projectId, Map<String,String> layerMappings, List<ExportFile> backups) throws IOException
backups
- The backup files to installIOException
ServerActionHandle<ImportProgress,Boolean> startProjectRevert(long projectId, String snapshotFileName) throws IOException
snapshotFileName
- The snapshot file name to revert the project toSecurityException
- if the user isn't a project admin
of the projectIOException
List<Properties> getUnmappedLayers(long projectId, String snapshotFileName, List<ExportFile> backups) throws IOException
projectId
- The project idsnapshotFileName
- The snapshot the backups are based onbackups
- The backup files to installIOException
List<String> getInstalledExportFiles(long projectId) throws IOException
projectId
- The project idIOException
Copyright © 2015 e-Spirit AG. All Rights Reserved. Build 5.1.408