コード例 #1
0
  public String doPrepareEditSong(Song song) {
    this.editSong = song;
    this.currentSongNumber = song.getSongNumber();
    this.currentSongTitle = song.getTitle();
    this.currentSongDuration = song.getFormattedDuration();

    return null;
  }
コード例 #2
0
  public String doAddSong() {
    Song song;
    if (editSong != null) {
      song = editSong;
      song.setTitle(currentSongTitle);
      song.setFormattedDuration(currentSongDuration);
    } else {
      song = new Song(currentSongNumber, currentSongTitle, currentSongDuration, album);
    }

    this.album.addSong(song);
    initSong();

    return null;
  }
コード例 #3
0
  public String doDeleteSong(Song song) {
    LOGGER.info("Delete Song: " + song.getTitle());
    album.removeSong(song);

    return null;
  }