@PUT @Path("displayname") @Consumes(MediaType.APPLICATION_JSON) public Response onPutOnDisplayName(Application value) { this.application.setDisplayName(value.getDisplayName()); return persist(); }
private static Application getDefaultApplicationData(SelfServiceMetaDataId id) { Application app = new Application(); app.setIconUrl("icon.jpg"); app.setImageUrl("image.jpg"); final TServiceTemplate serviceTemplate = RepositoryFactory.getRepository().getElement((ServiceTemplateId) id.getParent()); app.setDisplayName(serviceTemplate.getName()); List<TDocumentation> documentation = serviceTemplate.getDocumentation(); if ((documentation != null) && (!documentation.isEmpty())) { TDocumentation doc = documentation.get(0); List<Object> content = doc.getContent(); if ((content != null) && (!content.isEmpty())) { app.setDescription(content.get(0).toString()); } } return app; } }