Class ActiveLdap::Schema::ObjectClass
In: lib/active_ldap/schema.rb
Parent: Entry
Error AttributeAssignmentError AdapterNotSpecified OperationNotPermitted RequiredObjectClassMissed ConnectionError RequiredAttributeMissed LdifInvalid DistinguishedNameNotSetError EntryNotFound LdapError SaveError StrongAuthenticationRequired AdapterNotFound ConnectionNotEstablished TimeoutError AuthenticationError AttributeValueInvalid EntryNotSaved DistinguishedNameInputInvalid EntryAlreadyExist ObjectClassError UnknownAttribute EntryInvalid DeleteError ConfigurationError DistinguishedNameInvalid Base DistinguishedName Reloadable::Deprecated Reloadable::Subclasses Enumerable Ldif Collection EntryAttribute StandardError Children HasMany HasManyWrap 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 Schema\n[lib/active_ldap/schema.rb\nlib/active_ldap/schema/syntaxes.rb] JndiConnection lib/active_ldap/distinguished_name.rb lib/active_ldap/base.rb lib/active_ldap/schema.rb lib/active_ldap/entry_attribute.rb lib/active_ldap/ldif.rb lib/active_ldap/ldap_error.rb ClassMethods Associations LdapBenchmarking ActionController ClassMethods Tree Acts 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 Command Update Common ModifyNameRecordLoadable AddOperationModifiable DeleteOperationModifiable ReplaceOperationModifiable ModifyRecordLoadable DeleteRecordLoadable AddRecordLoadable ContentRecordLoadable LDIF Delete Find Operations ClassMethods Normalizable Attributes GetTextSupport Escape 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/base.rb lib/active_ldap/adapter/jndi.rb Adapter Helper GetTextFallback ClassMethods HumanReadable ClassMethods Connection Salt UserPassword ActiveLdap dot/m_44_0.png

Methods

Attributes

super_classes  [R] 

Public Class methods

[Source]

     # File lib/active_ldap/schema.rb, line 565
565:       def initialize(name, schema)
566:         super(name, schema, "objectClasses")
567:       end

Public Instance methods

[Source]

     # File lib/active_ldap/schema.rb, line 581
581:       def may(include_super_class=true)
582:         if include_super_class
583:           @all_may
584:         else
585:           @may
586:         end
587:       end

[Source]

     # File lib/active_ldap/schema.rb, line 573
573:       def must(include_super_class=true)
574:         if include_super_class
575:           @all_must
576:         else
577:           @must
578:         end
579:       end

[Source]

     # File lib/active_ldap/schema.rb, line 569
569:       def super_class?(object_class)
570:         @super_classes.include?(object_class)
571:       end

Private Instance methods

[Source]

     # File lib/active_ldap/schema.rb, line 632
632:       def attribute(attribute_name, name=@name)
633:         @schema.object_class_attribute(name, attribute_name)
634:       end

[Source]

     # File lib/active_ldap/schema.rb, line 614
614:       def collect_attributes
615:         must = attribute('MUST').collect {|name| @schema.attribute(name)}
616:         may = attribute('MAY').collect {|name| @schema.attribute(name)}
617: 
618:         all_must = must.dup
619:         all_may = may.dup
620:         @super_classes.each do |super_class|
621:           all_must.concat(super_class.must(false))
622:           all_may.concat(super_class.may(false))
623:         end
624: 
625:         # Clean out the dupes.
626:         all_must.uniq!
627:         all_may.uniq!
628: 
629:         [must, may, all_must, all_may]
630:       end

[Source]

     # File lib/active_ldap/schema.rb, line 590
590:       def collect_info
591:         @description = attribute("DESC")[0]
592:         @super_classes = collect_super_classes
593:         @must, @may, @all_must, @all_may = collect_attributes
594:       end

[Source]

     # File lib/active_ldap/schema.rb, line 596
596:       def collect_super_classes
597:         super_classes = attribute('SUP')
598:         loop do
599:           start_size = super_classes.size
600:           new_super_classes = []
601:           super_classes.each do |super_class|
602:             new_super_classes.concat(attribute('SUP', super_class))
603:           end
604: 
605:           super_classes.concat(new_super_classes)
606:           super_classes.uniq!
607:           break if super_classes.size == start_size
608:         end
609:         super_classes.collect do |name|
610:           @schema.object_class(name)
611:         end
612:       end

[Validate]