Class: Puppet_X::Coi::Jboss::Provider::Datasource::PreWildFlyProvider
- Inherits:
-
Object
- Object
- Puppet_X::Coi::Jboss::Provider::Datasource::PreWildFlyProvider
- Defined in:
- lib/puppet_x/coi/jboss/provider/datasource/pre_wildfly_provider.rb
Overview
A class for JBoss pre WildFly datasource provider
Instance Method Summary collapse
-
#initialize(provider) ⇒ PreWildFlyProvider
constructor
Standard constructor.
-
#jta ⇒ String|String
Method that return true if we need xa r else returns value of jta attribute.
-
#jta=(value) ⇒ Object
Method that sets value of jta.
-
#jta_opt(cmd) ⇒ String
Method that adds jta options to command.
-
#xa_datasource_properties_wrapper(parameters) ⇒ String
Method that wraps given parameter in curly braces.
Constructor Details
#initialize(provider) ⇒ PreWildFlyProvider
Standard constructor
5 6 7 |
# File 'lib/puppet_x/coi/jboss/provider/datasource/pre_wildfly_provider.rb', line 5 def initialize(provider) @provider = provider end |
Instance Method Details
#jta ⇒ String|String
Method that return true if we need xa r else returns value of jta attribute
18 19 20 |
# File 'lib/puppet_x/coi/jboss/provider/datasource/pre_wildfly_provider.rb', line 18 def jta @provider.getattrib('jta').to_s end |
#jta=(value) ⇒ Object
Method that sets value of jta
24 25 26 |
# File 'lib/puppet_x/coi/jboss/provider/datasource/pre_wildfly_provider.rb', line 24 def jta=(value) @provider.setattrib('jta', value.to_s) end |
#jta_opt(cmd) ⇒ String
Method that adds jta options to command
31 32 33 |
# File 'lib/puppet_x/coi/jboss/provider/datasource/pre_wildfly_provider.rb', line 31 def jta_opt(cmd) cmd.push "--jta=#{@provider.resource[:jta].inspect}" end |
#xa_datasource_properties_wrapper(parameters) ⇒ String
Method that wraps given parameter in curly braces
12 13 14 |
# File 'lib/puppet_x/coi/jboss/provider/datasource/pre_wildfly_provider.rb', line 12 def xa_datasource_properties_wrapper(parameters) "[#{parameters}]" end |