Class: YACCL::Model::Repository
- Inherits:
-
Object
- Object
- YACCL::Model::Repository
- Defined in:
- lib/yaccl/model/repository.rb
Instance Attribute Summary collapse
-
#acl_capabilities ⇒ Object
readonly
Returns the value of attribute acl_capabilities.
-
#capabilities ⇒ Object
readonly
Returns the value of attribute capabilities.
-
#changes_on_type ⇒ Object
readonly
Returns the value of attribute changes_on_type.
-
#cmis_version_supported ⇒ Object
readonly
Returns the value of attribute cmis_version_supported.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#latest_change_log_token ⇒ Object
readonly
Returns the value of attribute latest_change_log_token.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#product_name ⇒ Object
readonly
Returns the value of attribute product_name.
-
#product_version ⇒ Object
readonly
Returns the value of attribute product_version.
-
#root_folder_id ⇒ Object
readonly
Returns the value of attribute root_folder_id.
-
#root_folder_url ⇒ Object
readonly
Returns the value of attribute root_folder_url.
-
#thin_client_uri ⇒ Object
readonly
Returns the value of attribute thin_client_uri.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#vendor_name ⇒ Object
readonly
Returns the value of attribute vendor_name.
Class Method Summary collapse
Instance Method Summary collapse
- #content_changes(change_log_token) ⇒ Object
- #create_type(type) ⇒ Object
- #delete_type(type_id) ⇒ Object
-
#initialize(raw) ⇒ Repository
constructor
A new instance of Repository.
- #new_document ⇒ Object
- #new_folder ⇒ Object
- #new_item ⇒ Object
- #new_policy ⇒ Object
- #new_relationship ⇒ Object
- #object(object_id) ⇒ Object
-
#query(statement) ⇒ Object
discovery.
-
#root ⇒ Object
object.
-
#type(type_id) ⇒ Object
type.
- #types ⇒ Object
- #update_type(type) ⇒ Object
Constructor Details
#initialize(raw) ⇒ Repository
Returns a new instance of Repository.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/yaccl/model/repository.rb', line 24 def initialize(raw) @id = raw[:repositoryId] @name = raw[:repositoryName] @description = raw[:repositoryDescription] @root_folder_id = raw[:rootFolderId] @capabilities = raw[:capabilities] @url = raw[:repositoryUrl] @latest_change_log_token = raw[:latestChangeLogToken] @vendor_name = raw[:vendorName] @cmis_version_supported = raw[:cmisVersionSupported] @acl_capabilities = raw[:aclCapabilities] @product_name = raw[:productName] @product_version = raw[:productVersion] @thin_client_uri = raw[:thinClientUri] @changes_on_type = raw[:changesOnType] @root_folder_url = raw[:rootFolderUrl] end |
Instance Attribute Details
#acl_capabilities ⇒ Object (readonly)
Returns the value of attribute acl_capabilities.
13 14 15 |
# File 'lib/yaccl/model/repository.rb', line 13 def acl_capabilities @acl_capabilities end |
#capabilities ⇒ Object (readonly)
Returns the value of attribute capabilities.
8 9 10 |
# File 'lib/yaccl/model/repository.rb', line 8 def capabilities @capabilities end |
#changes_on_type ⇒ Object (readonly)
Returns the value of attribute changes_on_type.
17 18 19 |
# File 'lib/yaccl/model/repository.rb', line 17 def changes_on_type @changes_on_type end |
#cmis_version_supported ⇒ Object (readonly)
Returns the value of attribute cmis_version_supported.
12 13 14 |
# File 'lib/yaccl/model/repository.rb', line 12 def cmis_version_supported @cmis_version_supported end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
6 7 8 |
# File 'lib/yaccl/model/repository.rb', line 6 def description @description end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/yaccl/model/repository.rb', line 4 def id @id end |
#latest_change_log_token ⇒ Object (readonly)
Returns the value of attribute latest_change_log_token.
10 11 12 |
# File 'lib/yaccl/model/repository.rb', line 10 def latest_change_log_token @latest_change_log_token end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/yaccl/model/repository.rb', line 5 def name @name end |
#product_name ⇒ Object (readonly)
Returns the value of attribute product_name.
14 15 16 |
# File 'lib/yaccl/model/repository.rb', line 14 def product_name @product_name end |
#product_version ⇒ Object (readonly)
Returns the value of attribute product_version.
15 16 17 |
# File 'lib/yaccl/model/repository.rb', line 15 def product_version @product_version end |
#root_folder_id ⇒ Object (readonly)
Returns the value of attribute root_folder_id.
7 8 9 |
# File 'lib/yaccl/model/repository.rb', line 7 def root_folder_id @root_folder_id end |
#root_folder_url ⇒ Object (readonly)
Returns the value of attribute root_folder_url.
18 19 20 |
# File 'lib/yaccl/model/repository.rb', line 18 def root_folder_url @root_folder_url end |
#thin_client_uri ⇒ Object (readonly)
Returns the value of attribute thin_client_uri.
16 17 18 |
# File 'lib/yaccl/model/repository.rb', line 16 def thin_client_uri @thin_client_uri end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
9 10 11 |
# File 'lib/yaccl/model/repository.rb', line 9 def url @url end |
#vendor_name ⇒ Object (readonly)
Returns the value of attribute vendor_name.
11 12 13 |
# File 'lib/yaccl/model/repository.rb', line 11 def vendor_name @vendor_name end |
Class Method Details
.create(raw_repository) ⇒ Object
20 21 22 |
# File 'lib/yaccl/model/repository.rb', line 20 def self.create(raw_repository) Repository.new(raw_repository) end |
Instance Method Details
#content_changes(change_log_token) ⇒ Object
103 104 105 |
# File 'lib/yaccl/model/repository.rb', line 103 def content_changes(change_log_token) Services.get_content_changes(id, change_log_token, nil, nil, nil, nil) end |
#create_type(type) ⇒ Object
83 84 85 |
# File 'lib/yaccl/model/repository.rb', line 83 def create_type(type) Type.create(id, Services.create_type(id, type.to_hash)) end |
#delete_type(type_id) ⇒ Object
91 92 93 |
# File 'lib/yaccl/model/repository.rb', line 91 def delete_type(type_id) Services.delete_type(id, type_id) end |
#new_document ⇒ Object
46 47 48 |
# File 'lib/yaccl/model/repository.rb', line 46 def new_document Document.new(id) end |
#new_folder ⇒ Object
42 43 44 |
# File 'lib/yaccl/model/repository.rb', line 42 def new_folder Folder.new(id) end |
#new_item ⇒ Object
58 59 60 |
# File 'lib/yaccl/model/repository.rb', line 58 def new_item Item.new(id) end |
#new_policy ⇒ Object
54 55 56 |
# File 'lib/yaccl/model/repository.rb', line 54 def new_policy Policy.new(id) end |
#new_relationship ⇒ Object
50 51 52 |
# File 'lib/yaccl/model/repository.rb', line 50 def new_relationship Relationship.new(id) end |
#object(object_id) ⇒ Object
68 69 70 |
# File 'lib/yaccl/model/repository.rb', line 68 def object(object_id) ObjectFactory.create(id, Services.get_object(id, object_id, nil, false, nil, nil, false, false)) end |
#query(statement) ⇒ Object
discovery
97 98 99 100 101 |
# File 'lib/yaccl/model/repository.rb', line 97 def query(statement) Services.query(id, statement, false, nil, nil, nil, nil, nil)[:results].map do |o| ObjectFactory.create(id, o) end end |
#root ⇒ Object
object
64 65 66 |
# File 'lib/yaccl/model/repository.rb', line 64 def root ObjectFactory.create(id, Services.get_object(id, root_folder_id, nil, false, nil, nil, false, false)) end |
#type(type_id) ⇒ Object
type
74 75 76 |
# File 'lib/yaccl/model/repository.rb', line 74 def type(type_id) Type.create(id, Services.get_type_definition(id, type_id)) end |
#types ⇒ Object
78 79 80 |
# File 'lib/yaccl/model/repository.rb', line 78 def types _types(Services.get_type_descendants(id, nil, nil, nil)) end |
#update_type(type) ⇒ Object
87 88 89 |
# File 'lib/yaccl/model/repository.rb', line 87 def update_type(type) Type.create(id, Services.update_type(id, type.to_hash)) end |