class Adobe::Aem::System

Public Class Methods

new(context) click to toggle source
# File lib/adobe/aem/system.rb, line 6
def initialize(context)
  @context = context
end

Public Instance Methods

get_bundle(name) click to toggle source
# File lib/adobe/aem/system.rb, line 28
def get_bundle(name)
  @context.connector.get("/system/console/bundles/#{name}.json")
rescue Adobe::Aem::NotFound
  nil
end
install_bundle(path) click to toggle source
# File lib/adobe/aem/system.rb, line 34
def install_bundle(path)
  options = {
    action: :install,
    bundleStartLevel: 20
  }

  raise "File: #{path} does not exist" unless File.exists?(path)
  options[:bundlefile] = UploadIO.new(path, 'application/java-archive')

  @context.connector.multipart_post('/system/console/bundles', options)
end
refresh_bundle_imports(name) click to toggle source
# File lib/adobe/aem/system.rb, line 24
def refresh_bundle_imports(name)
  @context.connector.post("/system/console/bundles/#{name}", action: 'refresh')
end
start_bundle(name) click to toggle source
# File lib/adobe/aem/system.rb, line 20
def start_bundle(name)
  @context.connector.post("/system/console/bundles/#{name}", action: 'start')
end
stop_bundle(name) click to toggle source
# File lib/adobe/aem/system.rb, line 17
def stop_bundle(name)
  @context.connector.post("/system/console/bundles/#{name}", action: 'stop')
end
uninstall_bundle(name) click to toggle source
# File lib/adobe/aem/system.rb, line 14
def uninstall_bundle(name)
  @context.connector.post("/system/console/bundles/#{name}", action: 'uninstall')
end
update_configuration(name, options) click to toggle source
# File lib/adobe/aem/system.rb, line 10
def update_configuration(name, options)
  @context.connector.post("/system/console/configMgr/#{name}", options)
end