class RubyAem::Resources::Node
Node
class contains API calls related to managing an AEM node.
Public Class Methods
new(client, path, name)
click to toggle source
Initialise a node.
@param client RubyAem::Client
@param path the path to the node, e.g. /apps/system/ @param name the node name, e.g. somenode @return new RubyAem::Resources::Node
instance
# File lib/ruby_aem/resources/node.rb, line 25 def initialize(client, path, name) @client = client @call_params = { path: path, name: name } @call_params[:path] = RubyAem::Swagger.path(@call_params[:path]) end
Public Instance Methods
create(type)
click to toggle source
Create a new node.
@param type the node type, e.g. sling:Folder @return RubyAem::Result
# File lib/ruby_aem/resources/node.rb, line 39 def create(type) @call_params[:type] = type @client.call(self.class, __callee__.to_s, @call_params) end
delete()
click to toggle source
Delete the node.
@return RubyAem::Result
# File lib/ruby_aem/resources/node.rb, line 47 def delete @client.call(self.class, __callee__.to_s, @call_params) end
exists()
click to toggle source
Check whether the node exists or not. If the node exists, this method returns a true result data, false otherwise.
@return RubyAem::Result
# File lib/ruby_aem/resources/node.rb, line 56 def exists @client.call(self.class, __callee__.to_s, @call_params) end