Class: AjaxExport
- Inherits:
-
Service
- Object
- Service
- AjaxExport
- Defined in:
- lib/service_adaptors/ajax_export.rb
Direct Known Subclasses
Constant Summary
Constant Summary
Constants inherited from Service
Service::LinkOutFilterTask, Service::StandardTask
Instance Attribute Summary
Attributes inherited from Service
#name, #priority, #request, #service_id, #session_id, #status, #task, #url
Instance Method Summary (collapse)
- - (Object) handle(request)
-
- (AjaxExport) initialize(config)
constructor
A new instance of AjaxExport.
- - (Object) response_url(svc_type, params)
-
- (Object) service_types_generated
Standard method, used by background service updater.
Methods inherited from Service
#display_name, #handle_wrapper, #link_out_filter, #preempted_by, required_config_params, #response_to_view_data, #session, #update_session, #view_data_from_service_type
Constructor Details
- (AjaxExport) initialize(config)
A new instance of AjaxExport
4 5 6 |
# File 'lib/service_adaptors/ajax_export.rb', line 4 def initialize(config) super(config) end |
Instance Method Details
- (Object) handle(request)
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/service_adaptors/ajax_export.rb', line 15 def handle(request) request.add_service_response(:service=>self, :display_text => @display_text, :link_supports_ajax_call => true, :notes=> @note, :service_type_value => 'export_citation' ) return request.dispatched(self, true) end |
- (Object) response_url(svc_type, params)
26 27 28 29 30 31 32 33 |
# File 'lib/service_adaptors/ajax_export.rb', line 26 def response_url(svc_type, params) # Hash that caller will pass to url_for to create an internally # facing link. return {:controller=>@form_controller, :action=>@form_action, :id => svc_type, :format => params[:format]} end |
- (Object) service_types_generated
Standard method, used by background service updater. See Service docs.
9 10 11 12 13 |
# File 'lib/service_adaptors/ajax_export.rb', line 9 def service_types_generated types = [ ServiceTypeValue[:export_citation] ] return types end |