# class ActiveLdap::Adapter::JndiConnection::ModifyRecord

### Constants

ADD_ATTRIBUTE
BasicAttribute
DirContext
REMOVE_ATTRIBUTE
REPLACE_ATTRIBUTE

### Attributes

name[R]
type[R]
values[R]

### Public Class Methods

new(type, name, values, binary) click to toggle source

    # File lib/active_ldap/adapter/jndi_connection.rb, line 50
    def initialize(type, name, values, binary)
      @type = self.class.const_get("#{type.to_s.upcase}_ATTRIBUTE")
      @name = name
      @values = values
      @binary = binary
    end

### Public Instance Methods

binary?() click to toggle source

    # File lib/active_ldap/adapter/jndi_connection.rb, line 57
    def binary?
      @binary
    end

to_java_attribute() click to toggle source

    # File lib/active_ldap/adapter/jndi_connection.rb, line 65
    def to_java_attribute
      attribute = BasicAttribute.new(@name)
      values = @values
      values = values.collect(&:to_java_bytes) if binary?
      values.each do |value|
        attribute.add(value)
      end
      attribute
    end

to_java_modification_item() click to toggle source

    # File lib/active_ldap/adapter/jndi_connection.rb, line 61
    def to_java_modification_item
      ModificationItem.new(@type, to_java_attribute)
    end