@PUT @Path("published/cancel/") @Consumes(MediaType.APPLICATION_XML) public void cancelPublishedTree(String repXml) { PlistParser parser = new PlistParser(); StampTreeModel model = (StampTreeModel) parser.parse(repXml); int cnt = EJBLocator.getStampServiceBean().cancelPublishedTree(model); String cntStr = String.valueOf(cnt); debug(cntStr); }
@PUT @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.TEXT_PLAIN) public String putTree(String repXml) { PlistParser parser = new PlistParser(); StampTreeModel model = (StampTreeModel) parser.parse(repXml); long pk = EJBLocator.getStampServiceBean().putTree(model); String pkStr = String.valueOf(pk); debug(pkStr); return pkStr; }
@PUT @Path("published/") @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.TEXT_PLAIN) public String putPublishedTree(String repXml) { PlistParser parser = new PlistParser(); List<IStampTreeModel> list = (List<IStampTreeModel>) parser.parse(repXml); int cnt = EJBLocator.getStampServiceBean().updatePublishedTree(list); String cntStr = String.valueOf(cnt); debug(cntStr); return cntStr; }
@POST @Path("published/") @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.TEXT_PLAIN) public String postPublishedTree(String repXml) { PlistParser parser = new PlistParser(); List<IStampTreeModel> list = (List<IStampTreeModel>) parser.parse(repXml); long pk = EJBLocator.getStampServiceBean().saveAndPublishTree(list); String pkStr = String.valueOf(pk); debug(pkStr); return pkStr; }
@PUT @Path("subscribed/") @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.TEXT_PLAIN) public String subscribeTrees(String repXml) { PlistParser parser = new PlistParser(); List<SubscribedTreeModel> list = (List<SubscribedTreeModel>) parser.parse(repXml); List<Long> result = EJBLocator.getStampServiceBean().subscribeTrees(list); StringBuilder sb = new StringBuilder(); for (Long l : result) { sb.append(String.valueOf(l)); sb.append(CAMMA); } String pks = sb.substring(0, sb.length() - 1); debug(pks); return pks; }