Class: CmisServer::Type
- Inherits:
-
Object
- Object
- CmisServer::Type
- Defined in:
- lib/cmis_server/type.rb
Direct Known Subclasses
BaseTypeDefinition, DocumentType, FolderType, ItemType, SecondaryType
Instance Attribute Summary collapse
-
#base_id ⇒ Object
Returns the value of attribute base_id.
-
#controllable_acl ⇒ Object
Returns the value of attribute controllable_acl.
-
#controllable_policy ⇒ Object
Returns the value of attribute controllable_policy.
-
#creatable ⇒ Object
Returns the value of attribute creatable.
-
#description ⇒ Object
Returns the value of attribute description.
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#fileable ⇒ Object
Returns the value of attribute fileable.
-
#fulltext_indexed ⇒ Object
Returns the value of attribute fulltext_indexed.
-
#id ⇒ Object
Returns the value of attribute id.
-
#included_in_supertype_query ⇒ Object
Returns the value of attribute included_in_supertype_query.
-
#local_name ⇒ Object
Returns the value of attribute local_name.
-
#local_namespace ⇒ Object
Returns the value of attribute local_namespace.
-
#parent_type ⇒ Object
Returns the value of attribute parent_type.
-
#query_name ⇒ Object
Returns the value of attribute query_name.
-
#queryable ⇒ Object
Returns the value of attribute queryable.
-
#self_property_definitions ⇒ Object
Returns the value of attribute self_property_definitions.
Instance Method Summary collapse
- #base_type ⇒ Object
-
#initialize(attrs = {}) ⇒ Type
constructor
A new instance of Type.
- #parent_id ⇒ Object
- #parent_property_definitions ⇒ Object
- #property_definitions ⇒ Object
Constructor Details
#initialize(attrs = {}) ⇒ Type
Returns a new instance of Type.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/cmis_server/type.rb', line 22 def initialize(attrs={}) @id = CmisServer::Id.new(attrs.fetch(:id).to_s) @parent_type = attrs.fetch(:parent_type) @local_name = attrs.fetch(:local_name, id) @local_namespace = attrs.fetch(:local_namespace, 'local') @query_name = attrs.fetch(:query_name, id) @display_name = attrs.fetch(:display_name, id) @description = attrs.fetch(:description, 'No description provided') @creatable = attrs.fetch(:creatable, false) @fileable = attrs.fetch(:fileable, false) @queryable = attrs.fetch(:queryable, false) @controllable_policy = attrs.fetch(:controllable_policy, false) @controllable_acl = attrs.fetch(:controllable_acl, false) @fulltext_indexed = attrs.fetch(:fulltext_indexed, false) @included_in_supertype_query = attrs.fetch(:included_in_supertype_query, false) @self_property_definitions = attrs.fetch(:property_definitions, []).dup end |
Instance Attribute Details
#base_id ⇒ Object
Returns the value of attribute base_id.
4 5 6 |
# File 'lib/cmis_server/type.rb', line 4 def base_id @base_id end |
#controllable_acl ⇒ Object
Returns the value of attribute controllable_acl.
4 5 6 |
# File 'lib/cmis_server/type.rb', line 4 def controllable_acl @controllable_acl end |
#controllable_policy ⇒ Object
Returns the value of attribute controllable_policy.
4 5 6 |
# File 'lib/cmis_server/type.rb', line 4 def controllable_policy @controllable_policy end |
#creatable ⇒ Object
Returns the value of attribute creatable.
4 5 6 |
# File 'lib/cmis_server/type.rb', line 4 def creatable @creatable end |
#description ⇒ Object
Returns the value of attribute description.
4 5 6 |
# File 'lib/cmis_server/type.rb', line 4 def description @description end |
#display_name ⇒ Object
Returns the value of attribute display_name.
4 5 6 |
# File 'lib/cmis_server/type.rb', line 4 def display_name @display_name end |
#fileable ⇒ Object
Returns the value of attribute fileable.
4 5 6 |
# File 'lib/cmis_server/type.rb', line 4 def fileable @fileable end |
#fulltext_indexed ⇒ Object
Returns the value of attribute fulltext_indexed.
4 5 6 |
# File 'lib/cmis_server/type.rb', line 4 def fulltext_indexed @fulltext_indexed end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/cmis_server/type.rb', line 4 def id @id end |
#included_in_supertype_query ⇒ Object
Returns the value of attribute included_in_supertype_query.
4 5 6 |
# File 'lib/cmis_server/type.rb', line 4 def included_in_supertype_query @included_in_supertype_query end |
#local_name ⇒ Object
Returns the value of attribute local_name.
4 5 6 |
# File 'lib/cmis_server/type.rb', line 4 def local_name @local_name end |
#local_namespace ⇒ Object
Returns the value of attribute local_namespace.
4 5 6 |
# File 'lib/cmis_server/type.rb', line 4 def local_namespace @local_namespace end |
#parent_type ⇒ Object
Returns the value of attribute parent_type.
4 5 6 |
# File 'lib/cmis_server/type.rb', line 4 def parent_type @parent_type end |
#query_name ⇒ Object
Returns the value of attribute query_name.
4 5 6 |
# File 'lib/cmis_server/type.rb', line 4 def query_name @query_name end |
#queryable ⇒ Object
Returns the value of attribute queryable.
4 5 6 |
# File 'lib/cmis_server/type.rb', line 4 def queryable @queryable end |
#self_property_definitions ⇒ Object
Returns the value of attribute self_property_definitions.
4 5 6 |
# File 'lib/cmis_server/type.rb', line 4 def self_property_definitions @self_property_definitions end |
Instance Method Details
#base_type ⇒ Object
45 46 47 |
# File 'lib/cmis_server/type.rb', line 45 def base_type self.parent_type ? self.parent_type.base_type : self end |
#parent_id ⇒ Object
41 42 43 |
# File 'lib/cmis_server/type.rb', line 41 def parent_id self.parent_type&.id end |
#parent_property_definitions ⇒ Object
57 58 59 60 |
# File 'lib/cmis_server/type.rb', line 57 def parent_property_definitions #Decorate parent property_definitions as inherited self.parent_type&.property_definitions.to_a.map { |pd| InheritedDecorator.new(pd) } end |
#property_definitions ⇒ Object
53 54 55 |
# File 'lib/cmis_server/type.rb', line 53 def property_definitions @self_property_definitions.to_a+parent_property_definitions end |