NAME

Bric::Biz::Publisher - A class to manage publishing of business assets.

VERSION

$Revision: 1.1.1.1.2.4 $

DATE

$Date: 2001/11/06 23:18:34 $

SYNOPSIS

use Bric::Util::Burner;

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

$burner = $burner->deploy($fa);

# Burn a business asset given an output chanels.
$burner = $burner->burn($ba, $oc);

DESCRIPTION

This modeule joins a formatting asset with a business asset to create a complete and formatted asset.

INTERFACE

Constructors

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

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

Throws:

NONE

Side Effects:

NONE

Notes:

@objs = lookup Bric::Util::Burner($id);

Return a publish object for a given publish ID.

Throws:

Side Effects:

NONE

Notes:

@objs = list Bric::Util::Burner(%criterion);

Returns a list of publish events based on %criterion.

Throws:

Side Effects:

NONE

Notes:

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

$success = $b->burn($ba, $oc, $cat);

Publishes an asset. Keys for $init are:

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$success = $b->display_pages($paginated_element_name)

A method to be called from template space. Use this method to display paginated elements. If this method is used, the burn system will run once for every page in the story; this is so autohandlers will be called when appropriate.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$success = $b->display_element()

A method to be called from template space. This method will find the mason element associated with the element passed in and call $m->comp.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$success = $b->chain_next()

This method can be used in an autohandler template. It calls the next template in the chain, whether its the next autohandler down the line or the template itself.

Throws:

NONE

Side Effects:

NONE

Notes:

This is a wrapper around masons 'call_next' method. We wrap it here to make sure we have control over the burn process at this level if we need it. It also gives us the opportunity to tailor the verbage to suit our application better.

$success = $b->end_page();

Writes out the current page and starts a new one.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$success = $b->add_resource();

Adds a Bric::Dist::Resource object to this burn.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$template = $b->load_template_element($element);

Given an element (a business asset/data tile) return the template element that formats it.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

($base, $path) = $b->base_path

Returns the full path to the output directory.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$path = $b->template_path

Returns the URI portion of the template path. This is the path that is considered 'absolute' with respect to the Mason element root.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$template = $b->locate_template

Returns the template name with full path with respect to the element root. If the named template $tmpl_name cannot be found at path $init_path, then this method will create a special dhanlder that will check for $tmpl_name, one directory up. It will continue searching for the template in this way until it either finds it or it gets to the root of the element tree, in which case it returns undef.

This code is put into a dhandler so that mason can continue to call any autohandlers if necessary. If the correct element was searched for and called directly, someone might call:

/foo/bar/blitz.mc

and expect that the autohandler in:

/foo/autohandler

will be called. However if the element actually lives in:

/blitz.mc

And we call it directly the autohandler will never be called.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$elem = $b->current_element

Return the current element in this context.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$elem = $b->current_element_type

Return the current element type in this context.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

PRIVATE

Private Class Methods

Private Instance Methods

NONE

$b = $b->_push_element($element)
$element = $b->_pop_element;

Push and pops an element from the element stack. As a story is burned, the burn process can travel down several elements deep. This stack records the order in which each element was transversed so when the burn process exits an element, the correct and current element is at the top of the stack.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

Private Functions

NONE

NOTES

AUTHOR

"Garth Webb" <garth@perijove.com> Bricolage Engineering

SEE ALSO

Perl, Bric

POD ERRORS

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

Around line 262:

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

Around line 264:

'=item' outside of any '=over'

Around line 277:

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

Around line 289:

'=item' outside of any '=over'

Around line 928:

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

Around line 959:

'=item' outside of any '=over'

Around line 1012:

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

Around line 1087:

=back without =over