Bric::Group - A Class for associating Objects
$Revision: 1.6 $
$Date: 2002/01/06 04:40:35 $
$group = Bric::Group->new();
$group = $group->set_name( $name )
$name = $group->get_name()
$group = $group->set_description()
$desc = $group->get_description()
$id = $group->get_id()
$success = $group->delete() || $success = Bric::Group->delete( $group_id )
($member || undef) = Bric::Group->is_associated(
($obj || {type => $t, id => $id} ), $group_id ,$attr )
$group = $group->set_members( [$obj || { type => $type, id => $id}] )
(@members || $member_aref) = $group->get_members()
$group = $group->delete_members([$obj || $member || {type=> $t,id=> $id}])
($member || undef) = $group->has_member(
($obj || {type => $t, id => $id}, $attr )
$attr_obj = $group->get_attr_obj()
(@vals || $val_aref) =
$group->get_member_attrs( [ { name => $name, subsys => $subsys} ])
$success = $group->set_member_attrs(
[ { name => $name, subsys => $subsys, value => $value } ] )
(@vals || $val_aref) =
$group->get_group_attrs( [ $name ])
$success = $group->set_group_attrs(
[ { name => $name, value => $value } ] )
$group = $group->save()
Group is a class that associates Objects together. These can be
assigned Attributes as a group or to the member class which will
allow attributes to be set on an object in association with a group.
This will create a new group object
notes:
throws: None
side effects: None
notes: None
This will lookup an existing group based on the given criteria, usualy
$criteria = { id => $id }
throws: None
side effects: None
notes: None
Given the hash ref of args (what they might be will be defined in a bit)
this will return a list or a list ref of objects that match.
throws: None
side effects: None
notes: None
This will remove the group(s) that are passed as args
throws: None
side effects: None
notes: None
This will take an object ( or it's unique identifiers) and a group ( or it's
unique identifiers) and an optional set of attributes and will return the
member object if said object is a member of said group with the stated
attributes
throws: None
side effects: None
notes:
Returns the name that has been given to the group
throws: None
side effects: None
notes:
sets the name to the given name
throws: None
side effects: None
notes:
Returns the description that was given to the group
throws: None
side effects: None
notes:
Sets the description to the given argument
throws: None
side effects: None
notes:
Returns the database id of the group object
throws: None
side effects: None
notes: None
makes an inactive group active again
throws: None
side effects: None
notes: None
Makes a group inactive
throws: None
side effects: None
notes: None
Returns 1 if the group is active, undef if it is inactive
throws: None
side effects: None
notes: None
Takes a list of hash refs with the keys ob obj which has a value of the
object (or its unique identifiers) and attr which will be the attributes that
are placed on the member object. This will add the object to the group.
throws: None
side effects: None
notes: None
Returns a list or a list ref of the member objects that are in the group
throws: None
side effects: None
notes: None
Takes a lsit of objects or their unique identifiers ard removes them from the
group
throws: None
side effects: None
notes: None
Responds with the member object if object is a member or undef otherwise
throws: None
side effects:
notes:
Returns the attribute object that is associated with the group
throws: None
side effects: None
notes: None
Set default attributes for members of the group. These can be over rided
by setting the attributes of the member.
throws: None
side effects: None
notes: None
Retrieves the value of the attribute that has been assigned as a default
for members that has the given name and subsystem
throws: None
side effects: None
notes:
Get attributes that describe the group but do not apply to members.
This retrieves the value in the attribute object from a special subsystem
which contains these. This will be returned as a list of values
throws: None
side effects: None
notes: None
Sets attributes that describe the group but do not apply to members.
This sets the value in the attribute object to a special subsystem
which contains these
throws: None
side effects: None
notes: None
Updates the database to reflect the changes made to the object
throws: None
side effects: None
notes: None
This module is still in progress.
michael soderstrom ( miraso@pacbell.net )
Hey! The above document had some coding errors, which are explained below:
You forgot a '=back' before '=head2'
=back without =over