class PageService extends BasicService implements OwnerAPISupport<Page> {

	@DELETE
	@Path("/pages/{pageId}")
	public Response deletePage(@PathParam("pageId") long pageId) {
		Page existingPage = getExistingPage(pageId, true);

		// remove references in existing playlists
		new PageReferenceDAO().deleteByPage(existingPage);
		for (Owner owner : existingPage.getOwners()) {
			new OwnerDAO().deleteById(owner.getId());
		}

		// TODO: delete screenshots

		return new PageDAO().deleteById(pageId) ? RESPONSE_OK : RESPONSE_BAD;
	}

}