@Override public Iterable<ApplicationLink> getApplicationLinks(Class<? extends ApplicationType> type) { return applicationLinkService.getApplicationLinks(type); }
@Override public Iterable<ApplicationLink> getApplicationLinks() { return applicationLinkService.getApplicationLinks(); }
@Override @Nonnull public Iterable<ApplicationLink> getStashApplicationLinks() { final Iterable<ApplicationLink> applicationLinks = applicationLinkService.getApplicationLinks(StashApplicationType.class); assert null != applicationLinks; return applicationLinks; }
/** * Returns all the application links that point to a Confluence instance. * @return The application links that point to a Confluence instance. */ public Collection<ApplicationLink> getAppLinks() { return ImmutableList.copyOf(applicationLinkService.getApplicationLinks(ConfluenceApplicationType.class)); }
private boolean isPointingToAnyApplinkUrl(final URI callbackUri) { return Iterables.any(applicationLinkService.getApplicationLinks(), new Predicate<ApplicationLink>() { @Override public boolean apply(ApplicationLink applicationLink) { return validateCallbackUriAgainstApplink(callbackUri, applicationLink); } }); }
@Override public Iterable<ReadOnlyApplicationLink> doInTransaction() { final Iterable<ApplicationLink> applicationLinks = applicationLinkService.getApplicationLinks(); return ImmutableList.copyOf(transform(applicationLinks, toImmutableApplicationLink())); } });
public Collection<ApplicationLink> getJiraAppLinks() { if (jiraAppLinks == null) { final Iterable<ApplicationLink> iterable = applicationLinkService.getApplicationLinks(JiraApplicationType.class); jiraAppLinks = new ArrayList<ApplicationLink>(); for (final ApplicationLink appLink : iterable) { jiraAppLinks.add(appLink); } } return jiraAppLinks; }
private ApplicationLink getAppLink(String matcher, Function<ApplicationLink, String> getProperty) { for (ApplicationLink applicationLink : appLinkService.getApplicationLinks(JiraApplicationType.class)) { if (matcher.equals(getProperty.apply(applicationLink))) { return applicationLink; } } return null; }
private ApplicationLink getApplicationLinkByRpcUrl(String rpcurl) { for (ApplicationLink link : applicationLinkService.getApplicationLinks()) { if (link.getRpcUrl().toString().equals(rpcurl)) { return link; } } throw new IllegalArgumentException("Application Link with rpcurl '" + rpcurl + "' doesn't exist."); } }
public void testSuccessfulCall(OsgiServiceProxyFactory factory) { ApplicationLinkService service = factory.createProxy(ApplicationLinkService.class, 10000); Iterable<ApplicationLink> it = service.getApplicationLinks(); if (it == null) { throw new RuntimeException("Received null list of application links"); } } }
private void forEachApplicationLink(final Closure closure) { for (final ApplicationLink applicationLink : applicationLinkService.getApplicationLinks(FishEyeCrucibleApplicationType.class)) { closure.with(applicationLink); } }
@Override protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { final ImmutableMap.Builder<String, Object> contextBuilder = ImmutableMap.builder(); final ImmutableMap.Builder<ApplicationLink, AuthenticationInformation> recordBuilder = ImmutableMap.builder(); for (ApplicationLink link : applicationLinkService.getApplicationLinks()) { recordBuilder.put(link, getAuthenticationInformation(request, link)); } contextBuilder.put("records", recordBuilder.build()); render(TEMPLATE, contextBuilder.build(), response); }
public Collection<ApplicationLink> getApplicationLinksByUri(URI uri) { List<ApplicationLink> matches = new ArrayList<>(); for (ApplicationLink link : linkService.getApplicationLinks()) { if (matchesOrigin(uri, link.getRpcUrl())) { matches.add(link); } } return matches; }
private ApplicationLink getApplicationLink(final String appId) { for (final ApplicationLink appLink : applicationLinkService.getApplicationLinks(JiraApplicationType.class)) { if (appLink.getId().get().equals(appId)) { return appLink; } } return null; } }
private ApplicationLink getJiraAppLink(final String appId) { for (final ApplicationLink appLink : applicationLinkService.getApplicationLinks(JiraApplicationType.class)) { if (appLink.getId().get().equals(appId)) { return appLink; } } return null; }
@HtmlSafe @com.atlassian.velocity.htmlsafe.HtmlSafe public String render() { return template.execute(singletonMap("applinks", transform(newArrayList(applicationLinkService.getApplicationLinks()), new Function<ApplicationLink, Map<String, String>>() { public Map<String, String> apply(ApplicationLink from) { return ImmutableMap.of("id", from.getId().get(), "name", from.getName(), "type", i18nResolver.getText(from.getType().getI18nKey())); } }))); }
private List<String> findRegisteredServiceProviders() { final List<String> serviceProviderConsumerKeys = new ArrayList<String>(); for (final ApplicationLink link : applicationLinkService.getApplicationLinks()) { if (authenticationConfigurationManager.isConfigured(link.getId(), OAuthAuthenticationProvider.class)) { Map<String, String> configuration = authenticationConfigurationManager.getConfiguration(link.getId(), OAuthAuthenticationProvider.class); final String consumerKey = configuration.get(AddServiceProviderManuallyServlet.CONSUMER_KEY_OUTBOUND); serviceProviderConsumerKeys.add(consumerKey); } } return serviceProviderConsumerKeys; }
private boolean applinksSynced() { for (ApplicationLink existing : applicationLinkService.getApplicationLinks(FishEyeCrucibleApplicationType.class)) { if (applicationLinkIdMapper.fromApplicationId(existing.getId()) == null) { log.info("Found new application link [" + existing.getId() + "] that does not have corresponding Fisheye Instance, upgrading..."); return false; } } return true; }
public void removeAllTokensForUsername(String username) { final Iterable<ApplicationLink> applicationLinks = applicationLinkService.getApplicationLinks(); for (ApplicationLink applicationLink : applicationLinks) { final ApplicationId applicationId = applicationLink.getId(); if (consumerTokenStoreService.isOAuthOutgoingEnabled(applicationId)) { consumerTokenStoreService.removeConsumerToken(applicationId, username); } } } }
public void migrate() throws FishEyeUpgradeException { for (ApplicationLink applicationLink : applicationLinkService.getApplicationLinks(FishEyeCrucibleApplicationType.class)) { final com.atlassian.jirafisheyeplugin.upgrade.legacy.domain.fisheye.FishEyeInstance fishEyeInstance = legacyInstanceStore.getFishEyeInstance(applicationLinkIdMapper.fromApplicationId(applicationLink.getId())); for (MigrationInstanceProperty<?> instanceProperty : fishEyePropertyEnumerator.getPropertiesFor(fishEyeInstance)) { putPropertyInto(applicationLink, fishEyeInstance, instanceProperty); } } }