Class: Sinicum::Imaging::ImagingFile
- Inherits:
-
Object
- Object
- Sinicum::Imaging::ImagingFile
- Defined in:
- lib/sinicum/imaging/imaging_file.rb
Overview
Representation of a DAM file as seen by the imaging middleware.
Constant Summary collapse
- ORIGINAL_DAM_PATH_START =
::Sinicum::Imaging.dam_path_prefix + "/"
- ORIGINAL_DAM_PATH_REPLACEMENT =
::Sinicum::Imaging.path_prefix + "/" + ::Sinicum::Imaging.default_converter_name + "/"
- ORIGINAL_DMS_PATH_START =
::Sinicum::Imaging.dms_path_prefix + "/"
- ORIGINAL_DMS_PATH_REPLACEMENT =
::Sinicum::Imaging.path_prefix_mgnl4 + "/" + ::Sinicum::Imaging.default_converter_name + "/"
- DEFAULT_CACHE_TIME =
24 * 60 * 60
- FINGERPRINT_CACHE_TIME =
7 * 24 * 60 * 60
Instance Attribute Summary collapse
-
#extension ⇒ Object
readonly
Returns the value of attribute extension.
-
#fingerprint ⇒ Object
readonly
Returns the value of attribute fingerprint.
-
#normalized_request_path ⇒ Object
readonly
Returns the value of attribute normalized_request_path.
-
#workspace ⇒ Object
readonly
Returns the value of attribute workspace.
Instance Method Summary collapse
- #cache_time ⇒ Object
- #filename ⇒ Object
-
#initialize(path_info) ⇒ ImagingFile
constructor
Public: Create a new instance.
- #path ⇒ Object
- #result? ⇒ Boolean
Constructor Details
#initialize(path_info) ⇒ ImagingFile
Public: Create a new instance
path_info - The request’s path_info
20 21 22 23 |
# File 'lib/sinicum/imaging/imaging_file.rb', line 20 def initialize(path_info) @path_info = path_info set_up end |
Instance Attribute Details
#extension ⇒ Object (readonly)
Returns the value of attribute extension.
15 16 17 |
# File 'lib/sinicum/imaging/imaging_file.rb', line 15 def extension @extension end |
#fingerprint ⇒ Object (readonly)
Returns the value of attribute fingerprint.
15 16 17 |
# File 'lib/sinicum/imaging/imaging_file.rb', line 15 def fingerprint @fingerprint end |
#normalized_request_path ⇒ Object (readonly)
Returns the value of attribute normalized_request_path.
15 16 17 |
# File 'lib/sinicum/imaging/imaging_file.rb', line 15 def normalized_request_path @normalized_request_path end |
#workspace ⇒ Object (readonly)
Returns the value of attribute workspace.
15 16 17 |
# File 'lib/sinicum/imaging/imaging_file.rb', line 15 def workspace @workspace end |
Instance Method Details
#cache_time ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/sinicum/imaging/imaging_file.rb', line 37 def cache_time if fingerprint FINGERPRINT_CACHE_TIME else DEFAULT_CACHE_TIME end end |
#filename ⇒ Object
33 34 35 |
# File 'lib/sinicum/imaging/imaging_file.rb', line 33 def filename imaging_result.filename end |
#path ⇒ Object
29 30 31 |
# File 'lib/sinicum/imaging/imaging_file.rb', line 29 def path imaging_result.path end |
#result? ⇒ Boolean
25 26 27 |
# File 'lib/sinicum/imaging/imaging_file.rb', line 25 def result? !!imaging_result end |