NAME

Bric::Biz::Asset::Business::Story - The interface to the Story Object

VERSION

$Revision: 1.20.2.1 $

DATE

$Date: 2002/10/15 21:57:36 $

SYNOPSIS

# creation of new objects
$story = Bric::Biz::Asset::Business::Story->new( $init )
$story = Bric::Biz::Asset::Business::Story->lookup( $param )
($stories || @stories) = Bric::Biz::Asset::Business::Story->list($param)

# list of object ids
($ids || @ids) = Bric::Biz::Asset::Business::Story->list_ids($param)


## METHODS INHERITED FROM Bric::Biz::Asset ##

 # General information
$asset       = $asset->get_id()
$asset       = $asset->set_description($description)
$description = $asset->get_description()

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

# Version information
$vers_grp_id = $asset->get_version_grp__id();
$vers_id     = $asset->get_assset_version_id();

# 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;
$id  = $asset->set_workflow_id;

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

# Creation and modification information.
($modi_date, $modi_by)       = $asset->get_modi()
($create_date, $create_date) = $asset->get_create()

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

# Publish info
$needs_publish = $asset->needs_publish();

## METHODS INHERITED FROM Bric::Biz::Asset::Business ##

# General info
$name = $biz->get_name()
$biz  = $biz->set_name($name)
$ver  = $biz->get_version()

# AssetType information
$name        = $biz->get_element_name()
$at_id       = $biz->get_element__id()
$biz         = $biz->set_element__id($at_id)

# Tile methods
$container_tile  = $biz->get_tile()
@container_tiles = $biz->get_tiles()
$biz             = $biz->add_data($at_data_obj, $data)
$data            = $biz->get_data($name, $obj_order)
$parts           = $biz->get_possible_data()

# Container methods
$new_container = $biz->add_container($at_contaier_obj)
$container     = $biz->get_container($name, $obj_order)
@containes     = $biz->get_possible_containers()

# Access Categories
$cat             = $biz->get_primary_category;
$biz             = $biz->set_primary_category($cat);
($cats || @cats) = $biz->get_secondary_categories;
$biz             = $biz->add_categories([$category, ...])
($cats || @cats) = $biz->get_categories()
$biz             = $biz->delete_categories([$category, ...]);

# Access keywords
$biz               = $biz->add_keywords(\@kws)
($kw_list || @kws) = $biz->get_keywords()
($self || undef)   = $biz->has_keyword($keyword)
$biz               = $biz->delete_keywords([$kw, ...])

# Related stories
$biz                   = $biz->add_related([$other_biz, ...])
(@related || $related) = $biz->get_related()
$biz                   = $biz->delete_related([$other_ba, ...])
$rel_grp__id           = $biz->get_related_grp__id()

# Setting extra information
$id   = $biz->create_attr($sql_type, $length, $at_data_id, $data_param);
$data = $biz->get_attr()
$id   = $biz->create_map($map_class, $map_type, $data_param);

# Change control
$biz            = $biz->cancel()
$biz            = $biz->revert($version)
(undef || $biz) = $biz->checkin()
$biz            = $biz->checkout($param)


## INSTANCE METHODS FOR Bric::Biz::Asset::Business::Story

# Manipulation of slug field
$slug  = $story->get_slug()
$story = $story->set_slug($slug)

# Access the source ID
$src_id = $story->get_source__id()

# Change control
($story || undef) = $story->is_current()

# Ad string management
$story         = $story->delete_ad_param($key)
$ad_param_hash = $story->get_ad_param()
$story         = $story->set_ad_param($key ,$val);

# Publish data
$date  = $story->get_expire_date()
$story = $story->set_expire_date()

$date  = $story->get_publish_date()
$story = $story->set_publish_date()

# Save to the database
$story = $story->save()

DESCRIPTION

Story contains all of the data that will result in published page(s) It contains the metadata and associations with Formatting assets.

INTERFACE

Constructors

$story = Bric::Biz::Asset::Business::Story->new( $initial_state )

This will create a new story object with an optionaly defined intiial state

Supported Keys:

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$story = Bric::Biz::Asset::Business::Story->lookup( { id => $id })

This will return a story asset that matches the id provided

Throws:

"Missing required parameter 'id'"

Side Effects:

NONE

Notes:

NONE

(@stories||$stories) = Bric::Biz::Asset::Business::Story->list($params)

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

Throws:

Side Effects:

NONE

Notes:

NONE

Destructors

$self->DESTROY

This is a dummy method to save autoload the time to find it

Public Class Methods

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

Returns a list of the ids that match the given criteria

Supported Keys:

Throws: NONE

Side Effects: NONE

Notes: NONE

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

Returns the key name of this class.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

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

$uri = $biz->get_uri(($cat_id||$cat_obj), ($oc_id||$oc_obj))

Returns the a URL for this business asset. The URL is determined by the pre- and post- directory strings of an output channel, the URI of the business object's asset type, and the cover date if the asset type is not a fixed URL.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$story = $story->set_slug($slug);

Sets the slug for this story

Throws:

'Invalid characters found in slug'

Side Effects:

NONE

Notes:

NONE

$slug = $story->get_slug()

returns the slug that has been set upon this story

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$story_name = $story->check_uri();

Returns name of story that has clashing URI.

($categories || @categories) = $ba->get_categories()

This will return a list of categories that have been associated with the business asset

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$cat = $story->get_primary_category()

Returns the category object that has been defined as primary

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$story = $story->set_primary_category()

Defines a category as being the the primary one for this story. If a category is aready marked as being primary, this will disassociate it.

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

(@cats || $cats) = $story->get_secondary_categories()

Returns the non-primary categories that are associated with this story

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$ba = $ba->add_categories( [ $category] )

This will take a list ref of category objects or ids and will associate them with the business asset

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$ba = $ba->delete_categories([$category]);

This will take a list of categories and remove them from the asset

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$slug = $story->get_slug()

Returns the slug that the story is associated with

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$story = $story->checkout()

Preforms story specific checkout stuff and then calls checkout on the parent class

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

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

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

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

Side Effects: NONE.

Notes: This list includes the Group IDs of the Desk, Workflow, and categories in which the story is a member. [Actually, this method is currently disabled, since categories don't actually add assets to an underlying group. If we later find that customers need to control access to assets based on category, we'll figure out a way to rectify this.]

$story = $story->revert();

Reverts the current version to a prior version

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$story = $story->clone()

Creates an identical copy of this asset with a different id

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$story = $story->save()

Updates the story object in the database

Throws: NONE

Side Effects: NONE

Notes: NONE

PRIVATE

Private Class Methods

= _do_list

Called by list will return objects or ids depending on who is calling

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

Private Instance Methods

$contribs = $self->_get_contributors()

Returns the contributors from a cache or looks em up

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$self = $self->_insert_contributor( $id, $role)

Inserts a row into the mapping table for contributors

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$self = $self->_update_contributor($id, $role)

Updates the contributor mapping table

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$self = $self->_delete_contributor($id)

Deletes the rows from these mapping tables

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$category_data = $self->_get_categories()

Returns the category data structure for this story

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$ba = $ba->_sync_categories

Called by save this will make sure that all the changes in category mappings are reflected in the database

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$ba = $ba->_insert_category($cat_id, $primary)

Adds a record that associates this ba with the category

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$ba = $ba->_delete_category( $cat_id)

Removes this record for the database

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$ba = $ba->_update_category($cat_id, $primary);

Preforms an update on the row in the data base

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$attribute_obj = $self->_get_attribute_object()

Returns the attribte object for this story

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$self = $self->_do_delete()

Removes the row from the database

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$self = $self->_insert_story()

Inserts a story record into the database

Throws:

NONE

side Effects:

NONE

Notes:

NONE

$self = $self->_insert_instance()

Inserts an instance record into the database

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$self = $self->_update_story()

Updates the story record in the database

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$self = $self->_update_instance()

Updates the record for the story instance

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$self = $self->_delete_instance();

Deletes the version record from a cancled checkout

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

$self = $self->_delete_story();

Deletes from the story table for a story that has never been checked in

Throws:

NONE

Side Effects:

NONE

Notes:

NONE

NOTES

NONE

AUTHOR

Michael Soderstrom <miraso@pacbell.net>

SEE ALSO

perl, Bric, Bric::Biz::Asset, Bric::Biz::Asset::Business

POD ERRORS

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

Around line 628:

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

Around line 630:

'=item' outside of any '=over'

Around line 645:

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

Around line 647:

'=item' outside of any '=over'

Around line 778:

Expected '=item *'

Around line 780:

Expected '=item *'

Around line 782:

Expected '=item *'

Around line 784:

Expected '=item *'

Around line 786:

Expected '=item *'

Around line 788:

Expected '=item *'

Around line 790:

Expected '=item *'

Around line 886:

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

Around line 1565:

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

Around line 1573:

'=item' outside of any '=over'

Around line 1782:

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

Around line 1784:

'=item' outside of any '=over'