man Bric::Biz::Asset::Business::Parts::Tile () - Bricolage Document Element base class

NAME

Bric::Biz::Asset::Business::Parts::Tile - Bricolage Document Element base class

VERSION

$LastChangedRevision$

DATE

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

SYNOPSIS

 my @elements = Bric::Biz::Asset::Business::Parts::Tile->list($params)

 $id = $element->get_id;
 $element = $element->activate;
 $element = $element->deactivate;
 my $active = $element->is_active;
 $element = $element->save;

DESCRIPTION

This class defins the common structure of elements, the building blocks of Bricolage story and media documents. There are two types of elements: container elements and data elements. Container elements can contain any number of container and data subelements. Data elements contain values, and corrspond to fields in the Bricolage UI. See Bric::Biz::Asset::Business::Parts::Tile::Container and Bric::Biz::Asset::Business::Parts::Tile::Data for details of their interfaces and how they vary from Bric::Biz::Asset::Business::Parts::Tile.

INTERFACE

Constructors

Constructs a new element. Its attributes can be initialized via the CW$init hash reference. See the subclasses for a list of parameters. Cannot be called directly, but must be called from a subclass. Throws: NONE. Side Effects: NONE. Notes: NONE. Searches for and returns a list or anonymous array of element objects. Cannot be called directly, but must be called from a subclass. Throws:

Method Not Implemented
Side Effects: NONE. Notes: NONE.

Destructors

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

Public Class Methods

$meths = Bric::Biz::Asset::Business::Parts::Tile->my_meths
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 CWid, 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:
*
name - The name of the property or attribute. Is the same as the hash key when an anonymous hash is returned.
*
disp - The display name of the property or attribute.
*
get_meth - A reference to the method that will retrieve the value of the property or attribute.
*
get_args - An anonymous array of arguments to pass to a call to get_meth in order to retrieve the value of the property or attribute.
*
set_meth - A reference to the method that will set the value of the property or attribute.
*
set_args - An anonymous array of arguments to pass to a call to set_meth in order to set the value of the property or attribute.
*
type - The type of value the property or attribute contains. There are only three types:
short
date
blob
*
len - If the value is a 'short' value, this hash key contains the length of the field.
*
search - The property is searchable via the list() and list_ids() methods.
*
req - The property or attribute is required.
*
props - An anonymous hash of properties used to display the property or attribute. Possible keys include:
type
The display field type. Possible values are
text
textarea
password
hidden
radio
checkbox
select
*
length - The Length, in letters, to display a text or password field.
*
maxlength - The maximum length of the property or value - usually defined by the SQL DDL.
*
rows - The number of rows to format in a textarea field.
*
cols - The number of columns to format in a textarea field.
*
vals - 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. Searches for and returns a list or anonymous array of element object IDs. Cannot be called directly, but must be called from a subclass. Throws:
Method Not Implemented
Side Effects: NONE. Notes: NONE.

Public Instance Methods

Returns the element ID. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns the element name. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns the element key name. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns the element description. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns the ID of the element's parent element. Throws: NONE. Side Effects: NONE. Notes: NONE.

$p->set_parent_id($parent_id)
Sets the ID of the element's parent element. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns the element place, that is, its place in the order of subelements of the parent element. Throws: NONE. Side Effects: NONE. Notes: NONE.
$p->set_place($place)
Sets the element place, that is, its place in the order of subelements of the parent element. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns the element object type (story or media); Throws: NONE. Side Effects: NONE. Notes: NONE.
$p->set_object_type($object_type)
Sets the element object type (story or media); Throws: NONE. Side Effects: NONE. Notes: NONE. Returns the ID of the version of the document (story or media) that the element is associated with. Throws: NONE. Side Effects: NONE. Notes: NONE.
$element->set_object_instance_id($object_instance_id)
Sets the ID of the version of the document (story or media) that the element is associated with. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns true if an element has a name matching the CW$name argument. Note that this is not a direct comparison to the CWname attribute of the element object. Rather, it converts CW$name so that it is all lowercase and its non-alphanumeric characters are changed to underscores. The resulting value is then compared to the element's CWkey_name attribute. In general, it's a better idea to use CWhas_key_name(), or to do direct key name comparisons yourself. This method is provided for backwards compatability. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns true if an element has a key name matching the CW$key_name argument. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns the parent element object. Throws: NONE. Side Effects: NONE. Notes: NONE. Activates the element. Throws: NONE. Side Effects: NONE. Notes: NONE. Deactivates the element. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns true if the element is active, and false if it is not. Throws: NONE Side Effects: NONE Notes: NONE

PRIVATE

NON

Private Class Methods

NONE

Private Instance Methods

NONE

NOTES

NONE

AUTHOR

michael soderstrom <miraso@pacbell.net>

SEE ALSO

perl, Bric, Bric::Biz::Asset::Business::Story, Bric::Biz::Asset::Business::Media, Bric::Biz::AssetType, Bric::Biz::Asset::Business::Parts::Tile::Container, Bric::Biz::Asset::Business::Parts::Tile::Tile