Bric::Biz::Asset::Business - An object that houses the business Assets $LastChangedRevision$ $LastChangedDate: 2004-07-06 16:42:29 -0700 (Tue, 06 Jul 2004) $ # 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 ) ## METHODS INHERITED FROM Bric::Biz::Asset ## # 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 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); # Output channel associations. my @ocs = $asset->get_output_channels; $asset->add_output_channels(@ocs); $asset->del_output_channels(@ocs); # 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() This is the parent class for all the business assets ( i.e. Stories, images etc.) 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

Constructors
new will only be called by Bric::Biz::Asset::Business's inherited classes Throws: NONE Side Effects: NONE Notes: NONE

Destructors
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.

Public Instance Methods
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 asset type id that this story is associated with Throws: NONE Side Effects: NONE Notes: NONE Sets the asset 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: NONE 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 tile. 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 tile. Throws: NONE Side Effects: NONE Notes: NONE Returns the possible data that can be added to the top level tile of this business asset based upon rules defined in asset type Throws: NONE Side Effects: NONE Notes: NONE Returns the containers that are possible to add to the top level container of this businesss asset 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 Returns publish date. Throws: Bric::_get() - Problems retrieving fields. Unable to unpack date. Unable to format date. Side Effects: NONE. Notes: NONE. Return all the related story or media objects for this business asset. Throws: NONE Side Effects: NONE Notes: NONE my $element = $ba->get_element; $element = $ba->get_tile; # Deprecated form. Returns the top level element that contains content for this 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. Returns the tiles that are held with in the top level tile of this business asset. Convenience shortcut to "$ba->get_tile->get_tiles". Throws: NONE Side Effects: NONE Notes: NONE This will create a tile and add it to the container. Convenience shortcut to "$ba->get_tile->add_data". Throws: NONE Side Effects: NONE Notes: NONE This will create and return a new container tile that is added to the current container. Convenience shortcut to "$ba->get_tile->add_container". Throws: NONE Side Effects: NONE Notes: NONE Returns the data of a given name and object order. Convenience shortcut to "$ba->get_tile->get_data". Throws: NONE Side Effects: NONE Notes: NONE Returns a container object of the given name that falls at the given object order position. Convenience shortcut to "$ba->get_tile->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 true 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. 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.

PRIVATE

Private Class Methods
Preforms functions needed to create new business assets Throws: Cannot create an asset without an element or alias ID. Cannot create an asset with both an element 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 that is not associated with this site. Side Effects: NONE Notes: NONE

Private Instance Methods
Returns URI contructed from the output chanel paths, categories and the date. Throws: NONE Side Effects: NONE Notes: NONE Returns the asset type object that coresponds to this business object 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:

Private Functions
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> Bric, Bric::Biz::Asset