@Override public String apply(@Nullable ApplicationLink input) { return input.getName(); } });
@Override public RestResponse get(String service, Map<String, String> headers, int timeout) throws CredentialsRequiredException { LOGGER.debug("Invoking service {} in applink {} with timeout of {}", new Object[] { service, applicationLink.getName(), timeout }); return executeGetRequest(service, headers, timeout); }
public SourceErrorReport(final ApplicationLink applicationLink, final String errorMessage) { this.url = applicationLink.getDisplayUrl().toASCIIString(); this.name = applicationLink.getName(); this.repositoryName = null; this.errorMessage = errorMessage; }
public <T> T parseValue(final JsonPath path) { final T value = (T) path.read(json); if (value == null) { log.debug( String.format("Expected value at %s was missing in response from Bitbucket Server %s.", path.getPath(), stashLink.getName())); } return value; }
@VisibleForTesting protected Consumer fetchConsumerInformation(ApplicationLink link) throws ConsumerInformationUnavailableException { try { return ConsumerInformationHelper.fetchConsumerInformation(link); } catch (ResponseException e) { throw serviceExceptionFactory.create(ConsumerInformationUnavailableException.class, link.getName()); } } }
public ConfluenceApplicationLinksBean(final Iterable<ApplicationLink> appLinks) { applicationLinks = new ArrayList<ConfluenceApplicationLinkBean>(); for (final ApplicationLink appLink : appLinks) { applicationLinks.add(new ConfluenceApplicationLinkBean(appLink.getId().get(), appLink.getName())); } }
OAuthAuthenticateResponse(ApplicationLink appLink, String authUri) { this.authUri = authUri; this.id = appLink.getId().get(); this.name = appLink.getName(); this.uri = appLink.getDisplayUrl().toString(); }
private void registerOAuthConsumer(final String id, final ApplicationLink applicationLink) { Consumer consumer = serviceProviderConsumerStore.get(id); if (consumer == null) { throw new RuntimeException("No consumer with key '" + consumer.getKey() + "' registered!"); } serviceProviderStoreService.addConsumer(consumer, applicationLink); log.debug("Associated OAuth Consumer with key '" + consumer.getKey() + "' with Application Link id='" + applicationLink.getId() + "' and name='" + applicationLink.getName() + "'"); } }
@Override protected void doServiceGet(@Nonnull HttpServletRequest request, @Nonnull HttpServletResponse response) throws ServiceException, IOException, ServletException { permissionValidationService.validateAdmin(); ApplicationLink applink = webApplinkHelper.getApplicationLink(request); validateApplink(applink); publishAnalytics(applink); render(request, response, "page-applink-edit", "applinks.page.applink.edit.main", ImmutableMap.of( "applink", applink, "applinkId", applink.getId().get(), PARAM_TITLE, applink.getName())); }
public ImmutableApplicationLink(final ApplicationLink that, final ApplicationLinkRequestFactoryFactory requestFactoryFactory) { checkNotNull(that, "that"); checkNotNull(requestFactoryFactory, "requestFactoryFactory"); this.applicationId = that.getId(); this.applicationType = that.getType(); this.name = that.getName(); this.displayUrl = that.getDisplayUrl(); this.rpcUrl = that.getRpcUrl(); this.isPrimary = that.isPrimary(); this.isSystem = that.isSystem(); this.requestFactoryFactory = requestFactoryFactory; }
public RestMinimalApplicationLink(@Nonnull ApplicationLink link) { requireNonNull(link, "link"); id = link.getId().get(); name = link.getName(); displayUrl = link.getDisplayUrl(); rpcUrl = link.getRpcUrl(); type = resolveApplicationTypeId(link.getType()); }
public Map<String, String> apply(ApplicationLink from) { return ImmutableMap.of("id", from.getId().get(), "name", from.getName(), "type", i18nResolver.getText(from.getType().getI18nKey())); } })));
private void createProjectLink(final String key, final String applicationType, final ApplicationLink applicationLink, final boolean deleteExisting) { final Application app = Application.fromString(applicationType); final KeyAssociations associations = appLinksManager.getKeyAssociations(app, key); if (deleteExisting) { associations.removeAll(); } associations.setPrimary(applicationLink.getName(), applicationLink.getRemoteKey()); }
@Override public void updateApplicationLink(ApplicationLink newApplicationLink, ApplicationId oldApplicationId) { Site site = siteDao.get(oldApplicationId); site.setApplicationId(newApplicationLink.getId()); site.setName(newApplicationLink.getName()); siteDao.save(site); }
@Override public Site getByApplicationLink(ApplicationLink applicationLink) { Site site = getByApplicationLinkInternal(applicationLink); if (site == null) { site = new Site(); site.setApplicationId(applicationLink.getId()); site.setName(applicationLink.getName()); site = siteDao.save(site); } validateAndEnrichSite(site, applicationLink); return site; }
public ApplicationLinkEntity(final ApplicationLink applicationLink, final Link self) { this(applicationLink.getId(), TypeId.getTypeId(applicationLink.getType()), applicationLink.getName(), applicationLink.getDisplayUrl(), applicationLink.getType().getIconUrl(), resolveIconUri(applicationLink.getType()), applicationLink.getRpcUrl(), applicationLink.isPrimary(), applicationLink.isSystem(), self); }
public static RendererContextBuilder createContextBuilder(final ApplicationLink applicationLink, final I18nResolver i18nResolver, final InternalHostApplication internalHostApplication) { final RendererContextBuilder builder = new RendererContextBuilder() .put("localApplicationName", internalHostApplication.getName()) .put("localApplicationType", i18nResolver.getText(internalHostApplication.getType().getI18nKey())) .put("remoteApplicationName", applicationLink.getName()) .put("remoteApplicationType", i18nResolver.getText(applicationLink.getType().getI18nKey())); return builder; }
protected RendererContextBuilder createContextBuilder(final ApplicationLink applicationLink) { final RendererContextBuilder builder = new RendererContextBuilder() .put("localApplicationName", internalHostApplication.getName()) .put("localApplicationType", i18nResolver.getText(internalHostApplication.getType().getI18nKey())) .put("remoteApplicationName", applicationLink.getName()) .put("remoteApplicationType", i18nResolver.getText(applicationLink.getType().getI18nKey())); return builder; }
protected RendererContextBuilder createContextBuilder(final ApplicationLink applicationLink) { return new RendererContextBuilder() .put("localApplicationName", internalHostApplication.getName()) .put("localApplicationType", i18nResolver.getText(internalHostApplication.getType().getI18nKey())) .put("remoteApplicationName", applicationLink.getName()) .put("remoteApplicationType", i18nResolver.getText(applicationLink.getType().getI18nKey())); }
public static RendererContextBuilder createContextBuilder(final ApplicationLink applicationLink, final I18nResolver i18nResolver, final InternalHostApplication internalHostApplication) { final RendererContextBuilder builder = new RendererContextBuilder() .put("localApplicationName", internalHostApplication.getName()) .put("localApplicationType", i18nResolver.getText(internalHostApplication.getType().getI18nKey())) .put("remoteApplicationName", applicationLink.getName()) .put("remoteApplicationType", i18nResolver.getText(applicationLink.getType().getI18nKey())); return builder; }