Class: RubyAem::ReplicationAgent
- Inherits:
-
Object
- Object
- RubyAem::ReplicationAgent
- Defined in:
- lib/ruby_aem/replication_agent.rb
Overview
ReplicationAgent class contains API calls related to managing an AEM replication agent.
Instance Method Summary collapse
-
#create_update(title, description, dest_base_url) ⇒ Object
Create or update a replication agent.
-
#delete ⇒ Object
Delete the replication agent.
-
#exists ⇒ Object
Check whether the replication agent exists or not.
-
#initialize(client, run_mode, name) ⇒ Object
constructor
Initialise a replication agent.
Constructor Details
#initialize(client, run_mode, name) ⇒ Object
Initialise a replication agent.
27 28 29 30 31 32 33 |
# File 'lib/ruby_aem/replication_agent.rb', line 27 def initialize(client, run_mode, name) @client = client @info = { run_mode: run_mode, name: name } end |
Instance Method Details
#create_update(title, description, dest_base_url) ⇒ Object
Create or update a replication agent.
41 42 43 44 45 46 |
# File 'lib/ruby_aem/replication_agent.rb', line 41 def create_update(title, description, dest_base_url) @info[:title] = title @info[:description] = description @info[:dest_base_url] = dest_base_url @client.call(self.class, __callee__.to_s, @info) end |
#delete ⇒ Object
Delete the replication agent.
51 52 53 |
# File 'lib/ruby_aem/replication_agent.rb', line 51 def delete() @client.call(self.class, __callee__.to_s, @info) end |
#exists ⇒ Object
Check whether the replication agent exists or not. If the replication agent exists, this method returns a success result. Otherwise it returns a failure result.
60 61 62 |
# File 'lib/ruby_aem/replication_agent.rb', line 60 def exists() @client.call(self.class, __callee__.to_s, @info) end |