man Bric::Dist::Action::Akamaize () - Class to Akamaize resources

NAME

Bric::Dist::Action::Akamaize - Class to Akamaize resources

VERSION

$LastChangedRevision$

DATE

$LastChangedDate: 2004-08-12 17:13:34 -0700 (Thu, 12 Aug 2004) $

SYNOPSIS

  use Bric::Dist::Action::Akamaize;

  my $id = 2; # Assume that this is an akamaize action.
  # This line will automatically instantiate the correct subclass.
  my $action = Bric::Dist::Action->lookup({ id => $id });

  # Access its properties.
  my $dns_name = $action->get_dns_name;
  $action = $action->set_dns_name($dns_name);
  my $cp_code = $action->get_cp_code;
  $action = $action->set_cp_code($cp_code);
  my $seed_a = $action->get_seed_a;
  $action = $action->set_seed_a($seed_a);
  my $seed_b = $action->get_seed_b;
  $action = $action->set_seed_b($seed_b);

  # Perform the action on a list of resources.
  action = $action->do_it($resources_href);
  # Undo the action on a list of resources.
  action = $action->undo_it($resources_href);

DESCRIPTION

This subclass of Bric::Dist::Action handles the Akamiazation of resources. It requires the properties DNS Name, CP Code, Seed A, and Seed B to do its job. See the accessors below.

INTERFACE

Constructors

Inherited from Bric::Dist::Action.

Destructors

$ak->DESTROY
Dummy method to prevent wasting time trying to AUTOLOAD DESTROY. Throws: NONE. Side Effects: NONE. Notes: NONE.

Public Class Methods

Returns true to indicate that this action has more properties than does the base class (Bric::Dist::Action). Throws: NONE. Side Effects: NONE. Notes: NONE.

$meths = Bric::Dist::Action::Akamaize->my_meths
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 CWid, 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:
short
date
blob
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:
type
The display field type. Possible values are
text
textarea
password
hidden
radio
checkbox
select
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

In addition to the methods inherited from Bric::Dist::Action, Bric::Dist::Action::Akamaize offers the following class methods: Returns the DNS name required to akamaize files. Throws: Thin accessor to attributes. The variables are defined as follows:

*
$key - The name of the attribute to fetch or set.
*
$self - The Bric::Dist::Action::Akamaize object.
*
$value - The value to set the attribute to.
*
$set - A boolean - if true, sets the attribute to CW$value. If false, returns the existing value of the attribute. Throws:
*
Problems retrieving fields.
*
Incorrect number of args to Bric::_set().
*
Bric::set() - Problems setting fields.
*
Bad arguments.
*
Unable to connect to database.
*
Unable to prepare SQL statement.
*
Unable to execute SQL statement.
*
Unable to select row.
*
Unable to bind to columns to statement handle.
*
Unable to fetch row from statement handle. Side Effects: NONE. Notes: NONE. Side Effects: NONE. Notes: NONE. Sets the DNS name required to akamaize files. Throws: Thin accessor to attributes. The variables are defined as follows:
*
$key - The name of the attribute to fetch or set.
*
$self - The Bric::Dist::Action::Akamaize object.
*
$value - The value to set the attribute to.
*
$set - A boolean - if true, sets the attribute to CW$value. If false, returns the existing value of the attribute. Throws:
*
Problems retrieving fields.
*
Incorrect number of args to Bric::_set().
*
Bric::set() - Problems setting fields.
*
Bad arguments.
*
Unable to connect to database.
*
Unable to prepare SQL statement.
*
Unable to execute SQL statement.
*
Unable to select row.
*
Unable to bind to columns to statement handle.
*
Unable to fetch row from statement handle. Side Effects: NONE. Notes: NONE. Side Effects: NONE. Notes: NONE. Returns the CP Code required to akamaize files. Throws: Thin accessor to attributes. The variables are defined as follows:
*
$key - The name of the attribute to fetch or set.
*
$self - The Bric::Dist::Action::Akamaize object.
*
$value - The value to set the attribute to.
*
$set - A boolean - if true, sets the attribute to CW$value. If false, returns the existing value of the attribute. Throws:
*
Problems retrieving fields.
*
Incorrect number of args to Bric::_set().
*
Bric::set() - Problems setting fields.
*
Bad arguments.
*
Unable to connect to database.
*
Unable to prepare SQL statement.
*
Unable to execute SQL statement.
*
Unable to select row.
*
Unable to bind to columns to statement handle.
*
Unable to fetch row from statement handle. Side Effects: NONE. Notes: NONE. Side Effects: NONE. Notes: NONE. Sets the CP Code required to akamaize files. Throws: Thin accessor to attributes. The variables are defined as follows:
*
$key - The name of the attribute to fetch or set.
*
$self - The Bric::Dist::Action::Akamaize object.
*
$value - The value to set the attribute to.
*
$set - A boolean - if true, sets the attribute to CW$value. If false, returns the existing value of the attribute. Throws:
*
Problems retrieving fields.
*
Incorrect number of args to Bric::_set().
*
Bric::set() - Problems setting fields.
*
Bad arguments.
*
Unable to connect to database.
*
Unable to prepare SQL statement.
*
Unable to execute SQL statement.
*
Unable to select row.
*
Unable to bind to columns to statement handle.
*
Unable to fetch row from statement handle. Side Effects: NONE. Notes: NONE. Side Effects: NONE. Notes: NONE. Returns seed A, which is required to akamaize files. Throws: Thin accessor to attributes. The variables are defined as follows:
*
$key - The name of the attribute to fetch or set.
*
$self - The Bric::Dist::Action::Akamaize object.
*
$value - The value to set the attribute to.
*
$set - A boolean - if true, sets the attribute to CW$value. If false, returns the existing value of the attribute. Throws:
*
Problems retrieving fields.
*
Incorrect number of args to Bric::_set().
*
Bric::set() - Problems setting fields.
*
Bad arguments.
*
Unable to connect to database.
*
Unable to prepare SQL statement.
*
Unable to execute SQL statement.
*
Unable to select row.
*
Unable to bind to columns to statement handle.
*
Unable to fetch row from statement handle. Side Effects: NONE. Notes: NONE. Side Effects: NONE. Notes: NONE. Sets seed A, which is required to akamaize files. Throws: Thin accessor to attributes. The variables are defined as follows:
*
$key - The name of the attribute to fetch or set.
*
$self - The Bric::Dist::Action::Akamaize object.
*
$value - The value to set the attribute to.
*
$set - A boolean - if true, sets the attribute to CW$value. If false, returns the existing value of the attribute. Throws:
*
Problems retrieving fields.
*
Incorrect number of args to Bric::_set().
*
Bric::set() - Problems setting fields.
*
Bad arguments.
*
Unable to connect to database.
*
Unable to prepare SQL statement.
*
Unable to execute SQL statement.
*
Unable to select row.
*
Unable to bind to columns to statement handle.
*
Unable to fetch row from statement handle. Side Effects: NONE. Notes: NONE. Side Effects: NONE. Notes: NONE. Returns seed B, which is required to akamaize files. Throws: Thin accessor to attributes. The variables are defined as follows:
*
$key - The name of the attribute to fetch or set.
*
$self - The Bric::Dist::Action::Akamaize object.
*
$value - The value to set the attribute to.
*
$set - A boolean - if true, sets the attribute to CW$value. If false, returns the existing value of the attribute. Throws:
*
Problems retrieving fields.
*
Incorrect number of args to Bric::_set().
*
Bric::set() - Problems setting fields.
*
Bad arguments.
*
Unable to connect to database.
*
Unable to prepare SQL statement.
*
Unable to execute SQL statement.
*
Unable to select row.
*
Unable to bind to columns to statement handle.
*
Unable to fetch row from statement handle. Side Effects: NONE. Notes: NONE. Side Effects: NONE. Notes: NONE. Sets seed B, which is required to akamaize files. Throws: Thin accessor to attributes. The variables are defined as follows:
*
$key - The name of the attribute to fetch or set.
*
$self - The Bric::Dist::Action::Akamaize object.
*
$value - The value to set the attribute to.
*
$set - A boolean - if true, sets the attribute to CW$value. If false, returns the existing value of the attribute. Throws:
*
Problems retrieving fields.
*
Incorrect number of args to Bric::_set().
*
Bric::set() - Problems setting fields.
*
Bad arguments.
*
Unable to connect to database.
*
Unable to prepare SQL statement.
*
Unable to execute SQL statement.
*
Unable to select row.
*
Unable to bind to columns to statement handle.
*
Unable to fetch row from statement handle. Side Effects: NONE. Notes: NONE. Side Effects: NONE. Notes: NONE. Akamaizes the files for a given job and server type. Throws: NONE. Side Effects: NONE. Notes: NONE.

PRIVATE

Private Class Methods

NONE.

Private Instance Methods

Deletes all attributes from this Bric::Dist::Action::Akamaize instnace. Called by Bric::Dist::Action::set_type() above so that all the attributes can be cleared before reblessing the action into a different action subclass. Throws:

*
Problems retrieving fields.
*
Incorrect number of args to Bric::_set().
*
Bric::set() - Problems setting fields.
*
Unable to connect to database.
*
Unable to prepare SQL statement.
*
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.

Private Functions

Thin accessor to attributes. The variables are defined as follows:

*
$key - The name of the attribute to fetch or set.
*
$self - The Bric::Dist::Action::Akamaize object.
*
$value - The value to set the attribute to.
*
$set - A boolean - if true, sets the attribute to CW$value. If false, returns the existing value of the attribute. Throws:
*
Problems retrieving fields.
*
Incorrect number of args to Bric::_set().
*
Bric::set() - Problems setting fields.
*
Bad arguments.
*
Unable to connect to database.
*
Unable to prepare SQL statement.
*
Unable to execute SQL statement.
*
Unable to select row.
*
Unable to bind to columns to statement handle.
*
Unable to fetch row from statement handle. Side Effects: NONE. Notes: NONE.

NOTES

NONE.

AUTHOR

David Wheeler <david@wheeler.net>

SEE ALSO

Bric, Bric::Dist::Action