@GET @Path("getApplicationLink") public Response getApplicationLinkProperty(@QueryParam("propertyKey") String propertyKey) { final ApplicationLink applicationLink = applicationLinkService.getPrimaryApplicationLink(GenericApplicationType.class); Object propertyValue = applicationLink.getProperty(propertyKey); return ok("'" + propertyKey + "'='" + propertyValue + "'").build(); }
@GET @Path("setApplicationLink") public Response setApplicationLinkProperty(@QueryParam("propertyKey") String propertyKey, @QueryParam("propertyValue") String propertyValue) { final ApplicationLink applicationLink = applicationLinkService.getPrimaryApplicationLink(GenericApplicationType.class); applicationLink.putProperty(propertyKey, propertyValue); return ok("Properties updated!").build(); }
@GET @Path("primary/{type}") public Response getPrimaryApplicationLink(@PathParam("type") final TypeId typeId) { final ApplicationType type = typeAccessor.loadApplicationType(typeId); if (type == null) { return typeNotInstalled(typeId); } final ApplicationLink application = applicationLinkService.getPrimaryApplicationLink(type.getClass()); if (application == null) { return notFound(i18nResolver.getText("applinks.error.noprimary", type.getClass())); } return ok(toApplicationLinkEntity(application)); }
@Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { log.debug("doGet - Getting trusted apps link signature:" + req.getHeader(TrustedApplicationUtils.Header.Request.SIGNATURE)); final ApplicationLink primaryApplicationLink = applicationLinkService.getPrimaryApplicationLink(RefAppApplicationType.class); final ApplicationLinkRequestFactory requestFactory = primaryApplicationLink.createAuthenticatedRequestFactory(); try {
@GET @Path ("primary/{type}") public Response getPrimaryApplicationLink(@PathParam ("type") final TypeId typeId) { final ApplicationType type = typeAccessor.loadApplicationType(typeId); if (type == null) { return typeNotInstalled(typeId); } final ApplicationLink application = applicationLinkService.getPrimaryApplicationLink(type.getClass()); if (application == null) { return notFound(i18nResolver.getText("applinks.error.noprimary", type.getClass())); } return ok(toApplicationLinkEntity(application)); }
private String getStudioLoginUrl(final HttpServletRequest request) { final String originalURL = SeraphUtils.getOriginalURL(request); final ApplicationLink link = applicationLinkService.getPrimaryApplicationLink(JiraApplicationType.class); return link.getDisplayUrl().toString() + "/secure/Dashboard.jspa" + (originalURL == null ? "" : "?os_destination=" + RequestUtils.encode(applicationProperties.getBaseUrl() + originalURL)); }
@Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws IOException { ApplicationLink primaryApplicationLink = applicationLinkService.getPrimaryApplicationLink(RefAppApplicationType.class); ApplicationLinkRequestFactory requestFactory = primaryApplicationLink.createAuthenticatedRequestFactory(OAuthAuthenticationProvider.class);