#------------------------------------------------------------
# Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved
# $Id$
#------------------------------------------------------------
package RPS::Reference::Command::StatRateTable;

use lib '/app/tools/common/lib';
use RSApache::Response::XSLT;

use lib '/app/tools/rps/lib';
use RPS::Reference::StatRateList;

use RPS::Command;
use base 'RPS::Command';

use constant kTemplate => '/app/tools/rps/templates/reference/index.xsl';

sub cmd  { return "statrates"; }
sub area { return "reference"; }

sub execute {
    my ($self) = @_;

    # Give any inherited methods the first crack at this.
    # (This checks for login and basic access permissions).
    #
    my $response = $self->SUPER::execute();
    return $response if $response;

    $self->{xml}{StatRateList} = RPS::Reference::StatRateList->new();

    $response = RSApache::Response::XSLT->new( $self->{xml}, kTemplate );

    return $response;
}

1;
