Bric::Biz::Asset::Business - An object that houses the business Assets
# Constructor
$biz = Bric::Biz::Asset::Business->new($param);
# DB object looukp
$biz = Bric::Biz::Asset::Business->lookup({'id' => $biz_id});
# Getting a list of objects
($biz_asset_list||@biz_assets) = Bric::Biz::Asset::Business->list( $criteria )
# Geting a list of ids
($biz_ids || @biz_ids) = Bric::Biz::Asset::Business->list_ids( $criteria )
# 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)
$alias_id = $asset->get_alias_id()
$asset = $asset->set_alias_id($alias_id)
# 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 information
$desk = $asset->get_current_desk;
$asset = $asset->set_current_desk($desk);
# Workflow methods.
$id = $asset->get_workflow_id;
$obj = $asset->get_workflow_object;
$asset = $asset->set_workflow_id($id);
# Output channel associations.
my @ocs = $asset->get_output_channels;
$asset->add_output_channels(@ocs);
$asset->del_output_channels(@ocs);
# Access note information
$asset = $asset->set_note($note);
my $note = $asset->get_note;
my $notes_href = $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()
This is the parent class for all the documents, including stories and media documents. It inherits from Bric::Biz::Asset.
Assumption here is that all Business assets have rights, publish dates and keywords associated with them.
This class contains all the interfact to these data points
new will only be called by Bric::Biz::Asset::Business's inherited classes
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Dummy method to prevent wasting time trying to AUTOLOAD DESTROY.
Returns the key name of this class.
Throws: NONE.
Side Effects: NONE.
Notes: NONE.
Returns an anonymous hash of introspection data for this object. If called with a true argument, it will return an ordered list or anonymous array of introspection data. If a second true argument is passed instead of a first, then a list or anonymous array of introspection data will be returned for properties that uniquely identify an object (excluding id, which is assumed).
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:
name - The name of the property or attribute. Is the same as the hash key when an anonymous hash is returned.
disp - The display name of the property or attribute.
get_meth - A reference to the method that will retrieve the value of the property or attribute.
get_args - An anonymous array of arguments to pass to a call to get_meth in order to retrieve the value of the property or attribute.
set_meth - A reference to the method that will set the value of the property or attribute.
set_args - An anonymous array of arguments to pass to a call to set_meth in order to set the value of the property or attribute.
type - The type of value the property or attribute contains. There are only three types:
len - If the value is a 'short' value, this hash key contains the length of the field.
search - The property is searchable via the list() and list_ids() methods.
req - The property or attribute is required.
props - An anonymous hash of properties used to display the property or attribute. Possible keys include:
The display field type. Possible values are
length - The Length, in letters, to display a text or password field.
maxlength - The maximum length of the property or value - usually defined by the SQL DDL.
rows - The number of rows to format in a textarea field.
cols - The number of columns to format in a textarea field.
vals - An anonymous hash of key/value pairs reprsenting the values and display names to use in a select list.
Throws: NONE.
Side Effects: NONE.
Notes: NONE.
These methods the UUID field for this document. get_uuid returns the string representation of the UUID, such as "7713585E-0501-11DA-B4F2-BC394F2854A1". This is the form of the UUID stored in the database. get_uuid_bin() returns the binary representation of the UUID. get_uuid_hex() returns the UUID as a hex string. get_uuid_base64() returns the base64-encoded representation of the UUID.
Throws: NONE.
Side Effects: NONE.
Notes: NONE.
Returns the title field for this asset
Throws:
NONE
Side Effects:
NONE
Notes:
title is the same as the name field
sets the title for this asset
Throws:
NONE
Side Effects:
NONE
Notes:
title is the same as the name field
Returns the alias id from this business asset
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Sets the source id upon this story
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Returns the source id from this business asset
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Returns the element type id that this story is associated with
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Sets the element type id that this story is associated with.
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Returns the asset's primary output channel ID.
Throws: NONE.
Side Effects: NONE.
Notes: NONE.
Returns the primary output channel object.
Throws: NONE.
Side Effects: NONE.
Notes: NONE.
Sets the asset's primary output channel ID.
Throws: NONE.
Side Effects: The URIs for the asset will be changed.
Notes: NONE.
Takes a contributor object or id and their role in the context of this story and associates them
Throws:
$contrib argument must be a Bric::Util::Grp::Parts::Member::Contrib
Side Effects:
NONE
Notes:
NONE
Returns a list or list ref of the contributors that have been assigned to this story
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Returns the role played by this contributor
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Recieves a list of contributrs or their ids and deletes them from the story
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Takes a list of ids and sets the new order upon them
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Returns a list or anonymous array of the output channels the business asset will be output to when it is published. If @oc_ids is passed, then only the output channels with those IDs are returned, if they're associated with this asset.
Throws:
Bric::_get() - Problems retrieving fields.
Unable to prepare SQL statement.
Unable to connect to database.
Unable to select column into arrayref.
Unable to execute SQL statement.
Unable to bind to columns to statement handle.
Unable to fetch row from statement handle.
Incorrect number of args to Bric::_set().
Bric::set() - Problems setting fields.
Side Effects: NONE.
Notes: NONE.
Adds output channels to the list of output channels to which this story will be output upon publication.
Throws: NONE.
Side Effects: NONE.
Throws:
Bric::_get() - Problems retrieving fields.
Unable to prepare SQL statement.
Unable to connect to database.
Unable to select column into arrayref.
Unable to execute SQL statement.
Unable to bind to columns to statement handle.
Unable to fetch row from statement handle.
Incorrect number of args to Bric::_set().
Bric::set() - Problems setting fields.
Side Effects: NONE.
Notes: NONE.
Removes output channels from this asset, so that it won't be output to these output channels when it is published.
Throws: NONE.
Side Effects: NONE.
Throws:
Bric::_get() - Problems retrieving fields.
Unable to prepare SQL statement.
Unable to connect to database.
Unable to select column into arrayref.
Unable to execute SQL statement.
Unable to bind to columns to statement handle.
Unable to fetch row from statement handle.
Incorrect number of args to Bric::_set().
Bric::set() - Problems setting fields.
Side Effects: NONE.
Notes: NONE.
Returns the name of the asset type that this is based on. This is the same as the name of the top level element.
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Returns the key name of the asset type that this is based on. This is the same as the key name of the top level element.
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Returns a list or array reference of the field types that define the structure of fields that can be added to the business document's element.
Throws: NONE.
Side Effects: NONE.
Notes: get_possible_data() is the deprecated form of this method.
Returns a list or array reference of the element types that define the structure of elements that can be added to the business document's element.
Throws: NONE.
Side Effects: NONE.
Notes: NONE.
Sets the cover date.
Throws:
Bric::_get() - Problems retrieving fields.
Unable to unpack date.
Unable to format date.
Incorrect number of args to Bric::_set().
Bric::set() - Problems setting fields.
Side Effects:
NONE
Notes:
NONE
Returns cover date.
Throws:
Bric::_get() - Problems retrieving fields.
Unable to unpack date.
Unable to format date.
Side Effects:
NONE
Notes:
NONE
Returns the date the business asset was first published.
Throws:
Bric::_get() - Problems retrieving fields.
Unable to unpack date.
Unable to format date.
Side Effects: NONE.
Notes: NONE.
Sets the publish date.
Throws:
Bric::_get() - Problems retrieving fields.
Unable to unpack date.
Unable to format date.
Incorrect number of args to Bric::_set().
Bric::set() - Problems setting fields.
Side Effects:
Also sets the first publish date if it hasn't been set before.
Notes:
NONE
Sets the publish status to a true or false value.
Throws: NONE.
Side Effects: Also sets the first published_version to the value stored in the version attribute if it hasn't been set before.
Notes: NONE.
Sets the published version of the document.
Throws: NONE.
Side Effects: Also sets the first publishstatus if it's set to a false value.
Notes: NONE.
Returns publish date.
Throws:
Bric::_get() - Problems retrieving fields.
Unable to unpack date.
Unable to format date.
Side Effects: NONE.
Notes: NONE.
$doc->mark_as_published;
$doc->save;
If the document is not already marked as published, this method does so, setting the publish status and publish date and saving the story. Use with caution, since this method does not actually publish the document (no jobs are created and no templates are executed).
Throws: NONE.
Side Effects: Sets the publish_status to true and the publish_date to the current date and time, unless the document is already marked as published. The setting of <publish_date> causes the first_publish_date to be set to the same date.
Notes: This method is usually used when you have sucked the content of the asset into something else that you are really publishing and want this asset to be marked as published without creating any content on its own.
Return all the related story or media objects for this business asset. If the asset is an alias of another asset, related objects will only be returned if they are in the same site as the asset, or if there are aliases in the asset's site for the related media associated with the aliased asset.
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
my $element = $ba->get_element;
$element = $ba->get_element; # Deprecated form.
Returns the top level element that contains content for this document.
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Returns the element object that coresponds defines the structure of the elements of the document.
Throws: NONE.
Side Effects: NONE.
Notes: NONE.
Returns the primary URL for this business asset. The primary URL is determined by the pre- and post- directory strings of the primary 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.
Returns a boolean value: true if the business asset has a fixed URL (for example, a Cover), false otherwise.
Throws: NONE.
Side Effects: NONE.
Notes: NONE.
my $elements = $ba->get_elements;
my @elements = $ba->get_elements;
$elements = $ba->get_elements(@key_names);
@elements = $ba->get_elements(@key_names);
# Deprecated forms:
$elements = $ba->get_tiles;
@elements = $ba->get_tiles;
$elements = $ba->get_tiles(@key_names);
@elements = $ba->get_tiles(@key_names);
Returns the elements that are held with in the top level element of this business asset. Convenience shortcut to $ba->get_element->get_elements.
Throws: NONE.
Side Effects: NONE.
Notes: get_tiles() is the deprecated form of this method.
Creates a new field and adds it to the business document's element. Convenience shortcut to $ba->get_element->add_field.
Throws: NONE.
Side Effects: NONE.
Notes: add_data() is the deprecated form of this method.
This will create and return a new container element that is added to the current container. Convenience shortcut to $ba->get_element->add_container.
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Returns the value for a field with the given key name and object order. Convenience shortcut to $ba->get_element->get_value.
Throws: NONE.
Side Effects: NONE.
Notes:
get_data() is the deprecated form of this method. For fields that can contain multiple values, call get_values(), instead.
Returns a container element object with the given key name and the given object order position. Convenience shortcut to $ba->get_element->get_container.
Throws: NONE.
Side Effects: NONE.
Notes: NONE.
Associates a each of the keyword in a list or array reference of keywords with the business asset.
Throws: NONE.
Side Effects: NONE
Notes: NONE
Returns a list of keyword objects associated with this business asset. If passed a list of keyword IDs, it will return only those keyword objects.
Throws: NONE
Side Effects: NONE
Notes: NONE
Returns an array ref or an array of keyword objects assigned to this Business Asset and to its categories.
Throws: NONE
Side Effects: NONE
Notes: NONE
Dissociates a list or array reference of keyword objects or IDs from the business asset.
Throws: NONE.
Side Effects: NONE
Notes: NONE
Returns a keyword if the keyword object is associated with this asset.
Throws: NONE.
Side Effects: NONE
Notes: Uses get_keywords() internally.
Called upon a checked out asset. This unchecks it out.
XXX Actually, it deletes the asset! I don't think that's what we want. Don't use this method!
Throws:
"Cannot cancel a non checked out asset"
Side Effects:
This will remove the coresponding object from the database
Notes:
NONE
Return whether this is the most current version or not.
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
checks out the asset to the specified user
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Commits the changes to the database
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Returns name of story that has clashing URI.
Notes: This method has been deprecated. URI uniqueness is now checked by save(), so this method is no longer strictly necessary.
Preforms functions needed to create new business assets
Throws:
Cannot create an asset without an element type or alias ID.
Cannot create an asset with both an element type and an alias ID.
Cannot create an asset without a site.
Cannot create an alias to an asset in the same site.
Cannot create an alias to an alias.
Cannot create an alias to an asset based on an element type that is not associated with this site.
Side Effects:
NONE
Notes:
NONE
Returns URI contructed from the output chanel paths, categories and the date.
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Syncs the contributors for this story
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Deletes the URI records for this document. Called by save() when the document has been deactivated.
Throws:
Updates the URI records for this document.
Throws:
Returns true if the documement can be expired. Specifically, if the document has been published.
Throws: NONE.
Side Effects: NONE.
Notes: NONE.
Returns the collection of output channels for this asset. Bric::Util::Coll::OutputChannel object. See that class and its parent, Bric::Util::Coll, for interface details.
Throws:
Bric::_get() - Problems retrieving fields.
Unable to prepare SQL statement.
Unable to connect to database.
Unable to select column into arrayref.
Unable to execute SQL statement.
Unable to bind to columns to statement handle.
Unable to fetch row from statement handle.
Incorrect number of args to Bric::_set().
Bric::set() - Problems setting fields.
Side Effects: NONE.
Notes: NONE.
Returns the collection of keywords for this business asset. The collection is a Bric::Util::Coll::Keyword object. See that class and its parent, Bric::Util::Coll, for interface details.
Throws:
Bric::_get() - Problems retrieving fields.
Unable to prepare SQL statement.
Unable to connect to database.
Unable to select column into arrayref.
Unable to execute SQL statement.
Unable to bind to columns to statement handle.
Unable to fetch row from statement handle.
Incorrect number of args to Bric::_set().
Bric::set() - Problems setting fields.
Side Effects: NONE.
Notes: NONE.
NONE
michael soderstrom <miraso@pacbell.net>