GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SPOPS::ClassFactory::LDAP(3) User Contributed Perl Documentation SPOPS::ClassFactory::LDAP(3)

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

In configuration:

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

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

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

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";
  }
  • $alias: Returns an arrayref of objects to which this object is linked.
  • "$alias_add( \@item_list )": Adds links for this object to every object specified in "\@item_list".
  • $alias_remove: Removes links to this object from every object specified in "\@item_list".

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.

  • $alias: Returns an arrayref of objects to which this object is linked.
  • "$alias_add( \@item_list )": Adds links for this object to every object specified in "\@item_list".
  • $alias_remove: Removes links to this object from every object specified in "\@item_list".

conf_fetch_by( $class )

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

None known.

Implement 'fetch_by'

Implement 'fetch_by' functionality.

SPOPS::Manual::Relationships

SPOPS::LDAP

Net::LDAP

SPOPS

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.

Chris Winters <chris@cwinters.com>
2004-06-02 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.