Net::RRP::Entity::Domain - rrp domain entity representation.


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

Index


Code Index:

NAME

Top

Net::RRP::Entity::Domain - rrp domain entity representation.

SYNOPSIS

Top

 use Net::RRP::Entity::Domain;
 my $domainEntity = new Net::RRP::Entity::Domain ( DomainName => [ 'domain.ru' ],
						   NameServer => [ 'ns1.domain.ru' ] );
 my $domainEntity1 = new Net::RRP::Entity::Domain ();
 $domainEntity1->setAttribute ( DomainName => [ 'domain.ru' ] );
 $domainEntity1->setAttribute ( NameServer => [ 'ns1.domain.ru' ] );

DESCRIPTION

Top

This is a rrp domain entity representation class.

getName

return a 'Domain'

setAttribute

Add check constraint to attributes. Only DomainName and NameServer attributes can 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::Domain;

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

sub getName { 'Domain' }

sub setAttribute
{
    my ( $this, $key, $value ) = @_;
    { domainname => 1, nameserver => 1, status => 1, whoisinfo => 1, owner => 1 }->{ lc ( $key ) } ||
	throw Net::RRP::Exception::InvalidAttributeName ();
    $this->SUPER::setAttribute ( $key => $value );
}

1;

__END__