class PageService extends BasicService implements OwnerAPISupport<Page> {

	@POST
	@Path("/pages")
	@Consumes(MediaType.APPLICATION_JSON)
	public Page createPage(Page page) {
		sanitizePageData(page);
		if (StringUtils.isEmpty(page.getName())) {
			throwBadRequest();
		}

		User user = userUtil.getLoggedInDBUser(request);
		Owner owner = new Owner(user);
		owner.setContact(true);
		page.addOwner(owner);

		return PageDAO.saveNew(page);
	}

}