Class: CmisServer::Repository
- Inherits:
-
Object
- Object
- CmisServer::Repository
- Defined in:
- lib/cmis_server/repository.rb
Defined Under Namespace
Classes: Capabitilies
Instance Attribute Summary collapse
-
#capabilities ⇒ Object
Returns the value of attribute capabilities.
-
#cmis_version_supported ⇒ Object
Returns the value of attribute cmis_version_supported.
-
#description ⇒ Object
(also: #repository_description)
Returns the value of attribute description.
-
#id ⇒ Object
(also: #repository_id)
Returns the value of attribute id.
-
#latest_change_log_token ⇒ Object
Returns the value of attribute latest_change_log_token.
-
#name ⇒ Object
(also: #repository_name)
Returns the value of attribute name.
-
#product_name ⇒ Object
Returns the value of attribute product_name.
-
#product_version ⇒ Object
Returns the value of attribute product_version.
-
#root_folder_id ⇒ Object
Returns the value of attribute root_folder_id.
-
#vendor_name ⇒ Object
Returns the value of attribute vendor_name.
Class Method Summary collapse
Instance Method Summary collapse
-
#get_object(object_id) ⇒ Object
Méthode pour récupérer un objet CMIS par son ID.
- #infos ⇒ Object
-
#initialize(attrs = {}) ⇒ Repository
constructor
A new instance of Repository.
Constructor Details
#initialize(attrs = {}) ⇒ Repository
Returns a new instance of Repository.
49 50 51 52 53 |
# File 'lib/cmis_server/repository.rb', line 49 def initialize(attrs={}) attrs.to_h.each do |property, value| self.send(property.to_s+"=", value) end end |
Instance Attribute Details
#capabilities ⇒ Object
Returns the value of attribute capabilities.
42 43 44 |
# File 'lib/cmis_server/repository.rb', line 42 def capabilities @capabilities end |
#cmis_version_supported ⇒ Object
Returns the value of attribute cmis_version_supported.
42 43 44 |
# File 'lib/cmis_server/repository.rb', line 42 def cmis_version_supported @cmis_version_supported end |
#description ⇒ Object Also known as: repository_description
Returns the value of attribute description.
42 43 44 |
# File 'lib/cmis_server/repository.rb', line 42 def description @description end |
#id ⇒ Object Also known as: repository_id
Returns the value of attribute id.
42 43 44 |
# File 'lib/cmis_server/repository.rb', line 42 def id @id end |
#latest_change_log_token ⇒ Object
Returns the value of attribute latest_change_log_token.
42 43 44 |
# File 'lib/cmis_server/repository.rb', line 42 def latest_change_log_token @latest_change_log_token end |
#name ⇒ Object Also known as: repository_name
Returns the value of attribute name.
42 43 44 |
# File 'lib/cmis_server/repository.rb', line 42 def name @name end |
#product_name ⇒ Object
Returns the value of attribute product_name.
42 43 44 |
# File 'lib/cmis_server/repository.rb', line 42 def product_name @product_name end |
#product_version ⇒ Object
Returns the value of attribute product_version.
42 43 44 |
# File 'lib/cmis_server/repository.rb', line 42 def product_version @product_version end |
#root_folder_id ⇒ Object
Returns the value of attribute root_folder_id.
42 43 44 |
# File 'lib/cmis_server/repository.rb', line 42 def root_folder_id @root_folder_id end |
#vendor_name ⇒ Object
Returns the value of attribute vendor_name.
42 43 44 |
# File 'lib/cmis_server/repository.rb', line 42 def vendor_name @vendor_name end |
Class Method Details
.find(id) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/cmis_server/repository.rb', line 56 def self.find(id) #Todo this is a mockup repo=self.new(id: id, name: "My Repo", description: "This is my repo !", vendor_name: "AGSI", product_name: "Plugandwork", product_version: "CmisServer Gem v#{CmisServer::VERSION}", root_folder_id: CmisServer::FolderObject.root_folder.cmis_object_id, latest_change_log_token: 0, cmis_version_supported: CmisServer::CMIS_VERSION_SUPPORTED, capabilities: Capabitilies.new( # Activer les capacités CMIS 1.1 par défaut create_type: true, bulk_update: true, append_content_stream: true, update_type: true, delete_type: true ) ) repo end |
Instance Method Details
#get_object(object_id) ⇒ Object
Méthode pour récupérer un objet CMIS par son ID
84 85 86 87 88 |
# File 'lib/cmis_server/repository.rb', line 84 def get_object(object_id) # À implémenter selon votre système de stockage # Cette méthode devrait retourner l'objet CMIS correspondant à l'ID ou nil nil end |
#infos ⇒ Object
79 80 81 |
# File 'lib/cmis_server/repository.rb', line 79 def infos [:repository_id, :repository_name, :repository_description, :vendor_name, :product_name, :product_version, :root_folder_id, :cmis_version_supported].map { |p| [p.to_s.camelize(:lower), self.send(p)] }.to_h end |