NAME

Bric::Biz::Asset - A base class of behaviours that all assets must exhibit. An asset is anything that goes through workflow

VERSION

$Revision: 1.9 $

DATE

$Date: 2001/12/04 18:17:44 $

SYNOPSIS

# Class Methods
$key_name = Bric::Biz::Asset->key_name()
%priorities = Bric::Biz::Asset->list_priorities()
$data = Bric::Biz::Asset->my_meths

# looking up of objects
($asset_list || @assets) = Bric::Biz::Asset->list( $param )

# General information
$asset       = $asset->get_id()
$asset       = $asset->set_name($name)
$name        = $asset->get_name()
$asset       = $asset->set_description($description)
$description = $asset->get_description()
$priority         = $asset->get_priority()
$asset            = $asset->set_priority($priority)

# User information
$usr_id      = $asset->get_user__id()
$modifier    = $asset->get_modifier()

# Version information
$vers        = $asset->get_version();
$vers_id     = $asset->get_version_id();
$current          = $asset->get_current_version();
$checked_out = $asset->get_checked_out()

# Expire Data Information
$asset    = $asset->set_expire_date($date)
$expire_date = $asset->get_expire_date()

# Desk stamp information
($desk_stamp_list || @desk_stamps) = $asset->get_desk_stamps()
$desk_stamp                        = $asset->get_current_desk()
$asset                             = $asset->set_current_desk($desk_stamp)

# Workflow methods.
$id     = $asset->get_workflow_id;
$obj    = $asset->get_workflow_object;
$asset = $asset->set_workflow_id($id);

# Access note information
$asset                 = $asset->add_note($note)
($note_list || @notes) = $asset->get_notes()

# Access active status
$asset            = $asset->deactivate()
$asset            = $asset->activate()
($asset || undef) = $asset->is_active()

$asset = $asset->save()

# returns all the groups this is a member of
($grps || @grps) = $asset->get_grp_ids()

DESCRIPTION

Asset is the Parent Class for everything that will go through Workflow. It contains data and actions that are common to all of these objects. Asset holds information on desks visited by the object, notes associated with the object, and versioning information. Actions that can be preformed are fork which prepares an object to be edited in a checked out state, cancel, which cancels the fork, merge which takes the forked object compares it to the stored main version and creates a new version and revert which is called on a forked object which returns thl state of the object at a given version id.

A fork will preform a copy in the database keeping the asset id, and version number the same but will associate a user with the object.

INTERFACE

Constructors

$asset = Bric::Biz::Asset->lookup( { id => $id} )

Method not Implemented.

Throws:

"Method Not Implemented"

B:<Side Effects:>

NONE

Notes:

NONE

($asset_list || @assets) = Bric::Biz::Asset->list( $criteria )

This will call list on both the inherited classes

Supported Keys:

Throws:

NONE

B:<side effects:>

NONE

Notes:

NONE

Destructors

$self->DESTROY

Dummy method to prevent wasting time trying to AUTOLOAD DESTROY.

Public Class Methods

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

Method Not Implemented

Throws:

"Method Not Implemented"

Side Effects:

NONE

Notes:

NONE

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

Returns the key name of this class.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

my (%priorities || $priorities_href) = $asset->list_priorities()

Returns a list or anonymous array of the priority labels. Each key is the priority number, and the corresponding value is its label.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

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

$versions = $asset->get_versions()

Returns a list ref of the previous verisons of this asset

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$name = $self->get_name()

Returns the name field from Assets

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$self = $self->set_name()

Sets the name field for Assets

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$description = $self->get_description()

This returns the description for the asset

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$self = $self->set_description()

This sets the description on the asset

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$priority = $asset->get_priority()

This will return the priority that is set upon the asset

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$asset = $asset->set_priority($priority)

This will set the priority for the asset

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$version = $asset->get_version()

Returns the version that this asset represents.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$user__id = $asset->get_user__id()

Returns the user__id of the person to whom the asset is checked out to

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$version_id = $asset->get_version_id()

Returns the database id of the version of this asset.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$current_version = $asset->get_current_version()

Returns the version that is the current one.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$user__id = $asset->get_modifier()

Returns the user id of the person who edited this version of the asset. If the asset is checked out it will be the same as the user who checked it out.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$publish_status = $asset->get_publish_status()

returns the publish status flag

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$asset = $asset->set_publish_status($status)

sets the publish status flag.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$checked_out = $asset->get_checked_out()

Returns the checked out flag

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$self = $story->set_expire_date($expire_date)

Sets the expire date.

Throws:

Side Effects:

NONE

Notes:

NONE

my $expire_date = $story->get_expire_date($format)

Returns expire date.

Throws:

Side Effects:

NONE

Notes:

NONE

$list or @list = $self->get_desk_stamps();

This returns a reference to a list of desk stamps in scalar context or an array in array context

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$self = $self->set_current_desk ( $desk_object );

This method takes a desk stamp object and adds it to the asset object

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$ld = $self->get_current_desk ( );

This returns the desk stamp of the desk that the object is currently at

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$id = $asset->get_id()

This returns the id that uniquly identifies this asset.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$id = $asset->get_workflow_id

Returns the workflow ID that this asset is a part of

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$asset = $asset->set_workflow_id( $w_ID );

Sets the workflow that this asset is a member of

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$workflow_obj = $asset->get_workflow_object();

Returns the workflow object that this asset is associated with

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$self = $self->cancel ();

Reverts the actions of a fork with out commiting any changes. Deletes row for the checked out asset

Throws:

NONE

Side Effects:

Removes the Asset (version) record from the database

Notes:

NONE

$self->set_note ( $note );

Adds a note to the Asset Takes a note object. Flags that a new note record should be created come data base time

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$self->get_notes ( );

Returns a list of Notes from the Asset

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$asset = $asset->activate()

This will activate a nonactive asset

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$asset = $asset->deactivate()

This will set the asset to a non active state

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

($asset || undef) = $asset->is_active()

Returns the object if it is active, undef otherwise

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

my (@gids || $gids_aref) = $asset->get_grp_ids
my (@gids || $gids_aref) = Bric::Biz::Asset->get_grp_ids

Returns a list or anonymous array of Bric::Biz::Group object ids representing the groups of which this Bric::Biz::Asset object is a member.

Throws: See Bric::Util::Grp::list().

Side Effects: NONE.

Notes: This list includes the Group IDs of the Desk and Workflow in which the asset is a member.

$self = $self->cancel_checkout()

Cancels the checkout. Deletes the version instance record and its associated. Files

Throws:

"Asset is Not Checked Out"

Side Effects:

NONE

Notes:

NONE

$self = $self->save()

Preforms save functions for the asset objects. This will sync the attributes for the asset

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

PRIVATE

Private Class Methods

NONE

Private Instance Methods

attrs = $self->_get_attr_hash()

Returns the attributes from the cache or the object

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$self = $self->_set_attr()

Sets the attributes to the object or to a cache

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$attr = $self->_get_attr($param)

Returns the attr from either the cache or the object

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$self = $self->_sync_attributes()

Syncs the attributes if anything is needed to be done

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

Private Functions

NONE

NOTES

define supported keys for list

are desk_stamps objects or just data

rewrite description to reflect current state

accessor for asset_version_id (what does get_id return the asset id or the asset version group? )

AUTHOR

michael soderstrom ( miraso@pacbell.net )

SEE ALSO

Bric.pm,Bric::Util::Group::AssetVersion

POD ERRORS

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

Around line 271:

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

Around line 273:

'=item' outside of any '=over'

Around line 286:

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

Around line 439:

Expected '=item *'

Around line 441:

Expected '=item *'

Around line 443:

Expected '=item *'

Around line 445:

Expected '=item *'

Around line 447:

Expected '=item *'

Around line 449:

Expected '=item *'

Around line 451:

Expected '=item *'

Around line 644:

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

Around line 648:

'=item' outside of any '=over'

Around line 1521:

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

Around line 1540:

'=item' outside of any '=over'

Around line 1742:

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