Bric::Biz::element::Parts::Data - The place where fields with in an element are registered with rules to their usage $LastChangedRevision$ $LastChangedDate: 2004-06-04 12:21:12 -0700 (Fri, 04 Jun 2004) $ $field = Bric::Biz::element::Parts::Data->new( $initial_state ) $field = Bric::Biz::element::Parts::Data->lookup( { id => $id } ) ($field_list || @fields) = Bric::Biz::element::Parts::Data->list($criteria) ($ids || @ids) = Bric::Biz::element::Parts::Data->list_ids($criteria) $id = $field->get_id() # Get/Set the name of this field. $field = $field->set_key_name($name) $name = $field->get_key_name() # Get/set the description for this field. $field = $field->set_description($description) $desc = $field->get_description() # Get/Set the publishable status of this field. $field = $field->set_publishable(undef || 1) (undef || 1) = $field->is_publishable() # Get/Set the maximum length for the data in this field. $field = $field->set_max_length($max_length) $max = $field->get_max_length() # Get/Set whether this field is required or not. $field = $field->set_required(1 || undef) (1 || undef) = $field->get_required() # Get/Set the quantifier flag. $field = $field->set_quantifier( $quantifier ) $quantifier = $field->get_quantifier() # Get/Set the data type (or SQL type) of this field. $field = $field->set_sql_type(); $sql_type = $field->get_sql_type() # Set the active flag for this field. $field = $field->activate() $field = $field->deactivate() (undef || 1) = $field->is_active() (undef || $self) = $field->remove() $field = $field->save() This class holds the data about data that will eventualy populate Published Assets. The name and description fields can be set as can a number of rules. The max length field. This will allow someone to set the max length allowed for their field. It will have a rule set upon it so that the max length will not be greater than any available storage. The field length will map to what ever storarge is available for a field just larger than the one listed ( Thought needs to be given how to handle those that change their length after data has been entered as it might switch storage catagories) The quantifier field will state whether the field may be repeated indeffinatly, zero or more times, zero or one, one, or an arbritiary number of times. the sql type will map to a type in the DB ( varchar or date )

Constructors
creates a new element Field Part with the values associated with the initial state Supported Keys: element_id (required) meta_object key_name description place required quantifier sql_type publishable active Throws: NONE Side Effects: NONE Notes: NONE Makes a copy of itself and passes back a new object. The only argument is an asset type ID. This needs to be passed since a field of one name cannot be inserted twice into the same asset type. Throws: NONE Side Effects: NONE Notes: NONE Returns an existing Asset type field object that has the id that was given as an argument Throws: NONE Side Effects: NONE Notes: NONE Returns a list (or list ref) of field objects that match the criteria in the $params hash reference. Supported criteria are: Throws: NONE. Side Effects: NONE. Notes: NONE. Returns an anonymous hash of data objects based on the search parameters passed via an anonymous hash. The hash keys will be the site IDs, and the values will be the corresponding data elements. The supported lookup keys are the same as those for "list()". Throws:

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 reprsenting the values and display names to use in a select list. Throws: NONE. Side Effects: NONE. Notes: Not yet written. Returns the ids of the field objects that match the given criteria in the $params hash reference. See "list()" for a list of supported parameters. Throws: NONE. Side Effects: NONE. Notes: NONE.

Public Instance Methods
Sets the flag for if this is a publishable field Throws: NONE Side Effects: NONE Notes: NONE Returns if this is a publishable field Throws: NONE Side Effects: NONE Notes: NONE Notes: This method no longer exists. Use set_key_name instead. Notes: This method no longer exists. Use get_key_name instead. Sets the key name for this field. The display name is stored in the 'disp' attribute. Throws: NONE Side Effects: NONE Notes: NONE Returns the key name. The display name is stored in the 'disp' attribute Throws: NONE Side Effects: NONE Notes: NONE Sets the human readable descripton for this field Throws: NONE Side Effects: NONE Notes: NONE Return the human readable description field Throws: NONE Side Effects: NONE Notes: NONE Set the max length in chars for this field Throws: NONE Side Effects: NONE Notes: NONE Return the max length that has been registered Throws: NONE Side Effects: NONE Notes: NONE Set the flag to make this field required ( default is not) Throws: NONE Side Effects: NONE Notes: NONE Return the required flag for this field Throws: NONE Side Effects: NONE Notes: NONE Set the repeatability of this field options are (*, +, (0 || 1), 1). Might want to make this more friendly Throws: NONE Side Effects: NONE Notes: NONE Return the repeatablity flag Throws: NONE Side Effects: NONE Notes: NONE Returns the database datatype Throws: NONE Side Effects: NONE Notes: NONE Returns the database datatype Throws: NONE Side Effects: NONE Notes: NONE Returns the database id of the field object. Throws: NONE. Side Effects: NONE. Notes: NONE. Get/Set attributes on this asset type. Throws: NONE Side Effects: NONE Notes: NONE Get/Set attribute metadata on this asset type. Calling the 'get_meta' method without '$field' returns all metadata names and values as a hash. Throws: NONE Side Effects: NONE Notes: NONE Makes the field object active Throws: NONE Side Effects: NONE Notes: NONE Makes the object inactive Throws: NONE Side Effects: NONE Notes: NONE Returns 1 if active or undef otherwise Throws: NONE Side Effects: NONE Notes: NONE Removes this object completely from the DB. Returns 1 if active or undef otherwise Throws: NONE Side Effects: NONE Notes: NONE Saves the changes made to the database Throws: NONE Side Effects: NONE Notes: NONE

Private Class Methods
called by list and list ids this does the brunt of their work Throws: NONE Side Effects: NONE Notes: NONE

Private Instance Methods
Needing to be documented. Select rows from the element_data table. Throws: NONE Side Effects: NONE Notes: NONE Update the element_data table. Throws: NONE Side Effects: NONE Notes: NONE Insert rows into the element_data table. Throws: NONE Side Effects: NONE Notes: NONE

Private Functions
NONE NONE michael soderstrom ( miraso@pacbell.net ) perl,Bric,Bric::Biz::Asset::Business::Story,Bric::Biz::AssetType,