Class: Killbill::Plugin::Model::PluginInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/killbill/gen/api/plugin_info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePluginInfo

Returns a new instance of PluginInfo.



39
40
# File 'lib/killbill/gen/api/plugin_info.rb', line 39

def initialize()
end

Instance Attribute Details

#bundle_symbolic_nameObject

Returns the value of attribute bundle_symbolic_name.



37
38
39
# File 'lib/killbill/gen/api/plugin_info.rb', line 37

def bundle_symbolic_name
  @bundle_symbolic_name
end

#is_selected_for_startObject

Returns the value of attribute is_selected_for_start.



37
38
39
# File 'lib/killbill/gen/api/plugin_info.rb', line 37

def is_selected_for_start
  @is_selected_for_start
end

#plugin_keyObject

Returns the value of attribute plugin_key.



37
38
39
# File 'lib/killbill/gen/api/plugin_info.rb', line 37

def plugin_key
  @plugin_key
end

#plugin_nameObject

Returns the value of attribute plugin_name.



37
38
39
# File 'lib/killbill/gen/api/plugin_info.rb', line 37

def plugin_name
  @plugin_name
end

#plugin_stateObject

Returns the value of attribute plugin_state.



37
38
39
# File 'lib/killbill/gen/api/plugin_info.rb', line 37

def plugin_state
  @plugin_state
end

#servicesObject

Returns the value of attribute services.



37
38
39
# File 'lib/killbill/gen/api/plugin_info.rb', line 37

def services
  @services
end

#versionObject

Returns the value of attribute version.



37
38
39
# File 'lib/killbill/gen/api/plugin_info.rb', line 37

def version
  @version
end

Instance Method Details

#to_javaObject



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/killbill/gen/api/plugin_info.rb', line 42

def to_java()
  # conversion for plugin_key [type = java.lang.String]
  @plugin_key = @plugin_key.to_s unless @plugin_key.nil?

  # conversion for bundle_symbolic_name [type = java.lang.String]
  @bundle_symbolic_name = @bundle_symbolic_name.to_s unless @bundle_symbolic_name.nil?

  # conversion for plugin_name [type = java.lang.String]
  @plugin_name = @plugin_name.to_s unless @plugin_name.nil?

  # conversion for version [type = java.lang.String]
  @version = @version.to_s unless @version.nil?

  # conversion for plugin_state [type = org.killbill.billing.osgi.api.PluginState]
  @plugin_state = Java::org.killbill.billing.osgi.api.PluginState.value_of( @plugin_state.to_s ) unless @plugin_state.nil?

  # conversion for services [type = java.util.Set]
  tmp = java.util.TreeSet.new
  (@services || []).each do |m|
    # conversion for m [type = org.killbill.billing.osgi.api.PluginServiceInfo]
    m = m.to_java unless m.nil?
    tmp.add(m)
  end
  @services = tmp

  # conversion for is_selected_for_start [type = boolean]
  @is_selected_for_start = @is_selected_for_start.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_selected_for_start)
  self
end

#to_ruby(j_obj) ⇒ Object



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/killbill/gen/api/plugin_info.rb', line 72

def to_ruby(j_obj)
  # conversion for plugin_key [type = java.lang.String]
  @plugin_key = j_obj.plugin_key

  # conversion for bundle_symbolic_name [type = java.lang.String]
  @bundle_symbolic_name = j_obj.bundle_symbolic_name

  # conversion for plugin_name [type = java.lang.String]
  @plugin_name = j_obj.plugin_name

  # conversion for version [type = java.lang.String]
  @version = j_obj.version

  # conversion for plugin_state [type = org.killbill.billing.osgi.api.PluginState]
  @plugin_state = j_obj.plugin_state
  @plugin_state = @plugin_state.to_s.to_sym unless @plugin_state.nil?

  # conversion for services [type = java.util.Set]
  @services = j_obj.services
  tmp = []
  (@services || []).each do |m|
    # conversion for m [type = org.killbill.billing.osgi.api.PluginServiceInfo]
    m = Killbill::Plugin::Model::PluginServiceInfo.new.to_ruby(m) unless m.nil?
    tmp << m
  end
  @services = tmp

  # conversion for is_selected_for_start [type = boolean]
  @is_selected_for_start = j_obj.is_selected_for_start
  if @is_selected_for_start.nil?
    @is_selected_for_start = false
  else
    tmp_bool = (@is_selected_for_start.java_kind_of? java.lang.Boolean) ? @is_selected_for_start.boolean_value : @is_selected_for_start
    @is_selected_for_start = tmp_bool ? true : false
  end
  self
end