#------------------------------------------------------------
# Copyright (C) 2009 RoyaltyShare, Inc.   All Rights Reserved
#------------------------------------------------------------
package Support::SaleImporter::SaleImporterList::BookPub;

use strict;
use warnings;
use Carp;

use lib '/app/tools/rps/lib';
use BookPub::Import::Factory;

use lib '/app/tools/support/lib';
use Support::SaleImporter::SaleImporter::BookPub;

use base 'Support::SaleImporter::SaleImporterList';

sub _getAllVersions {
    my $self      = shift;
    my $serviceID = shift || return;
    my $importers = BookPub::Import::Factory::GetImporters($serviceID);

    return $importers ? keys(%$importers) : undef;
}

sub _getSaleImporter {
    my $self      = shift;
    my $version   = shift;
    my $serviceID = shift;

    return Support::SaleImporter::SaleImporter::BookPub->new( version => $version, serviceID => $serviceID );
}

1;
