NAME

Bric::Util::Burner - A class to manage deploying of formatting assets and publishing of business assets.

VERSION

$Revision: 1.24.2.1 $

DATE

$Date: 2002/09/11 01:50:50 $

SYNOPSIS

use Bric::Util::Burner;

# Create a new publish object.
$burner = new Bric::Util::Burner;

# Deploy a formatting asset.
$burner = $burner->deploy($formatting_asset);

# Undeploy a formatting asset.
$burner = $burner->undeploy($formatting_asset);

# Burn an asset given an output chanels and category
$burner->burn_one($asset, $output_channel, $category);

DESCRIPTION

This module accomplishes two tasks:

  1. Manages the process of deploying and undeploying of formatting assets through deploy() and undeploy().

  2. Manages the process of publishing a asset with the burn_one() method. The actual work of publishing is done by one of Bric::Util::Burner's sub-classes depending on the burner_type of the asset being published. See Bric::Util::Burner::Mason and Bric::Util::Burner::Template for details.

ADDING A NEW BURNER

It is anticipated that new Burner sub-classes will be added to the system. Here's a brief guide to adding a new Burner to Bricolage:

INTERFACE

Constructors

$obj = new Bric::Util::Burner($init);

Creates a new burn object. Keyw to $init are:

Throws:

NONE

Side Effects:

NONE

Notes:

lookup()

Bric::Util::Burner doesn't support lookup().

list()

Bric::Util::Burner doesn't support list().

Destructors

$self->DESTROY

Dummy method to prevent wasting time trying to AUTOLOAD DESTROY.

Public Class Methods

Public Instance Methods

$success = $b->deploy($fa);

Deploys a template to the file system.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$success = $b->undeploy($fa);

Deletes a template from the file system.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$url = $b->preview($ba, $key, $user_id, $m);

Sends story or media to preview server and returns URL. Params:

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$published = $b->publish($ba, $key, $user_id, $publish_date);

Publishes an asset, then remove from workflow. Returns 1 if publish was successful, else 0. Parameters are:

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

@resources = $b->burn_one($ba, $oc, $cat);

Publishes an asset. Returns a list of resources burned. Parameters are:

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

my $bool = $burner->chk_syntax($ba, \$err)

Compiles the template found in $ba. If the compile succeeds with no errors, chk_syntax() returns true. Otherwise, it returns false, and the error will be in the $err varible passed by reference.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

Private Instance Methods

$burner->_get_subclass($ba)

Returns the subclass of Bric::Util::Burner appropriate for handling the $ba template object.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

NOTES

AUTHOR

"Garth Webb" <garth@perijove.com>

Sam Tregar <stregar@about-inc.com>

SEE ALSO

Bric, Bric::Util::Burner::Mason, Bric::Util::Burner::Template.

POD ERRORS

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

Around line 181:

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

Around line 276:

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

Around line 278:

'=item' outside of any '=over'

Around line 288:

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

Around line 300:

'=item' outside of any '=over'