#------------------------------------------------------------
# Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved
# $Id$
#------------------------------------------------------------
package RPS::Mechanical::UK::Command::List;
use strict;
use warnings;

use lib '/app/tools/rps/lib';
use RPS::Mechanical::UK::UKMechanicalRunList;
use RPS::Payor::PayorList;
use RPS::RoyaltyRun::RoyaltyRunStatusList;
use RPS::Command;
use base 'RPS::Command';

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

sub cmd  { return 'list'; }
sub area { return 'uk_mech'; }

use constant kTemplate => "/app/tools/rps/templates/uk_mech/list.xsl";

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

	my $response = $self->SUPER::execute();
	return $response if $response;

	$self->{xml}{UKMechanicalRunList} = RPS::Mechanical::UK::UKMechanicalRunList->new();
    $self->{xml}{PayorList} = RPS::Payor::PayorList->new();

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

sub _getRoyaltyRunStatusList
{
	return RPS::RoyaltyRun::RoyaltyRunStatusList->new( ukMechanical => 1 );
}



1;
