NAME

Bric::Biz::Asset::Business::Media - The parent class of all media objects

VERSION

$Revision: 1.11.2.1 $

DATE

$Date: 2002/03/05 02:44:02 $

SYNOPSIS

DESCRIPTION

INTERFACE

Constructors

$media = Bric::Biz::Asset::Business::Media->new( $initial_state )

This will create a new media object with an optionaly defined intiial state

Supported Keys

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$media = Bric::Biz::Asset::Business::Media->lookup->( { id => $id })

This will return a media asset that matches the criteria defined

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

(@media || $media) = Bric::Biz::Asset::Business::Media->list($param);

returns a list or list ref of media objects that match the criteria defined

Supported Keys

Throws:

Side Effects:

NONE

Notes: NONE.

Destructors

$self->DESTROY

dummy method to not waste the time of AUTOLOAD

Public Class Methods

(@ids||$id_list) = Bric::Biz::Asset::Business::Media->list_ids( $criteria );

Returns a list or list ref of media object IDs that match the criteria defined. The criteria are the same as those for the list() method.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

($fields || @fields) = Bric::Biz::Asset::Business::Media::autopopulated_fields()

Returns a list of the names of fields that are registered in the database as being autopopulatable for a given sub class

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

my $key_name = Bric::Biz::Asset::Business::Media->key_name()

Returns the key name of this class.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$meths = Bric::Biz::Asset::Business::Story->my_meths
(@meths || $meths_aref) = Bric::Biz::Asset::Business::Story->my_meths(TRUE)

Returns an anonymous hash of instrospection data for this object. If called with a true argument, it will return an ordered list or anonymous array of intrspection data. The format for each introspection item introspection is as follows:

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:

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$class_id = Bric::Biz::Asset::Business::Media->get_class_id()

Returns the class id of the Media class

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

Public Instance Methods

$media = $media->set_category__id($id)

Associates this media asset with the given category

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$category_id = $media->get_category__id()

Returns the category id that has been associated with this media object

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$category = $media->get_category_object()
$category = $media->get_category()

Returns the object of the category that this is a member of

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$uri = $media->get_local_uri()

Returns the uri of the media object for the Bricolage application server.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$uri = $media->get_path()

Returns the path of the media object on the Bricolage file system.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$mt_obj = $media->get_media_type()

Returns the media type object associated with this object.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$media = $media->upload_file($file_handle, $file_name)

Will get a file handle from apache and a name that is associated will store it in a versioned manner

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$file_handle = $madia->get_file()

Returns the file handle for this given media object

Throws:

Side Effects: NONE.

Notes: NONE.

$location = $media->get_location()

The will return the location of the file on the file system, relative to MEDIA_FILE_ROOT.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$size = $media->get_size()

This is the size of the media file in bytes

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$media = $story->revert();

Reverts the current version to a prior version

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$media = $media->clone()

Clones the media object

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$self = $self->save()

Saves the object to the database doing either an insert or an update

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

PRIVATE

Private Class Methods

= _do_list

Called by list will return objects or ids depending on who is calling

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

Private Instance Methods

$contribs = $self->_get_contributors()

Returns the contributors from a cache or looks em up

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$self = $self->_insert_contributor( $id, $role)

Inserts a row into the mapping table for contributors.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$self = $self->_update_contributor($id, $role)

Updates the contributor mapping table

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$self = $self->_delete_contributors($id)

Deletes the rows from these mapping tables

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

($fields) = $self->_get_auto_fields($biz_pkg)

returns a hash ref of the fields that are to be autopopulated from this type of media object.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$attribute_object = $self->_get_attribute_object()

Returns the attribute object from a cache or creates a new record

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$self = $self->_insert_media()

Inserts a media record into the database

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$self = $self->_update_media()

Preforms the SQL that updates the media table

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$self = $self->_insert_instance()

Preforms the sql that inserts a record into the media instance table

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$self = $self->_update_instance()

Preforms the sql that updates the media_instance table

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$self = $self->_delete_media()

Removes the media row from the database

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$self = $self->_delete_instance()

Removes the instance row from the database

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$self = $self->_select_media($where, @bind);

Populates the object from a database row

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$self = $self->_do_update()

Updates the row in the data base

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$attr_object = $self->_get_attr_obj()

returns the attribute object for this story

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

NOTES

Some additional fields may be needed here such as a field for what kind of object this represents etc.

AUTHOR

"Michael Soderstrom" <miraso@pacbell.net>

SEE ALSO

perl, Bric, Bric::Biz::Asset, Bric::Biz::Asset::Business

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 453:

You forgot a '=back' before '=head2'

Around line 455:

'=item' outside of any '=over'

Around line 470:

You forgot a '=back' before '=head2'

Around line 474:

'=item' outside of any '=over'

Around line 616:

Expected '=item *'

Around line 618:

Expected '=item *'

Around line 620:

Expected '=item *'

Around line 622:

Expected '=item *'

Around line 624:

Expected '=item *'

Around line 626:

Expected '=item *'

Around line 628:

Expected '=item *'

Around line 743:

You forgot a '=back' before '=head2'

Around line 745:

'=item' outside of any '=over'

Around line 1149:

You forgot a '=back' before '=head1'

Around line 1158:

'=item' outside of any '=over'

Around line 1297:

You forgot a '=back' before '=head2'

Around line 1299:

'=item' outside of any '=over'