#------------------------------------------------------------
# Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved
#------------------------------------------------------------
package Raptor::App;

use strict;
use warnings;

use lib '/app/tools/common/lib';
use Common::Assert;
use RSApache::RSWebApp;
use base 'RSApache::RSWebApp';

my %gCommandMap = (

    # ---- User Commands ---- #
    'help' => {
        'DEFAULT'                 => 'Raptor::Help::Command::Show',
        'show'                    => 'Raptor::Help::Command::Show',
        'sales_file_guide'        => 'Raptor::Help::Command::DownloadSalesFileGuide',
        'digital_sales_spec'      => 'Raptor::Help::Command::DownloadDigitalSalesSpec',
        'digital_sales_template'  => 'Raptor::Help::Command::DownloadDigitalSalesTemplate',
        'physical_sales_spec'     => 'Raptor::Help::Command::DownloadPhysicalSalesSpec',
        'physical_sales_template' => 'Raptor::Help::Command::DownloadPhysicalSalesTemplate',
    },
    'reports' => {
        'DEFAULT' => 'Raptor::SaleReport::Command::Main',
        'm'       => 'Raptor::SaleReport::Command::Main',
        'ss'      => 'Raptor::SaleReport::Command::ServicesSummary',
        'fs'      => 'Raptor::SaleReport::Command::FormatsSummary',
        'f'       => 'Raptor::SaleReport::Command::FormatDetail',
        'as'      => 'Raptor::SaleReport::Command::AlbumsSummary',
        'a'       => 'Raptor::SaleReport::Command::AlbumDetail',
        'ks'      => 'Raptor::SaleReport::Command::TracksSummary',
        'k'       => 'Raptor::SaleReport::Command::TrackDetail',
        's'       => 'Raptor::SaleReport::Command::ServiceDetail',
        'sf'      => 'Raptor::SaleReport::Command::ServiceFormatDetail',
        'ls'      => 'Raptor::SaleReport::Command::LabelsSummary',
        'rs'      => 'Raptor::SaleReport::Command::ArtistsSummary',
        'r'       => 'Raptor::SaleReport::Command::ArtistDetail',
        'gs'      => 'Raptor::SaleReport::Command::GeoSummary',
    },
    'matcher' => {
        'DEFAULT'  => 'Raptor::Matcher::Command::Dispatch',
        'dispatch' => 'Raptor::Matcher::Command::Dispatch',
        'file'     => 'Raptor::Matcher::Command::File',
        'match'    => 'Raptor::Matcher::Command::Match',
        'unmatch'  => 'Raptor::Matcher::Command::Unmatch',
        'sale'     => 'Raptor::Matcher::Command::Sale',
    },
    'tracker' => {
        'DEFAULT'                   => 'Raptor::Tracker::Command::Main',
        'main'                      => 'Raptor::Tracker::Command::Main',
        'allexceptions'             => 'Raptor::Tracker::Command::AllExceptionsReport',
        'consolidated_exceptions'   => 'Raptor::Tracker::Command::ConsolidatedExceptionsReport',
        'close'                     => 'Raptor::Tracker::Command::ClosePeriod',
        'currentrecon'              => 'Raptor::Tracker::Command::CurrentReconReport',
        'exceptionsdl'              => 'Raptor::Tracker::Command::DownloadAllExceptionsFile',
        'consolidated_exceptionsdl' => 'Raptor::Tracker::Command::DownloadConsolidatedExceptionsFile',
        'edit_period'               => 'Raptor::Tracker::Command::EditPeriod',
        'error_log'                 => 'Raptor::Tracker::Command::ErrorLog',
        'exceptions'                => 'Raptor::Tracker::Command::ExceptionsReport',
        'delete'                    => 'Raptor::Tracker::Command::FileDelete',
        'delete_split'              => 'Raptor::Tracker::Command::SplitFileDelete',
        'import'                    => 'Raptor::Tracker::Command::FileImport',
        'saveas'                    => 'Raptor::Tracker::Command::FileSave',
        'upload'                    => 'Raptor::Tracker::Command::FileUpload',
        'finish'                    => 'Raptor::Tracker::Command::FinishImport',
        'forcesplit'                => 'Raptor::Tracker::Command::ForceSplit',
        'notes'                     => 'Raptor::Tracker::Command::Notes',
        'qwikclose'                 => 'Raptor::Tracker::Command::QwikClose',
        'reopen'                    => 'Raptor::Tracker::Command::ReopenFile',
        'checkrevenue'              => 'Raptor::Tracker::Command::RevenueChecked',
        'currency'                  => 'Raptor::Tracker::Command::SetConversionRate',
        'revenue'                   => 'Raptor::Tracker::Command::SetRevenue',
        'distributionfee'           => 'Raptor::Tracker::Command::DistributionFee',
        'trackerdl'                 => 'Raptor::Tracker::Command::TrackerToExcel',
        'download'                  => 'Raptor::Tracker::Command::Download',
        'license_income'            => 'Raptor::Tracker::Command::LicenseIncome',
        'license_income_finish'     => 'Raptor::Tracker::Command::FinishLicenseIncome',
        'show_license_income'       => 'Raptor::Tracker::Command::ShowLicenseIncome',
        'reopen_license_income'     => 'Raptor::Tracker::Command::ReopenLicenseIncome',
        'delete_license_income'     => 'Raptor::Tracker::Command::DeleteLicenseIncome',
        'qwikclose_license_income'  => 'Raptor::Tracker::Command::QwikCloseLicenseIncome',
        'redo_reports'              => 'Raptor::Tracker::Command::RedoPeriodReports',
        'currency_conversion_entry' => 'Raptor::Tracker::Command::CurrencyConversionEntry',
    },
    'login' => {
        'DEFAULT' => 'AppUser::Login::Command::Login',
        'login'   => 'AppUser::Login::Command::Login',
        'select'  => 'AppUser::Login::Command::Select',
    },
    'logout' => {
        'DEFAULT' => 'AppUser::Logout::Command::Logout',
        'logout'  => 'AppUser::Logout::Command::Logout',
    },
);

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

    return \%gCommandMap;
}

1;

