Class: Dor::CleanupService
- Inherits:
-
Object
- Object
- Dor::CleanupService
- Defined in:
- lib/dor/services/cleanup_service.rb
Overview
Remove all traces of the object’s data files from the workspace and export areas
Class Method Summary collapse
-
.cleanup(dor_item) ⇒ void
Delete all workspace and export entities for the druid.
- .cleanup_by_druid(druid) ⇒ Object
-
.nuke!(druid) ⇒ Object
Tries to remove any exsitence of the object in our systems Does the following: - Removes item from Dor/Fedora/Solr - Removes content from dor workspace - Removes content from assembly workspace - Removes content from sdr export area - Removes content from stacks - Removes content from purl - Removes active workflows.
Class Method Details
.cleanup(dor_item) ⇒ void
This method returns an undefined value.
Returns Delete all workspace and export entities for the druid.
10 11 12 13 |
# File 'lib/dor/services/cleanup_service.rb', line 10 def self.cleanup(dor_item) druid = dor_item.respond_to?(:druid) ? dor_item.druid : dor_item.id cleanup_by_druid druid end |
.cleanup_by_druid(druid) ⇒ Object
15 16 17 18 19 |
# File 'lib/dor/services/cleanup_service.rb', line 15 def self.cleanup_by_druid(druid) cleanup_workspace_content(druid, Config.cleanup.local_workspace_root) cleanup_workspace_content(druid, Config.cleanup.local_assembly_root) cleanup_export(druid) end |
.nuke!(druid) ⇒ Object
Tries to remove any exsitence of the object in our systems
Does the following:
- Removes item from Dor/Fedora/Solr
- Removes content from dor workspace
- Removes content from assembly workspace
- Removes content from sdr export area
- Removes content from stacks
- Removes content from purl
- Removes active workflows
58 59 60 61 |
# File 'lib/dor/services/cleanup_service.rb', line 58 def self.nuke!(druid) Deprecation.warn(self, 'CleanupService.nuke! is deprecated and will be removed in dor-services 8. Use Dor::DeleteService.destroy() instead.') DeleteService.destroy(druid) end |