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

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

use lib '/app/tools/rps/lib';
use RPS::Master::SearchForm;

use RPS::SearchCommand;
use base 'RPS::SearchCommand';

sub cmd  { return 'search'; }
sub area { return 'master'; }

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

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(dbClass => 'RPS::DB::Item::Master',
										 xmlClass => 'RPS::Master::Master',
										 xmlTag => 'Master',
										 loadSubs => 1,
										 pageSize => 30);
	return $response if($response);

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



###
1;# Play nicely.
###
