Class: RubyAem::Resources::OutboxReplicationAgent
- Inherits:
-
Object
- Object
- RubyAem::Resources::OutboxReplicationAgent
- Defined in:
- lib/ruby_aem/resources/outbox_replication_agent.rb
Overview
OutboxReplicationAgent class contains API calls related to managing an AEM outbox replication agent.
Instance Method Summary collapse
-
#create_update(title, description, dest_base_url, opts = { user_id: 'admin', log_level: 'error', retry_delay: 30_000 }) ⇒ Object
Create or update a outbox replication agent.
-
#delete ⇒ Object
Delete the outbox replication agent.
-
#exists ⇒ Object
Check whether the outbox replication agent exists or not.
-
#initialize(client, run_mode, name) ⇒ Object
constructor
Initialise a outbox replication agent.
Constructor Details
#initialize(client, run_mode, name) ⇒ Object
Initialise a outbox replication agent.
25 26 27 28 29 30 31 |
# File 'lib/ruby_aem/resources/outbox_replication_agent.rb', line 25 def initialize(client, run_mode, name) @client = client @call_params = { run_mode: run_mode, name: name } end |
Instance Method Details
#create_update(title, description, dest_base_url, opts = { user_id: 'admin', log_level: 'error', retry_delay: 30_000 }) ⇒ Object
Create or update a outbox replication agent.
-
user_id: outbox agent’s user ID, default is admin
-
log_level: error, info, debug, default is error
-
retry_delay: in milliseconds, default is 30_000
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/ruby_aem/resources/outbox_replication_agent.rb', line 43 def create_update( title, description, dest_base_url, opts = { user_id: 'admin', log_level: 'error', retry_delay: 30_000 } ) @call_params[:title] = title @call_params[:description] = description @call_params[:dest_base_url] = dest_base_url @call_params = @call_params.merge(opts) @client.call(self.class, __callee__.to_s, @call_params) end |
#delete ⇒ Object
Delete the outbox replication agent.
63 64 65 |
# File 'lib/ruby_aem/resources/outbox_replication_agent.rb', line 63 def delete @client.call(self.class, __callee__.to_s, @call_params) end |
#exists ⇒ Object
Check whether the outbox replication agent exists or not. If the outbox replication agent exists, this method returns a true result data, false otherwise.
72 73 74 |
# File 'lib/ruby_aem/resources/outbox_replication_agent.rb', line 72 def exists @client.call(self.class, __callee__.to_s, @call_params) end |