|
NAMESPOPS::ClassFactory::LDAP - Create relationships among LDAP objectsSYNOPSISIn configuration:my $config = { object => { class => 'My::Object', isa => [ 'SPOPS::LDAP' ], has_a => { 'My::OtherObject' => 'field' }, links_to => { 'My::AnotherObject' => 'uniquemember', 'My::YAObject' => 'myfield', }, }, }; DESCRIPTIONThis class implements two types of relationships: 'has_a' and 'links_to'.See SPOPS::Manual::Configuration for a discussion of the configuration parameters. METHODSNote: 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. BUGSNone known.TO DOImplement 'fetch_by'Implement 'fetch_by' functionality. SEE ALSOSPOPS::Manual::RelationshipsSPOPS::LDAP Net::LDAP SPOPS COPYRIGHTCopyright (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. AUTHORSChris Winters <chris@cwinters.com>
Visit the GSP FreeBSD Man Page Interface. |