예제 #1
0
 private URI updatePortfolio(String name, DocumentVisibility visibility, PortfolioDocument doc) {
   doc.getPortfolio().setName(name);
   doc.setVisibility(visibility);
   doc = data().getPortfolioMaster().update(doc);
   data().setPortfolio(doc);
   URI uri = WebPortfolioResource.uri(data());
   return uri;
 }
예제 #2
0
 // -------------------------------------------------------------------------
 @DELETE
 @Produces(MediaType.TEXT_HTML)
 public Response deleteHTML() {
   PortfolioDocument doc = data().getPortfolio();
   if (doc.isLatest() == false) {
     return Response.status(Status.FORBIDDEN).entity(getHTML()).build();
   }
   data().getPortfolioMaster().remove(doc.getUniqueId());
   URI uri = WebPortfolioResource.uri(data());
   return Response.seeOther(uri).build();
 }