Module: Cosmos::RJR

Includes:
Cosmos, Omega, Omega::Server::DSL
Defined in:
lib/cosmos/rjr/get.rb,
lib/cosmos/rjr/init.rb,
lib/cosmos/rjr/state.rb,
lib/cosmos/rjr/create.rb,
lib/cosmos/rjr/resources.rb,
lib/cosmos/rjr/interconnects.rb

Constant Summary collapse

GET_METHODS =
{ :get_entities => get_entities }
PRIVILEGES =

Cosmos::RJR data

[['view',   'locations'],
['create', 'locations']]
STATE_METHODS =
{ :save_state => save_state,
:restore_state => restore_state }
CREATE_METHODS =
{ :create_entity => create_entity }
RESOURCES_METHODS =
{ :set_resource  => set_resource,
:get_resource  => get_resource,
:get_resources => get_resources }
INTERCONNECTS_METHODS =
{ :interconnects => interconnects }

Config options collapse

Config options collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Omega::Server::DSL

#check_attribute, #check_privilege, #cosmos_entity?, #current_session, #current_user, #delete_event_handler_for, #filter_properties, #filters_from_args, #from_valid_source?, #handle_node_closed, #in_subsystem, #is_cmd?, #is_node?, #login, #matching, #persistent_transport?, #remove_callbacks_for, #require_attribute, #require_persistent_transport!, #require_privilege, #require_state, #require_valid_source!, #subsystem, #subsystem_entity?, #subsystem_event?, #validate_session_source!, #with, #with_id

Class Attribute Details

.cosmos_rjr_passwordObject

Password to use to communicate w/ other modules over the local rjr node


25
26
27
# File 'lib/cosmos/rjr/init.rb', line 25

def cosmos_rjr_password
  @cosmos_rjr_password
end

.cosmos_rjr_usernameObject

User to use to communicate w/ other modules over the local rjr node


22
23
24
# File 'lib/cosmos/rjr/init.rb', line 22

def cosmos_rjr_username
  @cosmos_rjr_username
end

Class Method Details

.nodeObject


54
55
56
# File 'lib/cosmos/rjr/init.rb', line 54

def self.node
  @node ||= ::RJR::Nodes::Local.new :node_id => self.user.id
end

.registryObject


70
71
72
# File 'lib/cosmos/rjr/init.rb', line 70

def self.registry
  @registry ||= Cosmos::Registry.new
end

.resetObject


78
79
80
# File 'lib/cosmos/rjr/init.rb', line 78

def self.reset
  Cosmos::RJR.registry.clear!
end

.set_config(config) ⇒ Object

Set config options using Omega::Config instance


30
31
32
33
# File 'lib/cosmos/rjr/init.rb', line 30

def set_config(config)
  self.cosmos_rjr_username  = config.cosmos_rjr_user
  self.cosmos_rjr_password  = config.cosmos_rjr_pass
end

.userObject


44
45
46
47
48
# File 'lib/cosmos/rjr/init.rb', line 44

def self.user
  @user ||= Users::User.new(:id       => Cosmos::RJR.cosmos_rjr_username,
                            :password => Cosmos::RJR.cosmos_rjr_password,
                            :registration_code => nil)
end

.user_registryObject


62
63
64
# File 'lib/cosmos/rjr/init.rb', line 62

def self.user_registry
  Users::RJR.registry
end

Instance Method Details

#nodeObject


58
59
60
# File 'lib/cosmos/rjr/init.rb', line 58

def node
  Cosmos::RJR.node
end

#registryObject


74
75
76
# File 'lib/cosmos/rjr/init.rb', line 74

def registry
  Cosmos::RJR.registry
end

#userObject


50
51
52
# File 'lib/cosmos/rjr/init.rb', line 50

def user
  Cosmos::RJR.user
end

#user_registryObject


66
67
68
# File 'lib/cosmos/rjr/init.rb', line 66

def user_registry
  Cosmos::RJR.user_registry
end