NAME

Bric::Biz::OutputChannel - Bricolage Output Channels.

VERSION

$Revision: 1.15 $

DATE

$Date: 2002/05/16 00:29:45 $

SYNOPSIS

use Bric::Biz::OutputChannel;

# Constructors.
$oc = Bric::Biz::OutputChannel->new( $initial_state );
$oc = Bric::Biz::OutputChannel->lookup( { id => $id} );
my $ocs_aref = Bric::Biz::OutputChannel->list( $criteria );
my @ocs = Bric::Biz::OutputChannel->list( $criteria );

# Class Methos.
my $id_aref = Bric::Biz::OutputChannel->list_ids( $criteria );
my @ids = Bric::Biz::OutputChannel->list_ids( $criteria );

# Instance Methods.
$id = $oc->get_id;

my $name = $oc->get_name;
$oc = $oc->set_name( $name );

my $description = $oc->get_description;
$oc = $oc->set_description( $description );

if ($oc->get_primary) { # do stuff }
$oc = $oc->set_primary(1); # or pass undef.

my @ocs = >$oc->get_includes(@ocs);
$oc->set_includes(@ocs);
$oc->add_includes(@ocs);
$oc->del_includes(@ocs);

$oc = $oc->activate;
$oc = $oc->deactivate;
$oc = $oc->is_active;

$oc = $oc->save;

DESCRIPTION

Holds information about the output channels that will be associated with templates and elements.

INTERFACE

Public Methods

$oc = Bric::Biz::OutputChannel->new( $initial_state )

Instantiates a Bric::Biz::OutputChannel object. An anonymous hash of initial values may be passed. The supported initial value keys are:

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$oc = Bric::Biz::OutputChannel->lookup( { id => $id } )

Looks up and instantiates a new Bric::Biz::OutputChannel object based on the Bric::Biz::OutputChannel object ID passed. If $id is not found in the database, lookup() returns undef.

Throws:

*

Missing required param 'id'.

*

Unable to connect to database.

*

Unable to prepare SQL statement.

*

Unable to select column into arrayref.

*

Unable to execute SQL statement.

*

Unable to bind to columns to statement handle.

*

Unable to fetch row from statement handle.

Side Effects: NONE.

Notes: NONE.

($ocs_aref || @ocs) = Bric::Biz::OutputChannel->list( $criteria )

Returns a list or anonymous array of Bric::Biz::OutputChannel objects based on the search parameters passed via an anonymous hash. The supported lookup keys are:

Throws:

Side Effects: NONE.

Notes: NONE.

$ocs_href = Bric::Biz::OutputChannel->href( $criteria )

Returns an anonymous hash of Output Channel objects, where each hash key is an Output Channel ID, and each value is Output Channel object that corresponds to that ID. Takes the same arguments as list().

Throws:

Side Effects: NONE.

Notes: NONE.

Destructors

$self->DESTROY

Dummy method to prevent wasting time trying to AUTOLOAD DESTROY.

Public Class Methods

($id_aref || @ids) = Bric::Biz::OutputChannel->list_ids( $criteria )

Returns a list or anonymous array of Bric::Biz::OutputChannel object IDs based on the search criteria passed via an anonymous hash. The supported lookup keys are the same as for list().

Throws:

Side Effects: NONE.

Notes: NONE.

$meths = Bric::Biz::AssetType->my_meths
(@meths || $meths_aref) = Bric::Biz::AssetType->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.

Public Instance Methods

$id = $oc->get_id

Returns the OutputChannel's unique ID.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$oc = $oc->set_name( $name )

Sets the name of the Output Channel.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$name = $oc->get_name()

Returns the name of the Output Channel.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$oc = $oc->set_description( $description )

Sets the description of the Output Channel.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$description = $oc->get_description()

Returns the description of the Output Channel.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$oc = $oc->set_pre_path($pre_path)

Sets the string that will be used at the beginning of the URIs for assets in this Output Channel.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$pre_path = $oc->get_pre_path

Gets the string that will be used at the beginning of the URIs for assets in this Output Channel.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$oc = $oc->set_post_path($post_path)

Sets the string that will be used at the end of the URIs for assets in this Output Channel.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$post_path = $oc->get_post_path

Gets the string that will be used at the end of the URIs for assets in this Output Channel.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$oc = $oc->set_filename($filename)

Sets the filename that will be used in the names of files burned into this Output Channel.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$filename = $oc->get_filename

Gets the filename that will be used in the names of files burned into this Output Channel. Defaults to the value of the DEFAULT_FILENAME configuration directive if unset.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$oc = $oc->set_file_ext($file_ext)

Sets the filename extension that will be used in the names of files burned into this Output Channel.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$file_ext = $oc->get_file_ext

Gets the filename extension that will be used in the names of files burned into this Output Channel. Defaults to the value of the DEFAULT_FILE_EXT configuration directive if unset.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$oc = $oc->set_primary( undef || 1)

Set the flag that indicates whether or not this is the primary Output Channel.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

(undef || 1 ) = $oc->get_primary()

Returns true if this is the primary Output Channel and false (undef) if it is not.

Throws: NONE.

Side Effects: NONE.

Notes: Only one Output channel can be the primary output channel.

my @inc = $oc->get_includes
my $inc_aref = $oc->get_includes

Returns a list or anonymous array of Bric::Biz::OutputChannel objects that constitute the include list for this OutputChannel. Templates not found in this OutputChannel will be sought in this list of OutputChannels, looking at each one in the order in which it was returned from this method.

Throws:

PRIVATE

Private Class Methods

_do_list

Called by list and list ids this does the brunt of their work.

Throws:

Side Effects: NONE.

Notes: NONE.

Private Instance Methods

_do_update()

Will perform the update to the database after being called from save.

Throws:

Side Effects: NONE.

Notes: NONE.

_do_insert

Will do the insert to the database after being called by save

Throws:

Side Effects: NONE.

Notes: NONE.

Private Functions

my $inc_coll = &$get_inc($self)

Returns the collection of Output Channels that costitute the includes. The collection a Bric::Util::Coll::OCInclude object. See Bric::Util::Coll for interface details.

Throws:

*

Bric::_get() - Problems retrieving fields.

*

Unable to prepare SQL statement.

*

Unable to connect to database.

*

Unable to select column into arrayref.

*

Unable to execute SQL statement.

*

Unable to bind to columns to statement handle.

*

Unable to fetch row from statement handle.

*

Incorrect number of args to Bric::_set().

*

Bric::set() - Problems setting fields.

Side Effects: NONE.

Notes: NONE.

NOTES

NONE.

AUTHOR

Michael Soderstrom ltmiraso@pacbell.netgt

David Wheeler ltdavid@wheeler.netgt

SEE ALSO

perl, Bric, Bric::Biz::Asset::Business, Bric::Biz::AssetType, Bric::Biz::Asset::Formatting.

POD ERRORS

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

Around line 300:

'=item' outside of any '=over'

Around line 420:

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

Around line 422:

'=item' outside of any '=over'

Around line 434:

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

Around line 439:

'=item' outside of any '=over'

Around line 568:

Expected '=item *'

Around line 570:

Expected '=item *'

Around line 572:

Expected '=item *'

Around line 574:

Expected '=item *'

Around line 576:

Expected '=item *'

Around line 578:

Expected '=item *'

Around line 580:

Expected '=item *'

Around line 735:

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

Around line 960:

Expected '=item *'

Around line 1001:

Expected '=item *'

Around line 1061:

Expected '=item *'

Around line 1092:

Expected '=item *'

Around line 1108:

Expected '=item *'

Around line 1123:

Expected '=item *'

Around line 1138:

Expected '=item *'

Around line 1197:

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

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

Around line 1205:

'=item' outside of any '=over'

Around line 1506:

=back without =over