Bric::Util::Grp::Category - A module to group assets into categories. $LastChangedRevision$ $LastChangedDate: 2005-10-12 21:48:33 +0200 (Wed, 12 Oct 2005) $ 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(); 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.

Constructors
Inherited Throws: NONE Side Effects: NONE Notes: NONE 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'. Inherited. Throws: NONE Side Effects: NONE Notes: NONE

Destructors
Dummy method to prevent wasting time trying to AUTOLOAD DESTROY

Public Class Methods
NONE

Public Instance Methods
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 "list()" 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 "get_supported_classes" in that some classes' "list()" methods may inherit from others, and we don't want the same "list()" 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 template 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 NONE "Garth Webb" <garth@perijove.com> Bricolage Engineering perl, Bric, Bric::Util::Grp