public boolean refersTo(final String key, final TypeId type, final ApplicationId applicationId) { return this.key.equals(key) && this.type.equals(type) && this.applicationId.equals(applicationId); }
public Manifest getManifest(final URI url) throws ManifestNotFoundException { try { final Manifest downloadedManifest = downloader.download(url); if (downloadedManifest != null && getApplicationTypeId().equals(downloadedManifest.getTypeId())) { return downloadedManifest; } } catch (ManifestNotFoundException e) { LOG.debug("Failed to obtain an AppLinks manifest from the peer. " + "Treating the peer as a non-AppLinks capable host instead."); } return createManifest(url); }
public boolean checkTargetIsSupportedJira(URI remoteUrl) { final Manifest manifest; try { manifest = manifestRetriever.getManifest(remoteUrl); } catch (ManifestNotFoundException e) { LOG.info("Failed to retrieve manifest from " + remoteUrl, e); return false; } if (!manifest.getTypeId().equals(TypeId.getTypeId(typeAccessor.getApplicationType(JiraApplicationType.class)))) { LOG.info(remoteUrl + " is not Jira"); return false; } // we don't need to test the version String as (lucky for us) JIRA 4.3 was the first version to ship UAL. return true; }
public Manifest getManifest(final URI url) throws ManifestNotFoundException { try { final Manifest downloadedManifest = downloader.download(url); if (downloadedManifest != null && getApplicationTypeId().equals(downloadedManifest.getTypeId())) { return downloadedManifest; } } catch (ManifestNotFoundException e) { LOG.debug("Failed to obtain an AppLinks manifest from the peer. " + "Treating the peer as a non-AppLinks capable host instead."); } return createManifest(url); }
public boolean apply(@Nullable final EntityType input) { return TypeId.getTypeId(applicationLink.getType()).equals(TypeId.getTypeId(typeAccessor.getApplicationType(input.getApplicationType()))); } });
public boolean apply(@Nullable final EntityType input) { return TypeId.getTypeId(internalHostApplication.getType()).equals(TypeId.getTypeId(typeAccessor.getApplicationType(input.getApplicationType()))); } });