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 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] DistinguishedName Base Reloadable::Deprecated Reloadable::Subclasses Enumerable Ldif Collection EntryAttribute StandardError Children HasManyWrap HasMany BelongsToMany Proxy BelongsTo Common Find LDIF Delete Update Normalizable 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 Compatible ClassMethods Associations LdapBenchmarking ActionController Populate 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 ClassMethods Tree Acts Command Update Common ModifyNameRecordLoadable AddOperationModifiable DeleteOperationModifiable ReplaceOperationModifiable ModifyRecordLoadable DeleteRecordLoadable AddRecordLoadable ContentRecordLoadable LDIF Delete Find Operations GetTextSupport Escape ClassMethods Normalizable Attributes ClassMethods Configuration ClassMethods ObjectClass lib/active_ldap/get_text/parser.rb GetText ClassMethods Callbacks 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/jndi.rb Adapter Helper GetTextFallback ClassMethods HumanReadable Salt UserPassword ClassMethods Connection ActiveLdap dot/m_46_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 837
837:       def initialize(dn, controls=[], operations=[])
838:         super(dn, {}, controls, "modify")
839:         @operations = operations
840:       end

Public Instance methods

[Source]

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

[Source]

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

[Source]

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

[Source]

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

Private Instance methods

[Source]

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

[Validate]