Class ActiveLdap::Ldif::ModifyRecord
In: lib/active_ldap/ldif.rb
Parent: ChangeRecord
Error AttributeAssignmentError AdapterNotSpecified OperationNotPermitted RequiredObjectClassMissed ConnectionError RequiredAttributeMissed LdifInvalid LdapError DistinguishedNameNotSetError EntryNotFound SaveError StrongAuthenticationRequired NotImplemented AdapterNotFound TimeoutError AuthenticationError AttributeValueInvalid EntryNotSaved DistinguishedNameInputInvalid EntryAlreadyExist ObjectClassError UnknownAttribute EntryInvalid DeleteError ConfigurationError ConnectionNotSetup DistinguishedNameInvalid Schema\n[lib/active_ldap/schema.rb\nlib/active_ldap/schema/syntaxes.rb] Base DistinguishedName Reloadable::Deprecated Reloadable::Subclasses Enumerable Ldif Collection EntryAttribute StandardError Children HasMany HasManyWrap BelongsToMany Proxy BelongsTo Normalizable Common Find LDIF Delete Update GetText Parser ActiveRecord::Callbacks ActiveRecord::Validations Base\n[lib/active_ldap/adapter/base.rb\nlib/active_ldap/adapter/jndi.rb\nlib/active_ldap/adapter/ldap.rb\nlib/active_ldap/adapter/net_ldap.rb] Jndi Ldap NetLdap GetTextSupport Xml JndiConnection lib/active_ldap/distinguished_name.rb lib/active_ldap/base.rb lib/active_ldap/xml.rb lib/active_ldap/schema.rb lib/active_ldap/entry_attribute.rb lib/active_ldap/ldif.rb lib/active_ldap/ldap_error.rb LdapBenchmarking ActionController ClassMethods Associations Compatible ClassMethods Tree Acts lib/active_ldap/association/has_many_wrap.rb lib/active_ldap/association/children.rb lib/active_ldap/association/collection.rb lib/active_ldap/association/proxy.rb lib/active_ldap/association/belongs_to_many.rb lib/active_ldap/association/belongs_to.rb lib/active_ldap/association/has_many.rb HasManyUtils Association Populate Command ClassMethods Normalizable Attributes Escape GetTextSupport Update Common ModifyNameRecordLoadable AddOperationModifiable DeleteOperationModifiable ReplaceOperationModifiable ModifyRecordLoadable DeleteRecordLoadable AddRecordLoadable ContentRecordLoadable LDIF Delete Find Operations ClassMethods Configuration lib/active_ldap/get_text/parser.rb GetText ClassMethods Callbacks ClassMethods ObjectClass Validations lib/active_ldap/adapter/jndi_connection.rb lib/active_ldap/adapter/net_ldap.rb lib/active_ldap/adapter/ldap.rb lib/active_ldap/adapter/base.rb lib/active_ldap/adapter/jndi.rb Adapter Helper GetTextFallback ClassMethods HumanReadable Salt UserPassword ClassMethods Connection ActiveLdap dot/m_45_0.png

Methods

<<   ==   add_operation   each   new   to_s_content  

Included Modules

Enumerable

Classes and Modules

Class ActiveLdap::Ldif::ModifyRecord::AddOperation
Class ActiveLdap::Ldif::ModifyRecord::DeleteOperation
Class ActiveLdap::Ldif::ModifyRecord::Operation
Class ActiveLdap::Ldif::ModifyRecord::ReplaceOperation

Attributes

operations  [R] 

Public Class methods

[Source]

     # File lib/active_ldap/ldif.rb, line 838
838:       def initialize(dn, controls=[], operations=[])
839:         super(dn, {}, controls, "modify")
840:         @operations = operations
841:       end

Public Instance methods

[Source]

     # File lib/active_ldap/ldif.rb, line 847
847:       def <<(operation)
848:         @operations << operation
849:       end

[Source]

     # File lib/active_ldap/ldif.rb, line 856
856:       def ==(other)
857:         super(other) and @operations == other.operations
858:       end

[Source]

     # File lib/active_ldap/ldif.rb, line 851
851:       def add_operation(type, attribute, options, attributes)
852:         klass = self.class.const_get("#{type.to_s.capitalize}Operation")
853:         self << klass.new(attribute, options, attributes)
854:       end

[Source]

     # File lib/active_ldap/ldif.rb, line 843
843:       def each(&block)
844:         @operations.each(&block)
845:       end

Private Instance methods

[Source]

     # File lib/active_ldap/ldif.rb, line 861
861:       def to_s_content
862:         result = super
863:         return result if @operations.empty?
864:         @operations.collect do |operation|
865:           result << "#{operation}-\n"
866:         end
867:         result
868:       end

[Validate]