Bric::Dist::Action::AkUserzContributed Perl DoBric::Dist::Action::Akamaize(3p)



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

VERSION
       $LastChangedRevision$

DATE
       $LastChangedDate: 2006-03-18 01:26:34 +0100 (Sat, 18 Mar 2006) $

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
       my $bool = Bric::Dist::Action::Akamaize->has_more()
           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
       (@meths || $meths_aref) = Bric::Dist::Action::Akamaize->my_meths(TRUE)
       my (@meths || $meths_aref) = Bric::Dist::Action::Akamaize->my_meths(0,
       TRUE)
           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:

               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:

       my $dns_name = $action->get_dns_name
           Returns the DNS name required to akamaize files.

           Throws:

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

           o   $key - The name of the attribute to fetch or set.

           o   $self - The Bric::Dist::Action::Akamaize object.

           o   $value - The value to set the attribute to.

           o   $set - A boolean - if true, sets the attribute to $value. If
               false, returns the existing value of the attribute.

           Throws:

           o   Problems retrieving fields.

           o   Incorrect number of args to Bric::_set().

           o   Bric::set() - Problems setting fields.

           o   Bad arguments.

           o   Unable to connect to database.

           o   Unable to prepare SQL statement.

           o   Unable to execute SQL statement.

           o   Unable to select row.

           o   Unable to bind to columns to statement handle.

           o   Unable to fetch row from statement handle.

           Side Effects: NONE.

           Notes: NONE.

           Side Effects: NONE.

           Notes: NONE.

       $self = $action->set_dns_name($dns_name)
           Sets the DNS name required to akamaize files.

           Throws:

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

           o   $key - The name of the attribute to fetch or set.

           o   $self - The Bric::Dist::Action::Akamaize object.

           o   $value - The value to set the attribute to.

           o   $set - A boolean - if true, sets the attribute to $value. If
               false, returns the existing value of the attribute.

           Throws:

           o   Problems retrieving fields.

           o   Incorrect number of args to Bric::_set().

           o   Bric::set() - Problems setting fields.

           o   Bad arguments.

           o   Unable to connect to database.

           o   Unable to prepare SQL statement.

           o   Unable to execute SQL statement.

           o   Unable to select row.

           o   Unable to bind to columns to statement handle.

           o   Unable to fetch row from statement handle.

           Side Effects: NONE.

           Notes: NONE.

           Side Effects: NONE.

           Notes: NONE.

       my $cp_code = $action->get_cp_code
           Returns the CP Code required to akamaize files.

           Throws:

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

           o   $key - The name of the attribute to fetch or set.

           o   $self - The Bric::Dist::Action::Akamaize object.

           o   $value - The value to set the attribute to.

           o   $set - A boolean - if true, sets the attribute to $value. If
               false, returns the existing value of the attribute.

           Throws:

           o   Problems retrieving fields.

           o   Incorrect number of args to Bric::_set().

           o   Bric::set() - Problems setting fields.

           o   Bad arguments.

           o   Unable to connect to database.

           o   Unable to prepare SQL statement.

           o   Unable to execute SQL statement.

           o   Unable to select row.

           o   Unable to bind to columns to statement handle.

           o   Unable to fetch row from statement handle.

           Side Effects: NONE.

           Notes: NONE.

           Side Effects: NONE.

           Notes: NONE.

       $self = $action->set_cp_code($cp_code)
           Sets the CP Code required to akamaize files.

           Throws:

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

           o   $key - The name of the attribute to fetch or set.

           o   $self - The Bric::Dist::Action::Akamaize object.

           o   $value - The value to set the attribute to.

           o   $set - A boolean - if true, sets the attribute to $value. If
               false, returns the existing value of the attribute.

           Throws:

           o   Problems retrieving fields.

           o   Incorrect number of args to Bric::_set().

           o   Bric::set() - Problems setting fields.

           o   Bad arguments.

           o   Unable to connect to database.

           o   Unable to prepare SQL statement.

           o   Unable to execute SQL statement.

           o   Unable to select row.

           o   Unable to bind to columns to statement handle.

           o   Unable to fetch row from statement handle.

           Side Effects: NONE.

           Notes: NONE.

           Side Effects: NONE.

           Notes: NONE.

       my $seed_a = $action->get_seed_a
           Returns seed A, which is required to akamaize files.

           Throws:

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

           o   $key - The name of the attribute to fetch or set.

           o   $self - The Bric::Dist::Action::Akamaize object.

           o   $value - The value to set the attribute to.

           o   $set - A boolean - if true, sets the attribute to $value. If
               false, returns the existing value of the attribute.

           Throws:

           o   Problems retrieving fields.

           o   Incorrect number of args to Bric::_set().

           o   Bric::set() - Problems setting fields.

           o   Bad arguments.

           o   Unable to connect to database.

           o   Unable to prepare SQL statement.

           o   Unable to execute SQL statement.

           o   Unable to select row.

           o   Unable to bind to columns to statement handle.

           o   Unable to fetch row from statement handle.

           Side Effects: NONE.

           Notes: NONE.

           Side Effects: NONE.

           Notes: NONE.

       $self = $action->set_seed_a($seed_a)
           Sets seed A, which is required to akamaize files.

           Throws:

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

           o   $key - The name of the attribute to fetch or set.

           o   $self - The Bric::Dist::Action::Akamaize object.

           o   $value - The value to set the attribute to.

           o   $set - A boolean - if true, sets the attribute to $value. If
               false, returns the existing value of the attribute.

           Throws:

           o   Problems retrieving fields.

           o   Incorrect number of args to Bric::_set().

           o   Bric::set() - Problems setting fields.

           o   Bad arguments.

           o   Unable to connect to database.

           o   Unable to prepare SQL statement.

           o   Unable to execute SQL statement.

           o   Unable to select row.

           o   Unable to bind to columns to statement handle.

           o   Unable to fetch row from statement handle.

           Side Effects: NONE.

           Notes: NONE.

           Side Effects: NONE.

           Notes: NONE.

       my $seed_b = $action->get_seed_b
           Returns seed B, which is required to akamaize files.

           Throws:

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

           o   $key - The name of the attribute to fetch or set.

           o   $self - The Bric::Dist::Action::Akamaize object.

           o   $value - The value to set the attribute to.

           o   $set - A boolean - if true, sets the attribute to $value. If
               false, returns the existing value of the attribute.

           Throws:

           o   Problems retrieving fields.

           o   Incorrect number of args to Bric::_set().

           o   Bric::set() - Problems setting fields.

           o   Bad arguments.

           o   Unable to connect to database.

           o   Unable to prepare SQL statement.

           o   Unable to execute SQL statement.

           o   Unable to select row.

           o   Unable to bind to columns to statement handle.

           o   Unable to fetch row from statement handle.

           Side Effects: NONE.

           Notes: NONE.

           Side Effects: NONE.

           Notes: NONE.

       $self = $action->set_seed_b($seed_b)
           Sets seed B, which is required to akamaize files.

           Throws:

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

           o   $key - The name of the attribute to fetch or set.

           o   $self - The Bric::Dist::Action::Akamaize object.

           o   $value - The value to set the attribute to.

           o   $set - A boolean - if true, sets the attribute to $value. If
               false, returns the existing value of the attribute.

           Throws:

           o   Problems retrieving fields.

           o   Incorrect number of args to Bric::_set().

           o   Bric::set() - Problems setting fields.

           o   Bad arguments.

           o   Unable to connect to database.

           o   Unable to prepare SQL statement.

           o   Unable to execute SQL statement.

           o   Unable to select row.

           o   Unable to bind to columns to statement handle.

           o   Unable to fetch row from statement handle.

           Side Effects: NONE.

           Notes: NONE.

           Side Effects: NONE.

           Notes: NONE.

       $self = $action->do_it($job, $server_type)
           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
       $action = $action->_clear_attr
           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:

           o   Problems retrieving fields.

           o   Incorrect number of args to Bric::_set().

           o   Bric::set() - Problems setting fields.

           o   Unable to connect to database.

           o   Unable to prepare SQL statement.

           o   Unable to execute SQL statement.

           o   Unable to bind to columns to statement handle.

           o   Unable to fetch row from statement handle.

           Side Effects: NONE.

           Notes: NONE.

   Private Functions
       my $value = &$get_attr($key, $self, $value, $set)
           Thin accessor to attributes. The variables are defined as follows:

           o   $key - The name of the attribute to fetch or set.

           o   $self - The Bric::Dist::Action::Akamaize object.

           o   $value - The value to set the attribute to.

           o   $set - A boolean - if true, sets the attribute to $value. If
               false, returns the existing value of the attribute.

           Throws:

           o   Problems retrieving fields.

           o   Incorrect number of args to Bric::_set().

           o   Bric::set() - Problems setting fields.

           o   Bad arguments.

           o   Unable to connect to database.

           o   Unable to prepare SQL statement.

           o   Unable to execute SQL statement.

           o   Unable to select row.

           o   Unable to bind to columns to statement handle.

           o   Unable to fetch row from statement handle.

           Side Effects: NONE.

           Notes: NONE.

NOTES
       NONE.

AUTHOR
       David Wheeler <david@justatheory.com>

SEE ALSO
       Bric, Bric::Dist::Action



perl v5.12.2                      2006-03-17  Bric::Dist::Action::Akamaize(3p)
