NAME

Bric::Biz::Workflow::Parts::Desk;

Impliments a desk object as part of a workflow

VERSION

$Revision: 1.12.2.3 $

DATE

$Date: 2002/09/27 22:56:54 $

SYNOPSIS

use Bric::Biz::Workflow::Parts::Desk;

my $desk = new Bric::Biz::Workflow::Parts::Desk($init);

my $desk = lookup Bric::Biz::Workflow::Parts::Desk($param);

my @dsks = list Bric::Biz::Workflow::Parts::Desk($param);

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

my $dscr = $desk->get_description;
my $desk = $desk->set_description($dscr);

$desk    = $desk->link_desk($param)

$desk    = $desk->unlink_desk({});

$desk    = $desk->add_rule({'rule_pkg'  => $pkg,
                            'rule_name' => $name})

$desk    = $desk->del_rule({'rule_pkg'  => $pkg, 'rule_name' => $name});

# Return a list of assets on this desk.
@assets  = $desk->assets();

# Transfer a asset to a different desk.
$ret     = $desk->transfer($asset_obj, $another_desk);

# Accept a asset from another desk.
$ret     = $desk->accept($asset_obj);

$desk    = $desk->save;

DESCRIPTION

A desk is something that defines the steps in a workflow. Assets arrive at a desk and remain there until they are approved and moved to the next desk in the workflow.

A desk may have any number of assets associated with it at any time. Users may checkout copies of these assets from the desk, make changes to them and check them back into the desk. Users may also get read only copies.

INTERFACE

Constructors

$success = $obj = new Bric::Biz::Workflow::Parts::Desk($init);

The following is a list of parameter keys and their assiociated values.

Keys for $init are:

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$success = $obj = lookup Bric::Biz::Workflow::Parts::Desk($param);

Look up a desk object by ID. Keys for param are:

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

@objs = Bric::Biz::Workflow::Parts::Desk->list($param);

Returns a list of desk objects based on $param. Keys of $param are:

All searches except 'active' are done using the LIKE operator, so '%' can be used for substring searching.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

@objs = Bric::Biz::Workflow::Parts::Desk->list($param);

Returns a list of IDs for all desk objects. See 'list' for legal parameters.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

Destructors

$self->DESTROY

Dummy method to prevent wasting time trying to AUTOLOAD DESTROY.

Public Class Methods

NONE

my $meths = Bric::Biz::Workflow::Parts::Desk->my_meths
my (@meths || $meths_aref) = Bric::Biz::Workflow::Parts::Desk->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

@assets = $desk->assets();

Return a list of assets on this desk.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$ret = $desk->checkin($asset_obj);
$ret = $desk->checkout($asset_obj, $user_id);

Checkin/checkout an asset from this desk.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$ret = $desk->transfer($param);

Transfer a asset to a different desk. Keys for $param are:

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$ret = $desk->accept($param);

Accept a asset from another desk. Keys for $param are:

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$ret = $desk->remove_asset();

Remove an asset from this desk.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$assets = $desk->get_assets;

Return a list of assets on this desk.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$assets_href = $desk->get_assets_href;

Return an anonymous hash of assets on this desk. The keys are the key names of the class of each asset, and the values are anonymous arrays of the assets of that type.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$att || undef = $desk->can_publish
$att = $desk->make_publish_desk;
$att = $desk->make_regular_desk;

Get/Set is-publish-desk flag.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$att || undef = $desk->is_active;
$att = $desk->activate;
$att = $desk->deactivate;

Get/Set the active flag.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$desk->remove;

Get/Set the active flag.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$desk = $desk->save;

Checks the user to see if s/he has the right priviledges to checkout stories.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

PRIVATE

Private Class Methods

NONE

Private Instance Methods

$obj = $desk->_get_grp_obj($id_field, $obj_field)

Retrieve the group object if its set in this object. Otherwise, try to look it up via the ID field passed.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$desk = $desk->_select_desk

Select values from the desk table.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$desk = $desk->_insert_desk

Insert values into the Desk table from the desk structure.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$desk = $desk->_update_desk

Update values from the desk structure.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$desk = $desk->_remove_desk

Remove this desk.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

Private Functions

NONE

NOTES

NONE

AUTHOR

"Garth Webb" <garth@perijove.com>
Creative Engines Engineering

SEE ALSO

Bric, Bric::Biz::Workflow, perl

POD ERRORS

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

Around line 407:

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

Around line 409:

'=item' outside of any '=over'

Around line 422:

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

Around line 430:

'=item' outside of any '=over'

Around line 512:

Expected '=item *'

Around line 514:

Expected '=item *'

Around line 516:

Expected '=item *'

Around line 518:

Expected '=item *'

Around line 520:

Expected '=item *'

Around line 522:

Expected '=item *'

Around line 524:

Expected '=item *'

Around line 633:

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

Around line 639:

'=item' outside of any '=over'

Around line 1151:

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

Around line 1198:

'=item' outside of any '=over'

Around line 1388:

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

Around line 1401:

=back without =over