Class: Projects::ImportExport::ExportService
- Inherits:
-
BaseService
- Object
- BaseService
- Projects::ImportExport::ExportService
- Defined in:
- app/services/projects/import_export/export_service.rb
Instance Attribute Summary
Attributes inherited from BaseService
#current_user, #params, #project
Instance Method Summary collapse
- #execute(after_export_strategy = nil) ⇒ Object
- #exporters ⇒ Object
-
#initialize(*args) ⇒ ExportService
constructor
A new instance of ExportService.
Methods included from BaseServiceUtility
#deny_visibility_level, #event_service, #log_error, #notification_service, #system_hook_service, #todo_service, #visibility_level
Methods included from Gitlab::Allowable
Constructor Details
#initialize(*args) ⇒ ExportService
Returns a new instance of ExportService.
6 7 8 9 10 11 |
# File 'app/services/projects/import_export/export_service.rb', line 6 def initialize(*args) super @shared = project.import_export_shared @logger = Gitlab::Export::Logger.build end |
Instance Method Details
#execute(after_export_strategy = nil) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'app/services/projects/import_export/export_service.rb', line 13 def execute(after_export_strategy = nil) unless project.template_source? || can?(current_user, :admin_project, project) raise ::Gitlab::ImportExport::Error.(current_user, project) end save_all! execute_after_export_action(after_export_strategy) ensure cleanup end |
#exporters ⇒ Object
24 25 26 27 28 29 |
# File 'app/services/projects/import_export/export_service.rb', line 24 def exporters [ version_saver, avatar_saver, project_tree_saver, uploads_saver, repo_saver, wiki_repo_saver, lfs_saver, snippets_repo_saver, design_repo_saver ] end |