Class: Katello::Api::V2::ContentExportsController

Inherits:
ExportsController show all
Defined in:
app/controllers/katello/api/v2/content_exports_controller.rb

Instance Method Summary collapse

Methods inherited from ExportsController

#export_content_view_version, #export_library, #export_repository, #find_export_format, #find_exportable_content_view_version, #find_exportable_organization, #find_exportable_repository, #find_history

Methods inherited from ApiController

#check_katello_agent_not_disabled, #deprecate_katello_agent, #empty_search_query?, #full_result_response, #katello_agent_removal_release, #resource_class, #scoped_search, #skip_session

Methods included from Rendering

#respond_for_async, #respond_for_bulk_async, #respond_for_create, #respond_for_destroy, #respond_for_index, #respond_for_show, #respond_for_status, #respond_for_update, #respond_with_template, #respond_with_template_collection, #respond_with_template_resource, #try_specific_collection_template, #try_specific_resource_template

Methods included from Katello::Api::Version2

#api_version

Instance Method Details

#indexObject



18
19
20
21
22
23
24
25
26
27
28
# File 'app/controllers/katello/api/v2/content_exports_controller.rb', line 18

def index
  history = ContentViewVersionExportHistory.readable
  history = history.where(:id => params[:id]) unless params[:id].blank?
  history = history.where(:content_view_version_id => params[:content_view_version_id]) unless params[:content_view_version_id].blank?
  history = history.where(:destination_server => params[:destination_server]) unless params[:destination_server].blank?
  history = history.where(:export_type => params[:type]) unless params[:type].blank?
  history = history.with_organization_id(params[:organization_id]) unless params[:organization_id].blank?
  history = history.with_content_view_id(params[:content_view_id]) unless params[:content_view_id].blank?
  respond_with_template_collection("index", 'content_view_version_export_histories',
                                   :collection => scoped_search(history, 'id', 'asc', resource_class: ContentViewVersionExportHistory))
end

#libraryObject



44
45
46
# File 'app/controllers/katello/api/v2/content_exports_controller.rb', line 44

def library
  export_library
end

#repositoryObject



51
52
53
# File 'app/controllers/katello/api/v2/content_exports_controller.rb', line 51

def repository
  export_repository
end

#versionObject



35
36
37
# File 'app/controllers/katello/api/v2/content_exports_controller.rb', line 35

def version
  export_content_view_version
end