Class: RubyAem::Resources::AuthorizableKeystore

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_aem/resources/authorizable_keystore.rb

Overview

AEM class contains API calls related to managing the AEM Authorizable Keystore.

Instance Method Summary collapse

Constructor Details

#initialize(client, intermediate_path, authorizable_id) ⇒ Object

Initialise an Authorizable Keystore

Parameters:

  • client

    RubyAem::Client

  • intermediate_path

    AEM User home path

  • authorizable_id

    AEM User id



30
31
32
33
34
35
36
37
38
# File 'lib/ruby_aem/resources/authorizable_keystore.rb', line 30

def initialize(client, intermediate_path, authorizable_id)
  @client = client
  @call_params = {
    intermediate_path: intermediate_path,
    authorizable_id: authorizable_id
  }

  @call_params[:intermediate_path] = RubyAem::Swagger.path(@call_params[:intermediate_path])
end

Instance Method Details

#change_password(old_password, new_password) ⇒ Object

Returns RubyAem::Result.

Returns:

  • RubyAem::Result



55
56
57
58
59
# File 'lib/ruby_aem/resources/authorizable_keystore.rb', line 55

def change_password(old_password, new_password)
  @call_params[:old_password] = old_password
  @call_params[:new_password] = new_password
  @client.call(self.class, __callee__.to_s, @call_params)
end

#create(password) ⇒ Object

Create AEM Authorizable Keystore.

Parameters:

  • password

    Password for the keystore

Returns:

  • RubyAem::Result



44
45
46
47
# File 'lib/ruby_aem/resources/authorizable_keystore.rb', line 44

def create(password)
  @call_params[:password] = password
  @client.call(self.class, __callee__.to_s, @call_params)
end

#deleteObject

Delete AEM Authorizable Keystore

Returns:

  • RubyAem::Result



75
76
77
# File 'lib/ruby_aem/resources/authorizable_keystore.rb', line 75

def delete
  @client.call(self.class, __callee__.to_s, @call_params)
end

#download(file_path) ⇒ Object

Download the AEM Keystore to a specified directory.

Parameters:

  • file_path

    the directory where the Keystore will be downloaded to

Returns:

  • RubyAem::Result



65
66
67
68
69
70
# File 'lib/ruby_aem/resources/authorizable_keystore.rb', line 65

def download(
  file_path
)
  @call_params[:file_path] = file_path
  @client.call(self.class, __callee__.to_s, @call_params)
end

#existsObject

Check if a keystore for the given authorizable id already exists.

Returns:

  • RubyAem::Result



82
83
84
# File 'lib/ruby_aem/resources/authorizable_keystore.rb', line 82

def exists
  @client.call(self.class, __callee__.to_s, @call_params)
end

#infoObject

Retrieve AEM Authorizable Keystore info.

Returns:

  • RubyAem::Result



89
90
91
# File 'lib/ruby_aem/resources/authorizable_keystore.rb', line 89

def info
  @client.call(self.class, __callee__.to_s, @call_params)
end