Net::RRP::Entity::Contact - rrp contact entity representation.


Net-RRP documentation Contained in the Net-RRP distribution.

Index


Code Index:

NAME

Top

Net::RRP::Entity::Contact - rrp contact entity representation.

SYNOPSIS

Top

 use Net::RRP::Entity::Contact;
 my $contactEntity = new Net::RRP::Entity::Contact ( name => 'contactname',
						     fax  => 'password',
						     .... );

DESCRIPTION

Top

This is a rrp contact entity representation class.

getName

return a 'Contact'

setAttribute

Add check constraint to attributes. Only firstname, lastname, middlename, address, phone, email and fax attributes may be exists

AUTHOR AND COPYRIGHT

Top

SEE ALSO

Top

Net::RRP::Entity(3), Net::RRP::Codec(3), RFC 2832, Net::RRP::Exception::InvalidAttributeName(3)


Net-RRP documentation Contained in the Net-RRP distribution.
package Net::RRP::Entity::Contact;

use strict;
use Net::RRP::Entity;
use Net::RRP::Exception::InvalidAttributeName;
@Net::RRP::Entity::Contact::ISA = qw(Net::RRP::Entity);
$Net::RRP::Entity::Contact::VERSION = '0.1';

sub getName { 'Contact' }

sub setAttribute
{
    my ( $this, $key, $value ) = @_;
    { contactname => 1, firstname => 1, lastname => 1, middlename => 1, address => 1, phone => 1, email => 1, fax => 1 }->{ lc ( $key ) } ||
	throw Net::RRP::Exception::InvalidAttributeName ();
    $this->SUPER::setAttribute ( $key => $value );
}

1;

__END__