Class: Adobe::Aem::Replication
- Inherits:
-
Object
- Object
- Adobe::Aem::Replication
- Defined in:
- lib/adobe/aem/replication.rb
Instance Method Summary collapse
- #agents ⇒ Object
-
#create_agent(type, name, options = {}, agentType = '') ⇒ Object
AgentyType can be empty for default replication agent, rev for reverse and static for static.
- #delete_agent(type, name) ⇒ Object
-
#initialize(context) ⇒ Replication
constructor
A new instance of Replication.
Constructor Details
#initialize(context) ⇒ Replication
Returns a new instance of Replication.
4 5 6 |
# File 'lib/adobe/aem/replication.rb', line 4 def initialize(context) @context = context end |
Instance Method Details
#agents ⇒ Object
8 9 10 |
# File 'lib/adobe/aem/replication.rb', line 8 def agents @context.connector.get('/etc/replication.1.json') end |
#create_agent(type, name, options = {}, agentType = '') ⇒ Object
AgentyType can be empty for default replication agent, rev for reverse and static for static
13 14 15 16 |
# File 'lib/adobe/aem/replication.rb', line 13 def create_agent(type, name, = {}, agentType = '') # agent, revagent, staticagent @context.connector.create_page("/etc/replication/#{type}", name, name, "/libs/cq/replication/templates/#{agentType}agent", ) end |
#delete_agent(type, name) ⇒ Object
18 19 20 |
# File 'lib/adobe/aem/replication.rb', line 18 def delete_agent(type, name) @context.connector.delete_page("/etc/replication/#{type}/#{name}") end |