class PlaylistService extends BasicService implements OwnerAPISupport<Playlist> {

	@PUT
	@Path("/playlists/{playlistId}")
	@Produces(MediaType.APPLICATION_JSON)
	public Playlist updatePlaylist(@PathParam("playlistId") long playlistId, Playlist playlistData) {
		Playlist existingPlaylist = getExistingPlaylist(playlistId, true);

		existingPlaylist.setName(playlistData.getName());
		existingPlaylist.setPageDisplayDuration(playlistData.getPageDisplayDuration());
		existingPlaylist.setListPublicly(playlistData.isListPublicly());

		return PlaylistDAO.save(existingPlaylist);
	}

}