Tabnine Logo
TypeId.getTypeId
Code IndexAdd Tabnine to your IDE (free)

How to use
getTypeId
method
in
com.atlassian.applinks.spi.application.TypeId

Best Java code snippets using com.atlassian.applinks.spi.application.TypeId.getTypeId (Showing top 20 results out of 315)

origin: com.atlassian.applinks/applinks-plugin

public EntityTypeEntity(final EntityType type) {
  this.typeId = TypeId.getTypeId(type);
}
origin: com.atlassian.applinks/applinks-plugin

/**
 * @param localType the {@link Class} of the {@link EntityType} to resolve an {@link TypeId} for
 * @return the {@link TypeId} of the specified {@link EntityType}
 * @throws IllegalStateException if the supplied class does not have an enabled implementation registered via the
 *                               {@code applinks-entity-link} module descriptor
 */
private TypeId lookUpTypeId(final Class<? extends EntityType> localType) {
  final EntityType type = typeAccessor.getEntityType(localType);
  if (type == null) {
    throw new IllegalStateException("Couldn't load " + localType.getName() + ", type not installed?");
  }
  return TypeId.getTypeId(type);
}
origin: com.atlassian.applinks/applinks-plugin

  public String apply(@Nullable EntityType from) {
    return TypeId.getTypeId(from).get();
  }
}));
origin: com.atlassian.applinks/applinks-plugin

  public String apply(@Nullable final EntityType from) {
    return TypeId.getTypeId(from).get();
  }
});
origin: com.atlassian.applinks/applinks-plugin

  public String apply(@Nullable final EntityType from) {
    return TypeId.getTypeId(from).get();
  }
});
origin: com.atlassian.applinks/applinks-plugin

  public String apply(@Nullable EntityType from) {
    return TypeId.getTypeId(from).get();
  }
}));
origin: com.atlassian.applinks/applinks-plugin

  public boolean apply(@Nullable final EntityType input) {
    return TypeId.getTypeId(applicationLink.getType()).equals(TypeId.getTypeId(typeAccessor.getApplicationType(input.getApplicationType())));
  }
});
origin: com.atlassian.applinks/applinks-plugin

  public boolean apply(@Nullable final EntityType input) {
    return TypeId.getTypeId(internalHostApplication.getType()).equals(TypeId.getTypeId(typeAccessor.getApplicationType(input.getApplicationType())));
  }
});
origin: com.atlassian.applinks/applinks-plugin

public String getApplicationType() {
  return TypeId.getTypeId(internalHostApplication.getType()).get();
}
origin: com.atlassian.applinks/applinks-plugin

public String getApplicationType() {
  return TypeId.getTypeId(internalHostApplication.getType()).get();
}
origin: com.atlassian.applinks/applinks-plugin

  public String apply(final EntityLink from) {
    final Map<String, String> propertyMap = new HashMap<String, String>();
    propertyMap.put(KEY, from.getKey());
    propertyMap.put(NAME, from.getName());
    propertyMap.put(TYPE, getTypeId(from.getType()).get());
    propertyMap.put(TYPE_I18N, from.getType().getI18nKey());
    propertyMap.put(APPLICATION_ID, from.getApplicationLink().getId().get());
    final StringWriter sw = new StringWriter();
    try {
      new JSONObject(propertyMap).write(sw);
    } catch (JSONException e) {
      throw new RuntimeException(e);
    }
    return sw.getBuffer().toString();
  }
}));
origin: com.atlassian.dragonfly/dragonfly-core

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;
}
origin: com.atlassian.applinks/applinks-plugin

private void makePrimaryImpl(final String localKey, final Class<? extends EntityType> localType, final EntityLink newEntity) {
  final String primaryPropertyKey = primaryPropertyKey(getTypeId(newEntity.getType()));
  final Properties primary = new Properties();
  primary.put(KEY, newEntity.getKey());
  primary.put(APPLICATION_ID, newEntity.getApplicationLink().getId().get());
  if (LOG.isDebugEnabled()) {
    String message = String.format("Set primary link for [%s] [%s] as [%s]", localKey, lookUpTypeId(localType),
        primary);
    LOG.debug(message);
  }
  propertyService.getLocalEntityProperties(localKey, lookUpTypeId(localType)).putProperty(primaryPropertyKey, primary);
}
origin: com.atlassian.applinks/applinks-plugin

  public boolean apply(final EntityLink input) {
    if (link.getId().equals(input.getApplicationLink().getId())) {
      // we're going to delete this - check if it is a primary link we're going to need to reassign
      if (!typesForWhichToReassignPrimaries.contains(input.getType().getClass())) {
        final PrimaryRef primary = getPrimaryRef(localEntity.getKey(), getTypeId(localEntity.getType()), getTypeId(input.getType()));
        if (primary.refersTo(input)) {
          typesForWhichToReassignPrimaries.add(input.getType().getClass());
        }
      }
      removedEntityLinks.add(input);
      return false;
    } else {
      //this is not the link you are looking for, move along
      return true;
    }
  }
}));
origin: com.atlassian.applinks/applinks-plugin

  public boolean refersTo(final EntityLink link) {
    return refersTo(link.getKey(), getTypeId(link.getType()), link.getApplicationLink().getId());
  }
}
origin: com.atlassian.applinks/applinks-plugin

private String key(final EntityLink entity) {
  return String.format("%s.%s.%s.%s", ENTITY_PREFIX,
      escape(entity.getApplicationLink().getId().get()),
      escape(getTypeId(entity.getType()).get()),
      escape(entity.getKey())
  );
}
origin: com.atlassian.applinks/applinks-plugin

  public ReferenceEntity apply(final EntityReference from) {
    return new ReferenceEntity(
        from.getKey(),
        from.getName(),
        TypeId.getTypeId(from.getType()),
        IconUriResolver.resolveIconUri(from.getType()),
        from.getType().getIconUrl());
  }
}));
origin: com.atlassian.applinks/applinks-plugin

  public ApplicationOption apply(final ApplicationLink from) {
    boolean isUal = false;
    try {
      isUal = manifestRetriever.getManifest(
          from.getRpcUrl(), from.getType()).getAppLinksVersion() != null;
    } catch (ManifestNotFoundException e) {
    } catch (Exception ex) {
      log.error("Could not retrieve manifest for applink, ignoring applink : {}", from);
      log.warn("Stack trace: ", ex);
      return null;
    }
    return new ApplicationOption(
        from.getId(),
        from.getName(),
        TypeId.getTypeId(from.getType()),
        from.getType().getI18nKey(),
        isUal,
        IconUriResolver.resolveIconUri(from.getType()) == null ? null : IconUriResolver.resolveIconUri(from.getType()).toString());
  }
}
origin: com.atlassian.applinks/applinks-common

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);
}
origin: com.atlassian.applinks/applinks-plugin

public EntityLinkEntity(final EntityLink entity) {
  this(entity.getApplicationLink().getId(), entity.getKey(), TypeId.getTypeId(entity.getType()),
      entity.getName(), entity.getDisplayUrl(), IconUriResolver.resolveIconUri(entity.getType()), entity.getType().getIconUrl(), entity.isPrimary());
}
com.atlassian.applinks.spi.applicationTypeIdgetTypeId

Javadoc

Convenience method for looking up TypeIds from ApplicationTypes. The applinks-application-type descriptor enforces that all registered ApplicationTypes implement the IdentifiableType interface, so the cast in the delegate method is safe.

Popular methods of TypeId

  • get
  • <init>
  • equals
  • toString
  • compareTo

Popular in Java

  • Making http requests using okhttp
  • setRequestProperty (URLConnection)
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • JComboBox (javax.swing)
  • JTextField (javax.swing)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now