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

use lib '/app/tools/appuser/lib';
use AppUser::User::User;

use lib '/app/tools/rps/lib';
use RPS::LabelList;
use RPS::ArtistContract::RecentlyViewedContractList;
use RPS::Payor::PayorList;

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

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

sub cmd  { return 'main'; }
sub area { return 'artist_contract'; }

use constant kTemplate => "/app/tools/rps/templates/artist_contract/index.xsl";

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

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

    $self->{xml}{RecentlyViewed} = RPS::ArtistContract::RecentlyViewedContractList->new(user_id => $self->_getUser()->UserID());
	$self->{xml}{PayorList} = RPS::Payor::PayorList->new();

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



1;
