Interface ProjectExportService
public interface ProjectExportService
- Since:
- 20.11.25
- Author:
- Norman Lorenz
-
Method Summary
Modifier and TypeMethodDescriptionanalyzeForExport(Long projectId, ProjectUser user) Analyzes the specified project for export, identifying all dependencies and checking user permissions.voidexportProject(ProjectExportSpec spec, OutputStream output, ProjectUser user) Exports the specified project according to the provided export specification.static ProjectExportServiceRetrieves the singleton instance of the ProjectExportService using CDI.
-
Method Details
-
getInstance
Retrieves the singleton instance of the ProjectExportService using CDI.- Returns:
- The ProjectExportService instance.
-
analyzeForExport
ProjectExportAnalysisResult analyzeForExport(Long projectId, ProjectUser user) throws FcProjectExportException Analyzes the specified project for export, identifying all dependencies and checking user permissions.- Parameters:
projectId- The ID of the project.user- The user requesting the dependencies.- Returns:
- A ProjectExportAnalysisResult containing the identified dependencies and any errors.
- Throws:
IllegalArgumentException- if the projectId is null or the user is null.FcProjectExportException- if the project does not exist, the user lacks permissions, or another error occurs during retrieval.
-
exportProject
void exportProject(ProjectExportSpec spec, OutputStream output, ProjectUser user) throws FcProjectExportException Exports the specified project according to the provided export specification.- Parameters:
spec- The export specification detailing what to export.output- The OutputStream to which the exported project data will be written.user- The user requesting the export.- Throws:
IllegalArgumentException- if the spec, user, or output is null.FcProjectExportException- if an error occurs during the export process.
-