Module ActiveLdap::Operations::LDIF
In: lib/active_ldap/operations.rb
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

dump   load   to_ldif   to_ldif_record  

Classes and Modules

Module ActiveLdap::Operations::LDIF::AddRecordLoadable
Module ActiveLdap::Operations::LDIF::ContentRecordLoadable
Module ActiveLdap::Operations::LDIF::DeleteRecordLoadable
Module ActiveLdap::Operations::LDIF::ModifyNameRecordLoadable
Module ActiveLdap::Operations::LDIF::ModifyRecordLoadable

Public Instance methods

[Source]

     # File lib/active_ldap/operations.rb, line 377
377:       def dump(options={})
378:         ldif = Ldif.new
379:         options = {:base => base, :scope => scope}.merge(options)
380:         options[:connection] ||= connection
381:         options[:connection].search(options) do |dn, attributes|
382:           ldif << Ldif::Record.new(dn, attributes)
383:         end
384:         return "" if ldif.records.empty?
385:         ldif.to_s
386:       end

[Source]

     # File lib/active_ldap/operations.rb, line 396
396:       def load(ldif, options={})
397:         return if ldif.blank?
398:         Ldif.parse(ldif).each do |record|
399:           record.load(self, options)
400:         end
401:       end

[Source]

     # File lib/active_ldap/operations.rb, line 392
392:       def to_ldif(dn, attributes)
393:         Ldif.new([to_ldif_record(dn, attributes)]).to_s
394:       end

[Source]

     # File lib/active_ldap/operations.rb, line 388
388:       def to_ldif_record(dn, attributes)
389:         Ldif::Record.new(dn, attributes)
390:       end

[Validate]