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

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

use lib '/app/tools/rps/lib';
use RPS::Song::Form;

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

sub cmd  { return 'show'; }
sub area { return 'song'; }

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

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

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

    my $songID = $self->getParam("SongID");
    my $form = RPS::Song::Form->new( songID => $songID );
    $self->{xml}{Form} = $form;

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

    return $response;
}

1;
