Class: CmisServer::RenderableObject
- Inherits:
-
Object
- Object
- CmisServer::RenderableObject
- Defined in:
- lib/cmis_server/renderable_object.rb
Instance Attribute Summary collapse
-
#base_object ⇒ Object
readonly
Returns the value of attribute base_object.
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
Instance Method Summary collapse
- #acl ⇒ Object
- #allowable_actions ⇒ Object
- #atompub_entry_properties ⇒ Object
- #filter_properties!(filter) ⇒ Object
-
#initialize(base_object:, properties: nil, include_relationships: :none, include_policies: false, rendition_filter: "cmis:none", include_acl: false, include_allowable_actions: false) ⇒ RenderableObject
constructor
A new instance of RenderableObject.
- #policies ⇒ Object
- #relastionships ⇒ Object
- #renditions ⇒ Object
Constructor Details
#initialize(base_object:, properties: nil, include_relationships: :none, include_policies: false, rendition_filter: "cmis:none", include_acl: false, include_allowable_actions: false) ⇒ RenderableObject
Returns a new instance of RenderableObject.
7 8 9 10 |
# File 'lib/cmis_server/renderable_object.rb', line 7 def initialize(base_object:, properties: nil, include_relationships: :none, include_policies: false, rendition_filter: "cmis:none", include_acl: false, include_allowable_actions: false) @base_object=base_object @properties =properties||@base_object.properties.values end |
Instance Attribute Details
#base_object ⇒ Object (readonly)
Returns the value of attribute base_object.
4 5 6 |
# File 'lib/cmis_server/renderable_object.rb', line 4 def base_object @base_object end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
5 6 7 |
# File 'lib/cmis_server/renderable_object.rb', line 5 def properties @properties end |
Instance Method Details
#acl ⇒ Object
40 41 42 |
# File 'lib/cmis_server/renderable_object.rb', line 40 def acl nil end |
#allowable_actions ⇒ Object
44 45 46 |
# File 'lib/cmis_server/renderable_object.rb', line 44 def allowable_actions nil end |
#atompub_entry_properties ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/cmis_server/renderable_object.rb', line 16 def atompub_entry_properties { id: @base_object.cmis_object_id, title: @base_object.cmis_name, summary: @base_object.cmis_description, edited: @base_object.cmis_creation_date, updated: @base_object.cmis_last_modification_date, author: @base_object.cmis_created_by, content: @base_object.try(:content_stream) } end |
#filter_properties!(filter) ⇒ Object
12 13 14 |
# File 'lib/cmis_server/renderable_object.rb', line 12 def filter_properties!(filter) @properties.slice!(*filter) end |
#policies ⇒ Object
28 29 30 |
# File 'lib/cmis_server/renderable_object.rb', line 28 def policies nil end |
#relastionships ⇒ Object
32 33 34 |
# File 'lib/cmis_server/renderable_object.rb', line 32 def relastionships nil end |
#renditions ⇒ Object
36 37 38 |
# File 'lib/cmis_server/renderable_object.rb', line 36 def renditions nil end |