Package com.jitcaforwin.extended.api.exceptions

Examples of com.jitcaforwin.extended.api.exceptions.LibrarySearchException


   */
  public Track getTrack(String name) throws LibrarySearchException {
    try {
      IITTrackCollection searchResult = this.itLibrary.search(name, ITPlaylistSearchField.SongNames());
      if (searchResult.getCount() > 1) {
        throw new LibrarySearchException("There are multiple tracks with the specified name \"" + name + "\"");
      } else if (searchResult.getCount() == 0) {
        return null; // no track found
      }
      return new TrackCollectionImpl(this, searchResult).getFirst();
    } catch (ObjectDeletedException e) {
View Full Code Here


   */
  public Track getTrack(String name) throws LibrarySearchException {
    try {
      IITTrackCollection searchResult = this.itLibrary.search(name, ITPlaylistSearchField.SongNames());
      if (searchResult.getCount() > 1) {
        throw new LibrarySearchException("There are multiple tracks with the specified name \"" + name + "\"");
      } else if (searchResult.getCount() == 0) {
        return null; // no track found
      }
      return new TrackCollectionImpl(this, searchResult).getFirst();
    } catch (ObjectDeletedException e) {
View Full Code Here

TOP

Related Classes of com.jitcaforwin.extended.api.exceptions.LibrarySearchException

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.