SPOPS logo

NAME

SPOPS::ClassFactory::LDAP - Create relationships among LDAP objects

SYNOPSIS

In configuration:

 my $config = {
    object => {
      class    => 'My::Object',
      isa      => [ 'SPOPS::LDAP' ],
      has_a    => { 'My::OtherObject'   => 'field' },
      links_to => { 'My::AnotherObject' => 'uniquemember',
                    'My::YAObject'      => 'myfield', },
    },
 };

DESCRIPTION

This class implements two types of relationships: 'has_a' and 'links_to'.

See SPOPS::Manual::Configuration for a discussion of the configuration parameters.

METHODS

Note: Even though the first parameter for all behaviors is $class, they are not class methods. The parameter refers to the class into which the behaviors will be installed.

conf_relate_has_a( $class )

The 'a' part of the 'has_a' term is a bit of a misnomer -- this works whether the property has one or more DNs. It creates a single method named for the alias of the class to which it is linking. So:

  group => {
      class => 'My::Group',
      isa   => [ 'SPOPS::LDAP' ],
      has_a => { 'My::User' => 'uniquemember' },
  },
  user => {
      class => 'My::User',
  },

Would create a method 'user' so you could do:

  my $user_list = $group->user;
  foreach my $user ( @{ $user_list } ) {
      print "DN: ", $user->dn, "\n";
  }

conf_relate_links_to( $class )

This creates three methods for every entry -- note that \@item_list can be either ID values of objects to add/remove or the objects themselves.

conf_fetch_by( $class )

Do not use the 'fetch_by' implemented by SPOPS (yet), so stop the processing of this slot here.

BUGS

None known.

TO DO

Implement 'fetch_by'

Implement 'fetch_by' functionality.

SEE ALSO

SPOPS::Manual::Relationships

SPOPS::LDAP

Net::LDAP

SPOPS

COPYRIGHT

Copyright (c) 2001-2004 MSN Marketing Services Nordwest, GmbH. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHORS

Chris Winters <chris@cwinters.com>

Generated from the SPOPS 0.87 source.

SourceForge Logo