class ScreenService extends BasicService implements OwnerAPISupport<Screen> {

	@PUT
	@Path("/screens/{id}")
	@Produces(MediaType.APPLICATION_JSON)
	public Screen updateScreen(@PathParam("id") long screenId, Screen screenData) {
		Screen existingScreen = getExistingScreen(screenId, true);

		existingScreen.setName(screenData.getName());
		existingScreen.setPlaylist(screenData.getPlaylist());
		existingScreen.setScreenType(screenData.getScreenType());
		existingScreen.setShowOwners(screenData.isShowOwners());
		existingScreen.setShowHeader(screenData.isShowHeader());
		existingScreen.setShowFooter(screenData.isShowFooter());
		existingScreen.setLowMemoryMode(screenData.isLowMemoryMode());
		existingScreen.setScreenshotMode(screenData.isScreenshotMode());
		existingScreen.setTransitionMode(screenData.getTransitionMode());
		existingScreen = ScreenDAO.save(existingScreen);

		if (existingScreen.getPlaylist() != null) {
			existingScreen.getPlaylist().expand();
		}

		return existingScreen;
	}

}