Package com.jitcaforwin.main.exceptions.general

Examples of com.jitcaforwin.main.exceptions.general.JitcaFileException


    try {
      return new ITOperationStatusImpl(this.iTunesCom.callFunction("AddFile", file.getAbsolutePath())
          .getDispatch());
    } catch (DispatchObjectNullException e) {
      throw new JitcaFileException("Error occured during addFile. File could not be added.");
    } catch (ITUNES_E_OBJECTDELETED e) {
      throw new PlaylistDeletedException(this);
    } catch (ITUNES_E_OBJECTLOCKED e) {
      throw new PlaylistReadOnlyException(this);
    }
View Full Code Here


      for (int i = 0; i < paths.length; i++) {
        paths[i] = files[i].getAbsolutePath();
      }
      return new ITOperationStatusImpl(this.iTunesCom.callFunction("AddFiles", paths).getDispatch());
    } catch (DispatchObjectNullException e) {
      throw new JitcaFileException("Error occured during addFiles. Files could not be added.");
    } catch (ITUNES_E_OBJECTDELETED e) {
      throw new PlaylistDeletedException(this);
    } catch (ITUNES_E_OBJECTLOCKED e) {
      throw new PlaylistReadOnlyException(this);
    }
View Full Code Here

  public IITArtwork addArtworkFromFile(File artwork) throws JitcaException {
    try {
      return new ITArtworkImpl(this.iTunesCom.callFunction("AddArtworkFromFile", artwork.getAbsolutePath())
          .getDispatch());
    } catch (DispatchObjectNullException e) {
      throw new JitcaFileException("Artwork form file could not be added to Track.");
    } catch (ITUNES_E_OBJECTDELETED e) {
      throw new TrackDeletedException(this);
    }
  }
View Full Code Here

  public IITArtwork addArtworkFromFile(File artwork) throws JitcaException {
    try {
      return new ITArtworkImpl(this.iTunesCom.callFunction("AddArtworkFromFile", artwork.getAbsolutePath())
          .getDispatch());
    } catch (DispatchObjectNullException e) {
      throw new JitcaFileException("Artwork form file could not be added to Track.");
    } catch (ITUNES_E_OBJECTDELETED e) {
      throw new TrackDeletedException(this);
    }
  }
View Full Code Here

    }
  }

  public void renameFile(File newFile) throws JitcaException {
    if (newFile.exists()) {
      throw new JitcaFileException("A file already exists at the specified location " + newFile.getAbsolutePath());
    }

    this.getFile().renameTo(newFile);
    this.setFile(newFile);
View Full Code Here

    }
  }

  public void renameFile(File newFile) throws JitcaException {
    if (newFile.exists()) {
      throw new JitcaFileException("A file already exists at the specified location " + newFile.getAbsolutePath());
    }

    this.getFile().renameTo(newFile);
    this.setFile(newFile);
View Full Code Here

    try {
      return new ITOperationStatusImpl(this.iTunesCom.callFunction("AddFile", file.getAbsolutePath())
          .getDispatch());
    } catch (DispatchObjectNullException e) {
      throw new JitcaFileException("Error occured during addFile. File could not be added.");
    } catch (ITUNES_E_OBJECTDELETED e) {
      throw new PlaylistDeletedException(this);
    } catch (ITUNES_E_OBJECTLOCKED e) {
      throw new PlaylistReadOnlyException(this);
    }
View Full Code Here

      for (int i = 0; i < paths.length; i++) {
        paths[i] = files[i].getAbsolutePath();
      }
      return new ITOperationStatusImpl(this.iTunesCom.callFunction("AddFiles", paths).getDispatch());
    } catch (DispatchObjectNullException e) {
      throw new JitcaFileException("Error occured during addFiles. Files could not be added.");
    } catch (ITUNES_E_OBJECTDELETED e) {
      throw new PlaylistDeletedException(this);
    } catch (ITUNES_E_OBJECTLOCKED e) {
      throw new PlaylistReadOnlyException(this);
    }
View Full Code Here

TOP

Related Classes of com.jitcaforwin.main.exceptions.general.JitcaFileException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.