Bric::Util::Grp::Parts::Member - A Class for associating Members of a Group with attribute with in the group $LastChangedRevision$ $LastChangedDate: 2004-11-09 04:32:57 +0100 (Tue, 09 Nov 2004) $ # Constructors. my $member = Bric::Util::Grp::Parts::Member->new( $initial_state ); $member = Bric::Util::Grp::Parts::Member->lookup( { id => $id} ); my ($member_list||@members) = Bric::Util::Grp::Parts::Member->list($params); my $member_href = Bric::Util::Grp::Parts::Member->href($params); # Class methods. ($ids || @ids ) = Bric::Util::Grp::Parts::Member->list_ids({grp => $grp }) # Instances methods. my $id = $member->get_id; $member = $member->activate; $member = $member->deactivate; # Attribute methods. $member = $member->set_attrs( [name=> $name,subsys=> $subsys,val => $val}]); ($val_list||@vals) = $member->get_attrs([ {name=> $name,subsys=> $subsys}]); # Retrieve the underlying Bric object. $object = $member->get_object; A Member is a container for an object and any properties that it may have with in the group it is associated with that it would not have by its self.

Constructors
This will create a new member object with the defined initial state Supported Keys: Throws: NONE. Side Effects: NONE. Notes: NONE. Looks up a member object for a given ID. Throws: NONE. Side Effects: NONE. Notes: NONE. This will return a list or list ref of blessed Member objects that are a member of said a group. The $params hash reference supports the following keys: A Bric::Util::Grp object, the members of which are to be returned. The package name of a Bric::Util::Grp subclass, the members of which are to be returned. A Bric object for which a list of group memberships will be returned. The package name of a Bric object for which a list of group memberships will be returned. Use in combination with the "object_id" parameter. The ID of a Bric object for which a list of group memberships will be returned. Use in combination with the "object_package" parameter. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns an anonymous hash of group members. The hash values are Bric::Util::Grp::Parts::Member objects. Takes the same arguments as the "list()" method, although either the "grp" or "grp_package" parameter is required. If the group class method "get_object_class_id()" returns a value, then the hash keys will be the IDs of the objecs represented by the members. Otherwise, the keys will be the IDs of the member objects themselves. Throws: NONE. Side Effects: NONE. Notes: NONE.

Destructors
Dummy method to prevent wasting time trying to AUTOLOAD DESTROY. Throws: NONE. Side Effects: NONE. Notes: NONE.

Public Class Methods
Return a list or anonymous array of Member object ids. The supported keys in the $params hash reference are the same as for the "list()" method. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns an anonymous hash of introspection data for this object. If called with a true argument, it will return an ordered list or anonymous array of introspection data. If a second true argument is passed instead of a first, then a list or anonymous array of introspection data will be returned for properties that uniquely identify an object (excluding "id", which is assumed). Each hash key is the name of a property or attribute of the object. The value for a hash key is another anonymous hash containing the following keys: The name of the property or attribute. Is the same as the hash key when an anonymous hash is returned. The display name of the property or attribute. A reference to the method that will retrieve the value of the property or attribute. An anonymous array of arguments to pass to a call to get_meth in order to retrieve the value of the property or attribute. A reference to the method that will set the value of the property or attribute. An anonymous array of arguments to pass to a call to set_meth in order to set the value of the property or attribute. The type of value the property or attribute contains. There are only three types: If the value is a 'short' value, this hash key contains the length of the field. The property is searchable via the list() and list_ids() methods. The property or attribute is required. An anonymous hash of properties used to display the property or attribute. Possible keys include: The display field type. Possible values are The Length, in letters, to display a text or password field. The maximum length of the property or value - usually defined by the SQL DDL. The number of rows to format in a textarea field. The number of columns to format in a textarea field. An anonymous hash of key/value pairs reprsenting the values and display names to use in a select list. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns a list of the object ids that this object is a member of Throws: NONE Side Effects: NONE Notes: NONE

Public Instance Methods
returns the package of the object that is the member Throws: NONE Side Effects: NONE Notes: NONE Return the object that this member reflects Notes: The object class isn't loaded by the group class, so when using the Bric API outside of Bricolage, you need to require the object class on the fly; for example: my @members = $grp->get_members(); foreach my $m (@members) { my $pkg = $m->get_object_package(); eval "require $pkg"; my $object = $m->get_object(); } Throws: NONE Side Effects: NONE Sets an individual attribute on this member Throws: NONE Side Effects: NONE Notes: NONE Deletes attributes from this member Throws: NONE Side Effects: NONE Notes: NONE Takes a list of attributes and sets them upon the member object. Throws: NONE Side Effects: Sets a value on the attribute object Notes: NONE returns a list of the subsystems in use Throws: NONE Side Effects: NONE Notes: NONE Returns a single attribute for the member. Throws: NONE Side Effects: Returns value from the attribute object Notes: NONE Returns the attributes defined for this member object. Throws: NONE Side Effects: Returns value from the attribute object Notes: NONE Sets meta information on the attributes Throws: NONE Side Effects: NONE Notes: NONE Deletes meta information for this member Throws: NONE Side Effects: NONE Notes: NONE Returns the meta information Throws: NONE Side Effects: NONE Notes: NONE Returns a hash ref of all Throws: NONE Side Effects: NONE Notes: NONE returns a hash ref of the attrs Throws: NONE Side Effects: NONE Notes: NONE This will return the id for the object Throws: NONE Side Effects: NONE Notes: NONE Activated a member object that has been deactivated Throws: NONE Side Effects: NONE Notes: NONE Make this member object inactive Throws: NONE Side Effects: NONE Notes: NONE This will return undef if the member has been deactivated and one otherwise. Throws: NONE Side Effects: NONE Notes: NONE This will delete the member from the database (as opposed to deactivating) Throws: NONE Side Effects: NONE Notes: NONE Saves changes to the data base Throws: The grp_id or grp property is required. Side Effects: NONE Notes: NONE

Private Class Methods
Executes the query for the list constructors Throws: NONE Side Effects: NONE Notes: NONE

Private Instance Methods
Throws: NONE Side Effects: NONE Notes: NONE Will return the proper mapping table name Throws: NONE Side Effects: NONE Notes: NONE Returns the package name for a given class id Throws: NONE Side Effects: NONE Notes: NONE Returns the group that this is a member of Throws: NONE Side Effects: NONE Notes: NONE Returns a list or listref of subsys names Throws: NONE Side Effects: NONE Notes: NONE Will set an attribute on this member Throws: NONE Side Effects NONE Notes: NONE check for attributes on the member, will check the group and the group's parents if the flags are passed Throws: NONE Side Effects: NONE Notes: NONE Deletes meta information from the attribute object or the cache Throws: NONE Side Effects: NONE Notes: NONE Deletes attributes from the attribute object or its cache Throws: NONE Side Effects: NONE Notes: NONE Returns a hash of the attributes that match the parameters. It will also return default values from the group if the $group argument is passed. Throws: NONE Side Effects: NONE Notes: NONE Sets meta information on the member attributes Throws: NONE Side Effects: NONE Notes: NONE Returns meta information for a given attribute. Will check the group and the groups parents for defaults if the flags have been passed. Throws: NONE Side Effects: NONE Notes: NONE Returns the correct attribute object for this member Throws: NONE Side Effects: NONE Notes: NONE Called by save this preforms all the updates for the attribute object Throws: NONE Side Effects: NONE Notes: NONE Handles the sql to prefore a delete from the database Throws: NONE Side Effects: NONE Notes: NONE Preforms an update to the database Throws: NONE Side Effects: NONE Side Effects: NONE Preforms the sql for an insert into the member tables Throws: NONE Side Effects: NONE Notes: NONE NONE michael soderstrom ( miraso@pacbell.net ) Bric, Bric::Util::Grp, Bric::Util::Attribute