public boolean apply(final EntityLink input) { if (applicationLink.getId().equals(input.getApplicationLink().getId())) { return true; } else { return false; } } }));
private static ApplicationLinkRequest createRequest(final ApplicationLink applicationLink, final String bodyXml) throws CredentialsRequiredException { final ApplicationLinkRequestFactory requestFactory = applicationLink.createAuthenticatedRequestFactory(); final ApplicationLinkRequest request = requestFactory.createRequest(Request.MethodType.POST, XMLRPC_URL); request.setRequestBody(bodyXml, MediaType.APPLICATION_XML); return request; }
/** * @return the globally unique, immutable ID of the server at the other * end of this link. */ public ApplicationId getApplicationId() { return entityLink.getApplicationLink().getId(); }
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 Collection<RemoteProject> getRemoteProjects(final ApplicationLink applicationLink) throws CredentialsRequiredException, ResponseException { ApplicationLinkRequestFactory requestFactory = applicationLink.createAuthenticatedRequestFactory(); ApplicationLinkRequest req = requestFactory.createRequest(Request.MethodType.GET, "/rest/api/2/project"); return parseProjects(req.execute(), applicationLink); }
@Override public Iterable<ApplicationLink> getApplicationLinks(Class<? extends ApplicationType> type) { return applicationLinkService.getApplicationLinks(type); }
/** * @return the type of the application e.g. "fecru" */ public ApplicationType getApplicationType() { return entityLink.getApplicationLink().getType(); }
/** * @return the globally unique, immutable ID of the server at the other * end of this link. */ public ApplicationId getApplicationId() { return applicationLink.getId(); }
@Override public ApplicationLink getApplicationLink(ApplicationId id) throws TypeNotInstalledException { return applicationLinkService.getApplicationLink(id); }
/** * @return the type of the application e.g. "fecru" */ public ApplicationType getApplicationType() { return applicationLink.getType(); }
/** * @return the remote project-level entity key (e.g. JRA, JIRAEXT) */ public String getEntityKey() { return entityLink.getKey(); }
@Override public ApplicationLink getPrimaryApplicationLink(Class<? extends ApplicationType> type) { return applicationLinkService.getPrimaryApplicationLink(type); }
@Override public Iterable<EntityLink> getEntityLinks(Object entity, Class<? extends EntityType> type) { return entityLinkService.getEntityLinks(entity, type); }
@Override public EntityLink getPrimaryEntityLink(Object entity, Class<? extends EntityType> type) { return entityLinkService.getPrimaryEntityLink(entity, type); }
private ApplicationLink getJiraAppLink(final String appId) { for (final ApplicationLink appLink : applicationLinkService.getApplicationLinks(JiraApplicationType.class)) { if (appLink.getId().get().equals(appId)) { return appLink; } } return null; }
@Override public boolean apply(@Nullable EntityLink entityLink) { return entityLink != null && entityLink.getApplicationLink().getId().equals(applicationId); } });
@Override public Iterable<ApplicationLink> getApplicationLinks() { return applicationLinkService.getApplicationLinks(); }
@Override public Iterable<EntityLink> getEntityLinks(Object entity) { return entityLinkService.getEntityLinks(entity); }