man Bric::Util::Grp::Asset () - A module to group assets into categories.

NAME

Bric::Util::Grp::Category - A module to group assets into categories.

VERSION

$LastChangedRevision$

DATE

$LastChangedDate: 2004-08-12 17:13:34 -0700 (Thu, 12 Aug 2004) $

SYNOPSIS

 use Bric::Util::Grp::Asset;

 # Return a new category object.
 my $bag = new Bric::Util::Grp::Asset($init);

 my $bag = lookup Bric::Util::Grp::Asset({'id' => $cat_id});

 my @bag = list Bric::Util::Grp::Asset($param);

 # Get/set the name of this category.
 $bag    = $bag->set_name($name);
 $name   = $bag->get_name()

 # Get/set the description of this category.
 $bag    = $bag->set_description()
 $desc   = $bag->get_description()

 # Get the parent of this category.
 $parent  = $bag->get_parent();

 # Add one or more sub categories to this category.
 $bag     = $bag->add_asset([@ba_obj]);
 $bag     = $bag->add_media_id([$id]);
 $bag     = $bag->add_story_id([$id]);

 # Return all sub bagegories of this bagegory.
 @bags    = $bag->get_assets();

 # Save this category to the database.
 $success = $bag->save();

 # Remove this category from the database.
 $success = $bag->remove();

DESCRIPTION

Allows assets to be grouped into categories. In addition to assets a category can contain other categories, allowing a hierarchical layout of categories and assets.

INTERFACE

Constructors

$obj = new Bric::Util::Grp::Asset($init);
Inherited Throws: NONE Side Effects: NONE Notes: NONE
@objs = lookup Bric::Util::Grp::Asset($cat_id);
Inherited Throws: NONE Side Effects: NONE Notes: This is the default lookup constructor which should be overrided in all derived classes even if it just calls 'die'.
@objs = list Bric::Util::Grp::Asset($param);
Inherited. Throws: NONE Side Effects: NONE Notes: NONE

Destructors

$self->DESTROY
Dummy method to prevent wasting time trying to AUTOLOAD DESTROY

Public Class Methods

NONE

Public Instance Methods

$class_id = Bric::Util::Grp::Asset->get_class_id()
This will return the class id that this group is associated with it should have an id that maps to the class object instance that is associated with the class of the grp ie Bric::Util::Grp::AssetVersion Throws: NONE Side Effects: NONE Notes: Overwrite this in your sub classes This supplies a package to table name mapping. Throws: NONE Side Effects: NONE Notes: NONE Returns a list or anonymous array of the supported classes in the group that can have their CWlist() methods called in succession to assemble a list of member objects. This data varies from that stored in the keys in the hash reference returned by CWget_supported_classes in that some classes' CWlist() methods may inherit from others, and we don't want the same CWlist() method executed more than once. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns a Bric::Util::Class object describing this class. Throws: NONE. Side Effects: NONE. Notes: Uses Bric::Util::Class->lookup() internally. Returns a Bric::Util::Class object describing the members of this group. Throws: NONE. Side Effects: NONE. Notes: Uses Bric::Util::Class->lookup() internally. Add one or more sub categories to this category. Throws: NONE Side Effects: NONE Notes: NONE Add a story asset ID. Throws: NONE Side Effects: NONE Notes: NONE Add a media asset ID. Throws: NONE Side Effects: NONE Notes: NONE Add a formatting asset ID. Throws: NONE Side Effects: NONE Notes: NONE Return all assets. Throws: NONE Side Effects: NONE Notes: NONE Remove this category from the database. Throws:
*
Method not implemented Side Effects: NONE Notes: This call will remove itself and all its associations with keywords, other categories and assets. This will *not* delete the objects attached to these associations.

Private Methods

Private Class Methods

NONE

Private Instance Methods

NONE

NOTES

NONE

AUTHOR

Garth Webb <garth@perijove.com> Bricolage Engineering

SEE ALSO

perl, Bric, Bric::Util::Grp