@Test(expected = WebApplicationException.class) public void testGetNonExistingPage() throws Exception { pageService.getPage(-1); }
@GET @Path("/pages/{pageId}") @Produces(MediaType.APPLICATION_JSON) public Page getPage(@PathParam("pageId") long pageId) { return getExistingPage(pageId, false); }
PageService extends BasicService implements OwnerAPISupport<Page> { @GET @Path("/pages/{pageId}") @Produces(MediaType.APPLICATION_JSON) public Page getPage(@PathParam("pageId") long pageId) { return getExistingPage(pageId, false); } }
PageService extends BasicService implements OwnerAPISupport<Page> { @GET @Path("/pages/{pageId}") @Produces(MediaType.APPLICATION_JSON) public Page getPage(@PathParam("pageId") long pageId) { return getExistingPage(pageId, false); }  }
PageService extends BasicService implements OwnerAPISupport<Page> { @GET @Path("/pages/{pageId}") @Produces(MediaType.APPLICATION_JSON) public Page getPage(@PathParam("pageId") long pageId) { return getExistingPage(pageId, false); }  @GET @Path("/pages") @Produces(MediaType.APPLICATION_JSON) List<Page> getPages(@QueryParam("userId") String userId); @GET @Path("/catalog") @Produces(MediaType.APPLICATION_JSON) List<Page> getPageCatalog(); @GET @Path("/advertisedpages") @Produces(MediaType.APPLICATION_JSON) List<Page> getAdvertisedPages(@DefaultValue("0") @QueryParam("maxResults") int maxResults); @GET @Path("/pages/{pageId}") @Produces(MediaType.APPLICATION_JSON) Page getPage(@PathParam("pageId") long pageId); @PUT @Path("/pages/{pageId}") @Produces(MediaType.APPLICATION_JSON) Page updatePage(@PathParam("pageId") long pageId, Page pageData); @PUT @Path("/pages/{pageId}/templatevalues") @Produces(MediaType.APPLICATION_JSON) Page updateTemplateValues(@PathParam("pageId") long pageId, Page pageData); @POST @Path("/pages") @Consumes(MediaType.APPLICATION_JSON) Page createPage(Page page); @POST @Path("/pages/{pageId}/screenshot") Response uploadScreenshot(@PathParam("pageId") long pageId); @DELETE @Path("/pages/{pageId}/screenshot") Response deleteScreenshot(@PathParam("pageId") long pageId); @GET @Path("/drafts/{pageId}") @Produces(MediaType.APPLICATION_JSON) Page getDraft(@PathParam("pageId") long pageId); @PUT @Path("/drafts/{pageId}") @Consumes(MediaType.APPLICATION_JSON) Page setDraft(@PathParam("pageId") long pageId, Page page); @DELETE @Path("/drafts/{pageId}") Response deleteDraft(@PathParam("pageId") long pageId); @DELETE @Path("/pages/{pageId}") Response deletePage(@PathParam("pageId") long pageId); @POST @Path("/pages/{pageId}/copy") @Consumes(MediaType.APPLICATION_JSON) Page copyPage(@PathParam("pageId") long pageId, Page newPage); @GET @Path("/pages/{pageId}/references") @Produces(MediaType.APPLICATION_JSON) PageReferences getReferences(@PathParam("pageId") long pageId); @Override @POST @Path("/pages/{pageId}/owners") @Consumes(MediaType.APPLICATION_JSON) Page addOwners(@PathParam("pageId") long pageId, Owner[] ownerData); @Override @PUT @Path("/pages/{pageId}/owners/{ownerId}") @Consumes(MediaType.APPLICATION_JSON) Page updateOwner(@PathParam("pageId") long pageId, @PathParam("ownerId") long ownerId, Owner owner); @Override @DELETE @Path("/pages/{pageId}/owners/{ownerId}") @Produces(MediaType.APPLICATION_JSON) Page deleteOwner(@PathParam("pageId") long pageId, @PathParam("ownerId") long ownerId); }
PageService extends BasicService implements OwnerAPISupport<Page> { @GET @Path("/pages/{pageId}") @Produces(MediaType.APPLICATION_JSON) public Page getPage(@PathParam("pageId") long pageId) { return getExistingPage(pageId, false); }  @GET @Path("/pages") @Produces(MediaType.APPLICATION_JSON) List<Page> getPages(@QueryParam("userId") String userId); @GET @Path("/catalog") @Produces(MediaType.APPLICATION_JSON) List<Page> getPageCatalog(); @GET @Path("/advertisedpages") @Produces(MediaType.APPLICATION_JSON) List<Page> getAdvertisedPages(@DefaultValue("0") @QueryParam("maxResults") int maxResults); @GET @Path("/pages/{pageId}") @Produces(MediaType.APPLICATION_JSON) Page getPage(@PathParam("pageId") long pageId); @PUT @Path("/pages/{pageId}") @Produces(MediaType.APPLICATION_JSON) Page updatePage(@PathParam("pageId") long pageId, Page pageData); @PUT @Path("/pages/{pageId}/templatevalues") @Produces(MediaType.APPLICATION_JSON) Page updateTemplateValues(@PathParam("pageId") long pageId, Page pageData); @POST @Path("/pages") @Consumes(MediaType.APPLICATION_JSON) Page createPage(Page page); @POST @Path("/pages/{pageId}/screenshot") Response uploadScreenshot(@PathParam("pageId") long pageId); @DELETE @Path("/pages/{pageId}/screenshot") Response deleteScreenshot(@PathParam("pageId") long pageId); @GET @Path("/drafts/{pageId}") @Produces(MediaType.APPLICATION_JSON) Page getDraft(@PathParam("pageId") long pageId); @PUT @Path("/drafts/{pageId}") @Consumes(MediaType.APPLICATION_JSON) Page setDraft(@PathParam("pageId") long pageId, Page page); @DELETE @Path("/drafts/{pageId}") Response deleteDraft(@PathParam("pageId") long pageId); @DELETE @Path("/pages/{pageId}") Response deletePage(@PathParam("pageId") long pageId); @POST @Path("/pages/{pageId}/copy") @Consumes(MediaType.APPLICATION_JSON) Page copyPage(@PathParam("pageId") long pageId, Page newPage); @GET @Path("/pages/{pageId}/references") @Produces(MediaType.APPLICATION_JSON) PageReferences getReferences(@PathParam("pageId") long pageId); @Override @POST @Path("/pages/{pageId}/owners") @Consumes(MediaType.APPLICATION_JSON) Page addOwners(@PathParam("pageId") long pageId, Owner[] ownerData); @Override @PUT @Path("/pages/{pageId}/owners/{ownerId}") @Consumes(MediaType.APPLICATION_JSON) Page updateOwner(@PathParam("pageId") long pageId, @PathParam("ownerId") long ownerId, Owner owner); @Override @DELETE @Path("/pages/{pageId}/owners/{ownerId}") @Produces(MediaType.APPLICATION_JSON) Page deleteOwner(@PathParam("pageId") long pageId, @PathParam("ownerId") long ownerId);  }