Class: ContentRestoredVersionEventJob
- Inherits:
-
ContentEventJob
- Object
- EventJob
- ContentEventJob
- ContentRestoredVersionEventJob
- Defined in:
- app/jobs/content_restored_version_event_job.rb
Overview
A specific job to log a file restored version to a user’s activity stream
Instance Attribute Summary collapse
-
#revision_id ⇒ Object
Returns the value of attribute revision_id.
Attributes inherited from ContentEventJob
Attributes inherited from EventJob
Instance Method Summary collapse
- #action ⇒ Object
-
#initialize(generic_file_id, depositor_id, revision_id) ⇒ ContentRestoredVersionEventJob
constructor
A new instance of ContentRestoredVersionEventJob.
Methods inherited from ContentEventJob
#generic_file, #log_generic_file_event, #log_to_followers, #log_user_event, #run
Methods inherited from EventJob
#depositor, #event, #log_to_followers, #log_user_event, #queue_name, #run
Methods included from Sufia::SufiaHelperBehavior
#current_search_parameters, #display_user_name, #error_messages_for, #has_collection_search_parameters?, #iconify_auto_link, #iconify_link, #is_url?, #link_back_to_dashboard, #link_to_dashboard_query, #link_to_facet, #link_to_facet_list, #link_to_field, #link_to_profile, #link_to_telephone, #linkify_chat_id, #number_of_deposits, #orcid_label, #render_visibility_label, #render_visibility_link, #search_form_action, #show_transfer_request_title, #sufia_thumbnail_tag, #user_display_name_and_key, #zotero_label, #zotero_profile_url
Methods included from Sufia::BlacklightOverride
#render_bookmarks_control?, #render_constraints_query, #url_for_document
Constructor Details
#initialize(generic_file_id, depositor_id, revision_id) ⇒ ContentRestoredVersionEventJob
Returns a new instance of ContentRestoredVersionEventJob.
5 6 7 8 |
# File 'app/jobs/content_restored_version_event_job.rb', line 5 def initialize(generic_file_id, depositor_id, revision_id) super(generic_file_id, depositor_id) @revision_id = revision_id end |
Instance Attribute Details
#revision_id ⇒ Object
Returns the value of attribute revision_id.
3 4 5 |
# File 'app/jobs/content_restored_version_event_job.rb', line 3 def revision_id @revision_id end |
Instance Method Details
#action ⇒ Object
10 11 12 |
# File 'app/jobs/content_restored_version_event_job.rb', line 10 def action @action ||= "User #{link_to_profile depositor_id} has restored a version '#{revision_id}' of #{link_to generic_file.title.first, Sufia::Engine.routes.url_helpers.generic_file_path(generic_file)}" end |