#---------------------------------------------------------------
# ____                   _ _         ____  _
#|  _ \ ___  _   _  __ _| | |_ _   _/ ___|| |__   __ _ _ __ ___
#| |_) / _ \| | | |/ _` | | __| | | \___ \| '_ \ / _` | '__/ _ \
#|  _ < (_) | |_| | (_| | | |_| |_| |___) | | | | (_| | | |  __/
#|_| \_\___/ \__, |\__,_|_|\__|\__, |____/|_| |_|\__,_|_|  \___|
#            |___/             |___/
#
# Copyright (C) 2009 RoyaltyShare, Inc.   All Rights Reserved
# $Id$
#---------------------------------------------------------------
package BookPub::Catalog::Import::Process::Fetcher::FileHandler::RSStandard;
use strict;
use warnings;

use File::Path;
use Data::Dumper;

use lib '/app/tools/common/lib';
use lib '/app/tools/bookpub/lib';
use Common::Assert;
use BookPub::DB::Item::CatalogImportItem::File;

use base 'BookPub::Catalog::Import::Process::Fetcher::FileHandler';

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

    my $catalogImportID = $self->{_fetcher}->_catalogImportID();

    my $importFileRec = BookPub::DB::Item::CatalogImportItem::File->Create(
        catalog_import_id => $catalogImportID,
        file_path         => $self->localFile(),
        file_type         => BookPub::DB::Item::CatalogImportItem::File::kFileTypeRSStandard(),
    );
    $importFileRec->save();
}

1;
