org.musicontroller.importer
Class ImporterImpl

java.lang.Object
  extended by org.musicontroller.importer.ImporterImpl
All Implemented Interfaces:
Importer

public class ImporterImpl
extends java.lang.Object
implements Importer

Implements Importer interface for importing music archives into the music database.

Version:
$Id: ImporterImpl.java,v 1.1 2010/03/16 18:55:43 varienaja Exp $
Author:
Hans Drexler

Constructor Summary
ImporterImpl()
           
 
Method Summary
 Dao getDao()
          Getter for the Dao.
 McService getMcService()
          Getter for the McService.
 void importMusic(MusicArchiveBean bean)
          Import the music described in the MusicArchiveBean into the database.
static java.lang.String moveMP3ToLibrary(MusicArchiveEntryBean entryToImport)
          Moves an entry to its final destination.
 void setDao(Dao dao)
          Setter for the Dao.
 void setMcService(McService mcService)
          Setter for the McService.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImporterImpl

public ImporterImpl()
Method Detail

setDao

public void setDao(Dao dao)
Setter for the Dao.

Parameters:
dao - The Dao.

getDao

public Dao getDao()
Getter for the Dao.

Returns:
The Dao.

getMcService

public McService getMcService()
Getter for the McService.

Returns:
The McService.

setMcService

public void setMcService(McService mcService)
Setter for the McService.

Parameters:
mcService -

importMusic

public void importMusic(MusicArchiveBean bean)
                 throws ImporterException
Description copied from interface: Importer
Import the music described in the MusicArchiveBean into the database.

Specified by:
importMusic in interface Importer
Parameters:
bean - Contains the information about the music to be imported. If this is null nothing happens.
Throws:
ImporterException - Could not extract the archive to temporary directory.

moveMP3ToLibrary

public static java.lang.String moveMP3ToLibrary(MusicArchiveEntryBean entryToImport)
                                         throws ImporterException
Moves an entry to its final destination.

Parameters:
entryToImport - The entry to import.
Returns:
The relative name of the File, the entry was moved to.
Throws:
ImporterException - when the move failed.


Copyright © 2010 A.J.V.. All Rights Reserved.