com.atlassian.applinks.api
Interface EntityType

All Known Subinterfaces:
BambooProjectEntityType, ConfluenceSpaceEntityType, FishEyeCrucibleProjectEntityType, FishEyeRepositoryEntityType, GenericEntityType, JiraProjectEntityType, RefAppCharlieEntityType, StashProjectEntityType

public interface EntityType

Represents the type of an EntityLink. See the com.atlassian.applinks.api.application package for a list of EntityTypes bundled with the Unified Application Links plugin. Additional types can be added via the extension APIs in the applinks-spi module.

Since:
3.0

Method Summary
 Class<? extends ApplicationType> getApplicationType()
           
 URI getDisplayUrl(ApplicationLink link, String entityKey)
           Given an ApplicationLink and the key of an entity on that peer, this method returns that entity's "display URL".
 String getI18nKey()
           
 URI getIconUrl()
           
 String getPluralizedI18nKey()
           
 String getShortenedI18nKey()
           
 

Method Detail

getApplicationType

Class<? extends ApplicationType> getApplicationType()
Returns:
the ApplicationType that houses this type of entity.

getI18nKey

String getI18nKey()
Returns:
the key of an internationalized display name of this type e.g. "JIRA Project". You can resolve this key using the I18nResolver component provided by the SAL plugin.
See Also:
getPluralizedI18nKey(), getShortenedI18nKey()

getPluralizedI18nKey

String getPluralizedI18nKey()
Returns:
the pluralized version of getI18nKey() for this type name e.g. "JIRA Projects".
See Also:
getI18nKey()

getShortenedI18nKey

String getShortenedI18nKey()
Returns:
the shortened version of getI18nKey() for this type name e.g. "Project".
See Also:
getI18nKey()

getIconUrl

URI getIconUrl()
Returns:
the icon url for this type, or null if an icon is not available.
Since:
3.1

getDisplayUrl

URI getDisplayUrl(ApplicationLink link,
                  String entityKey)

Given an ApplicationLink and the key of an entity on that peer, this method returns that entity's "display URL". This would typically be the address where a user's browser is sent to when it follows the entity link.

Note that the caller does not guarantee that the specified entity key actually exists.

The implementation of this method is stringly recommended not to contact the peer either for validation of the supplied entity key, or help creating the display URL, as this method can be called multiple times during a page render.

Parameters:
link - the link MUST be of the same type as getApplicationType() or the result is unspecified.
entityKey - the key of an enitity on the remote system.
Returns:
the (remote) url for the specified entity key, or null when such URL is not available.
Since:
3.1


Copyright © 2015 Atlassian. All rights reserved.