Bric::Biz::Org::Person

NAME

Bric::Biz::Org::Person - Manages Organizations Related to Persons

VERSION

$LastChangedRevision$

DATE

$LastChangedDate$

SYNOPSIS

# How to create brand new Bric::Biz::Org::Person object.
my $org = Bric::Biz::Org->lookup({ id => $org_id });
my $porg = $org->add_object($person);

# How to retreive existing Bric::Biz::Org::Person objects.
my $person = Bric::Biz::Person->lookup({ id => $person_id });
my @porgs = $person->get_orgs;

# Other contstructors.
my $porg = Bric::Biz::Org::Person->lookup({ id => $porg_id })
my @porgs = Bric::Biz::Org::Person->list($search_href);

# Class Methods.
my @porg_ids = Bric::Biz::Org::Person->list_ids($search_href);

# Instance Methods.
my $id = $porg->get_id;
my $oid = $porg->get_org_id;
my $person = $porg->get_person;
my $pid = $porg->get_person_id;
my $role = $porg->get_role;
$porg = $porg->set_role($role);
my $title = $porg->get_title;
$porg = $porg->set_title($title);
my $dept = $porg->get_department;
$porg = $porg->set_department($dept);

$porg = $porg->activate;
$porg = $porg->deactivate;
$porg = $porg->is_active;

my @addr = $porg->get_addresses;
my $addr = $porg->new_address;
$porg = $porg->add_addresses($addr);
$porg = $porg->del_addresses;

$porg = $porg->save;

DESCRIPTION

This class manages the association between a Bric::Biz::Person object and a Bric::Biz::Org object. There may be numerous adddresses associated with a given Bric::Biz::Org object, but only some of them may apply to any given person. This class limits a Bric::Biz::Org objects addresses to those associated with a given person. It also manages the details of the person's association with the organization by offering properites for the person's title and department within the organization.

When a Bric::Biz::Person object is created, it automatically has a single Bric::Biz::Org::Person object associated with it, an object which represents the Bric::Biz::Person object itself and the personal addresses of the person represented. These Bric::Biz::Org::Person objects are identified by their role properties, which will all be "Personal" by default, and by the is_persona() method returning $self when the Org is personal, and undef whe it is not.

For example, a Bric::Biz::Peron object created for Ian Kallen will have at least one Bric::Biz::Org::Person object, named for Ian Kallen, and in which Ian's personal addresses may be stored. However, Ian has other addresses by his association with the companies he works for and other organizations to which he belongs. Thus, one can add a Bric::Biz::Org object representing About.com and then associated create a Bric::Biz::Org::Person object by calling $org->add_object, passing in Ian Kallen's Bric::Biz::Person object. Then one can add addresses to the Bric::Biz::Org::Person object, either by referencing Bric::Biz::Org::Parts::Addr object IDs, or by creating new Bric::Biz::Org::Parts::Addr objects.

INTERFACE

Constructors

Destructors

Public Class Methods

Public Instance Methods

In addition to the Public Instance Methods offered by the Bric::Biz::Org API, Bric::Biz::Org::Person offers the following additional or overridden methods.

PRIVATE

Private Class Methods

NONE.

Private Instance Methods

NONE.

Private Functions

NOTES

This is an early draft of this class, and therefore subject to change.

AUTHOR

David Wheeler

SEE ALSO

Bric, Bric::Biz::Org, Bric::Biz::Person