Class | ActiveLdap::Adapter::JndiConnection::ModifyRecord |
In: |
lib/active_ldap/adapter/jndi_connection.rb
|
Parent: | Object |
DirContext | = | directory.DirContext |
BasicAttribute | = | directory.BasicAttribute |
ADD_ATTRIBUTE | = | DirContext::ADD_ATTRIBUTE |
REPLACE_ATTRIBUTE | = | DirContext::REPLACE_ATTRIBUTE |
REMOVE_ATTRIBUTE | = | DirContext::REMOVE_ATTRIBUTE |
name | [R] | |
type | [R] | |
values | [R] |
# File lib/active_ldap/adapter/jndi_connection.rb, line 42 42: def initialize(type, name, values, binary) 43: @type = self.class.const_get("#{type.to_s.upcase}_ATTRIBUTE") 44: @name = name 45: @values = values 46: @binary = binary 47: end
# File lib/active_ldap/adapter/jndi_connection.rb, line 57 57: def to_java_attribute 58: attribute = BasicAttribute.new(@name) 59: values = @values 60: values = values.collect(&:to_java_bytes) if binary? 61: values.each do |value| 62: attribute.add(value) 63: end 64: attribute 65: end