Class: JSS::DirectoryBindingType::OpenDirectory
- Inherits:
-
DirectoryBindingType
- Object
- DirectoryBindingType
- JSS::DirectoryBindingType::OpenDirectory
- Defined in:
- lib/jss/api_object/directory_binding_type/open_directory.rb
Overview
Class for the specific OpenDirectory DirectoryBinding type stored within the JSS
Attributes
Instance Attribute Summary collapse
-
#encrypt_using_ssl ⇒ Object
Attributes.
-
#perform_secure_bind ⇒ Object
Returns the value of attribute perform_secure_bind.
-
#require_confirmation ⇒ Object
Class for the specific OpenDirectory DirectoryBinding type stored within the JSS.
-
#use_for_authentication ⇒ Object
Returns the value of attribute use_for_authentication.
-
#use_for_contacts ⇒ Object
Returns the value of attribute use_for_contacts.
Instance Method Summary collapse
-
#initialize(init_data) ⇒ OpenDirectory
constructor
Constructor.
-
#type_setting_xml ⇒ REXML::Element
Return a REXML Element containing the current state of the DirectoryBindingType object for adding into the XML of the container.
Constructor Details
#initialize(init_data) ⇒ OpenDirectory
Constructor
67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/jss/api_object/directory_binding_type/open_directory.rb', line 67 def initialize(init_data) # Return without processing anything since there is # nothing to process. return if init_data.nil? # Process the provided information @encrypt_using_ssl = init_data[:encrypt_using_ssl] @perform_secure_bind = init_data[:perform_secure_bind] @use_for_authentication = init_data[:use_for_authentication] @use_for_contacts = init_data[:use_for_contacts] end |
Instance Attribute Details
#encrypt_using_ssl ⇒ Object
Attributes
60 61 62 |
# File 'lib/jss/api_object/directory_binding_type/open_directory.rb', line 60 def encrypt_using_ssl @encrypt_using_ssl end |
#perform_secure_bind ⇒ Object
Returns the value of attribute perform_secure_bind.
61 62 63 |
# File 'lib/jss/api_object/directory_binding_type/open_directory.rb', line 61 def perform_secure_bind @perform_secure_bind end |
#require_confirmation ⇒ Object
Class for the specific OpenDirectory DirectoryBinding type stored within the JSS
Attributes
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 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 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
# File 'lib/jss/api_object/directory_binding_type/open_directory.rb', line 48 class OpenDirectory < DirectoryBindingType # Mix-Ins ##################################### # Class Methods ##################################### # Class Constants ##################################### # Attributes ##################################### attr_reader :encrypt_using_ssl attr_reader :perform_secure_bind attr_reader :use_for_authentication attr_reader :use_for_contacts # Constructor ##################################### def initialize(init_data) # Return without processing anything since there is # nothing to process. return if init_data.nil? # Process the provided information @encrypt_using_ssl = init_data[:encrypt_using_ssl] @perform_secure_bind = init_data[:perform_secure_bind] @use_for_authentication = init_data[:use_for_authentication] @use_for_contacts = init_data[:use_for_contacts] end # Public Instance Methods ##################################### # Encrypt the connection using SSL # # @author Tyler Morgan # # @param newvalue [Bool] # # @raise [JSS::InvalidDataError] If the new value doesn't match a Bool value # # @return [void] def encrypt_using_ssl=(newvalue) raise JSS::InvalidDataError, "encrypt_using_ssl must be true or false." unless newvalue.is_a?(TrueClass) || newvalue.is_a(FalseClass) @encrypt_using_ssl = newvalue self.container&.should_update end # Attempt to perform a secure bind to the domain server # # @author Tyler Morgan # # @param newvalue [Bool] # # @raise [JSS::InvalidDataError] If the new value doesn't match a Bool value # # @return [void] def perform_secure_bind=(newvalue) raise JSS::InvalidDataError, "perform_secure_bind must be true or false." unless newvalue.is_a?(TrueClass) || newvalue.is_a(FalseClass) @perform_secure_bind = newvalue self.container&.should_update end # Use this binding for authentication # # @author Tyler Morgan # # @param newvalue [Bool] # # @raise [JSS::InvalidDataError] If the new value doesn't match a Bool value # # @return [void] def use_for_authentication=(newvalue) raise JSS::InvalidDataError, "use_for_authentication must be true or false." unless newvalue.is_a?(TrueClass) || newvalue.is_a(FalseClass) @use_for_authentication = newvalue self.container&.should_update end # Use this binding for contact population # # @author Tyler Morgan # # @param newvalue [Bool] # # @raise [JSS::InvalidDataError] If the new value doesn't match a Bool value # # @return [void] def use_for_contacts=(newvalue) raise JSS::InvalidDataError, "use_for_contacts must be true or false." unless newvalue.is_a?(TrueClass) || newvalue.is_a(FalseClass) @use_for_contacts = newvalue self.container&.should_update end # Return a REXML Element containing the current state of the DirectoryBindingType # object for adding into the XML of the container. # # @author Tyler Morgan # # @return [REXML::Element] def type_setting_xml type_setting = REXML::Element.new "admitmac" type_setting.add_element("encrypt_using_ssl").text = @encrypt_using_ssl type_setting.add_element("perform_secure_bind").text = @perform_secure_bind type_setting.add_element("use_for_authentication").text = @use_for_authentication type_setting.add_element("use_for_contacts").text = @use_for_contacts return type_setting end end |
#use_for_authentication ⇒ Object
Returns the value of attribute use_for_authentication.
62 63 64 |
# File 'lib/jss/api_object/directory_binding_type/open_directory.rb', line 62 def use_for_authentication @use_for_authentication end |
#use_for_contacts ⇒ Object
Returns the value of attribute use_for_contacts.
63 64 65 |
# File 'lib/jss/api_object/directory_binding_type/open_directory.rb', line 63 def use_for_contacts @use_for_contacts end |
Instance Method Details
#type_setting_xml ⇒ REXML::Element
Return a REXML Element containing the current state of the DirectoryBindingType object for adding into the XML of the container.
167 168 169 170 171 172 173 174 175 |
# File 'lib/jss/api_object/directory_binding_type/open_directory.rb', line 167 def type_setting_xml type_setting = REXML::Element.new "admitmac" type_setting.add_element("encrypt_using_ssl").text = @encrypt_using_ssl type_setting.add_element("perform_secure_bind").text = @perform_secure_bind type_setting.add_element("use_for_authentication").text = @use_for_authentication type_setting.add_element("use_for_contacts").text = @use_for_contacts return type_setting end |