Bric::Biz::Workflow::Parts::Desk - Desks in Workflow $LastChangedRevision$ $LastChangedDate: 2005-10-12 12:48:33 -0700 (Wed, 12 Oct 2005) $ 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; 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.

Constructors
The following is a list of parameter keys and their associated values. Keys for $init are: name The name of this desk description A description of this desk publish Boolean; true if this is a publish desk Throws: NONE Side Effects: NONE Notes: NONE Looks up and instantiates a new Bric::Biz::Workflow::Parts::Desk object based on the Bric::Biz::Workflow::Parts::Desk object ID or name passed. If $id or $name is not found in the database, "lookup()" returns "undef". Throws: 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. Too many Bric::Biz::Workflow::Parts::Desk objects found. Side Effects: NONE. Notes: NONE. Returns a list of desk objects based on $param. Keys of $param are: Desk ID. May use "ANY" for a list of possible values. Return all desks matching a certain name. May use "ANY" for a list of possible values. Return all desks with a matching description. May use "ANY" for a list of possible values. Boolean; returns all desks that can or cannot publish assets. Boolean; Return all in/active desks. Return all desks in the group corresponding to this group ID. May use "ANY" for a list of possible values. Throws: 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. Side Effects: NONE. Notes: Searches against "name" and "description" use the LIKE operator, so '%' can be used for substring searching. Return a list of desk IDs. See "list()" for a list of the relevant keys in the $params hash reference. Throws: 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. Side Effects: NONE. Notes: Searches against "name" and "description" use the LIKE operator, so '%' can be used for substring searching.

Destructors
Dummy method to prevent wasting time trying to AUTOLOAD DESTROY.

Public Class Methods
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: The name of the property or attribute. Is the same as the hash key when an anonymous hash is returned. The display name of the property or attribute. A reference to the method that will retrieve the value of the property or attribute. An anonymous array of arguments to pass to a call to get_meth in order to retrieve the value of the property or attribute. A reference to the method that will set the value of the property or attribute. An anonymous array of arguments to pass to a call to set_meth in order to set the value of the property or attribute. The type of value the property or attribute contains. There are only three types: If the value is a 'short' value, this hash key contains the length of the field. The property is searchable via the list() and list_ids() methods. The property or attribute is required. An anonymous hash of properties used to display the property or attribute. Possible keys include: The display field type. Possible values are The Length, in letters, to display a text or password field. The maximum length of the property or value - usually defined by the SQL DDL. The number of rows to format in a textarea field. The number of columns to format in a textarea field. An anonymous hash of key/value pairs representing the values and display names to use in a select list. Throws: NONE. Side Effects: NONE. Notes: NONE.

Public Instance Methods
Return a list of assets on this desk. Throws: NONE Side Effects: NONE Notes: NONE Checkin/checkout an asset from this desk. Throws: NONE Side Effects: NONE Notes: NONE Transfer an asset to a different desk. Keys for $param are: asset An asset object. to The desk to which this asset should be transfered. Throws: NONE Side Effects: NONE Notes: NONE Accept an asset from another desk. Keys for $param are: from The desk from which this asset is coming. Can be omitted if this is the first desk in the workflow. asset The asset to accept. Throws: NONE Side Effects: NONE Notes: NONE Remove an asset from this desk. Throws: NONE Side Effects: NONE Notes: NONE Return a list of assets on this desk. Throws: NONE Side Effects: NONE Notes: NONE 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. Get/Set is-publish-desk flag. Throws: NONE Side Effects: NONE Notes: NONE Get/Set the active flag. Throws: NONE Side Effects: NONE Notes: NONE Get/Set the active flag. Throws: NONE Side Effects: NONE Notes: NONE Checks the user to see if s/he has the right privileges to checkout stories. Throws: NONE Side Effects: NONE Notes: NONE

Private Class Methods
NONE

Private Instance Methods
A few of these still need documenting. Retrieve the group object if it's set in this object. Otherwise, try to look it up via the ID field passed. Throws: NONE Side Effects: NONE Notes: NONE Insert values into the Desk table from the desk structure. Throws: NONE Side Effects: NONE Notes: NONE Update values from the desk structure. Throws: NONE Side Effects: NONE Notes: NONE Remove this desk. Throws: NONE Side Effects: NONE Notes: NONE

Private Functions
Function used by "lookup()" and "list()" to return a list of Bric::Biz::Workflow::Parts::Desk objects or, if called with an optional third argument, returns a list of Bric::Biz::Workflow::Parts::Desk object IDs (used by "list_ids()"). Throws: 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. Side Effects: NONE. Notes: NONE. NONE Garth Webb <garth@perijove.com> Bric, Bric::Biz::Workflow, perl