| 1 | package Net::RRP::Entity::Owner; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use Net::RRP::Entity; | ||
| 5 | use Net::RRP::Exception::InvalidAttributeName; | ||
| 6 | @Net::RRP::Entity::Owner::ISA = qw(Net::RRP::Entity); | ||
| 7 | $Net::RRP::Entity::Owner::VERSION = '0.1'; | ||
| 8 | |||
| 9 | =head1 NAME | ||
| 10 | |||
| 11 | Net::RRP::Entity::Owner - rrp owner entity representation. | ||
| 12 | |||
| 13 | =head1 SYNOPSIS | ||
| 14 | |||
| 15 | use Net::RRP::Entity::Owner; | ||
| 16 | my $ownerEntity = new Net::RRP::Entity::Owner ( name => 'ownername', | ||
| 17 | password => 'password', | ||
| 18 | .... ); | ||
| 19 | |||
| 20 | =head1 DESCRIPTION | ||
| 21 | |||
| 22 | This is a rrp owner entity representation class. | ||
| 23 | |||
| 24 | =cut | ||
| 25 | |||
| 26 | =head2 getName | ||
| 27 | |||
| 28 | return a 'Owner' | ||
| 29 | |||
| 30 | =cut | ||
| 31 | |||
| 32 | sub getName { 'Owner' } | ||
| 33 | |||
| 34 | =head2 setAttribute | ||
| 35 | |||
| 36 | Add check constraint to attributes. Only OwnerName and NameServer attributes can exists. | ||
| 37 | |||
| 38 | =cut | ||
| 39 | |||
| 40 | sub setAttribute | ||
| 41 | { | ||
| 42 | my ( $this, $key, $value ) = @_; | ||
| 43 | { ownername => 1, password => 1, whoisinfo => 1, techcontact => 1, admincontact => 1 }->{ lc ( $key ) } || | ||
| 44 | throw Net::RRP::Exception::InvalidAttributeName (); | ||
| 45 | $this->SUPER::setAttribute ( $key => $value ); | ||
| 46 | } | ||
| 47 | |||
| 48 | 1; | ||
| 49 | |||
| 50 | =head1 AUTHOR AND COPYRIGHT | ||
| 51 | |||
| 52 | Net::RRP::Entity::Owner (C) Michael Kulakov, Zenon N.S.P. 2000 | ||
| 53 | 125124, 19, 1-st Jamskogo polja st, | ||
| 54 | Moscow, Russian Federation | ||
| 55 | |||
| 56 | mkul@cpan.org | ||
| 57 | |||
| 58 | All rights reserved. | ||
| 59 | |||
| 60 | You may distribute this package under the terms of either the GNU | ||
| 61 | General Public License or the Artistic License, as specified in the | ||
| 62 | Perl README file. | ||
| 63 | |||
| 64 | =head1 SEE ALSO | ||
| 65 | |||
| 66 | L<Net::RRP::Entity(3)>, L<Net::RRP::Codec(3)>, RFC 2832, | ||
| 67 | L<Net::RRP::Exception::InvalidAttributeName(3)> | ||
| 68 | |||
| 69 | =cut | ||
| 70 | |||
| 71 | __END__ |