com.atlassian.jira.entity.remotelink
Interface RemoteEntityLink<E>

All Known Subinterfaces:
RemoteVersionLink
All Known Implementing Classes:
RemoteEntityLinkImpl, RemoteVersionLinkImpl

@ExperimentalApi
public interface RemoteEntityLink<E>

Common abstract class for remote entity links.

Since:
v6.1

Field Summary
static String GLOBAL_ID
          The name of the JSON object field that may be used to suggest the global ID to use when creating a remote entity link.
 
Method Summary
 String getApplicationName()
          Returns the application name for the remote entity link, as extracted from the raw JSON.
 String getApplicationType()
          Returns the application type for the remote entity link, as extracted from the raw JSON.
 E getEntity()
          Returns the local entity to which the remote entity link is associated.
 Long getEntityId()
          Returns the entity ID for the local entity to which the remote entity link is associated.
 String getGlobalId()
          Returns the global ID for the remote entity link.
 String getIconTitle()
          Returns the target object icon title for the remote entity link, as extracted from the raw JSON.
 String getIconUrl()
          Returns the target object icon URL for the remote entity link, as extracted from the raw JSON.
 String getJsonString()
          Returns the raw JSON value stored for this remote entity link.
 String getSummary()
          Returns the target object summary for the remote entity link, as extracted from the raw JSON.
 String getTitle()
          Returns the target object title for the remote entity link, as extracted from the raw JSON.
 String getUrl()
          Returns the target object URL for the remote entity link, as extracted from the raw JSON.
 

Field Detail

GLOBAL_ID

static final String GLOBAL_ID
The name of the JSON object field that may be used to suggest the global ID to use when creating a remote entity link. The services that create remote entity links accept a global ID and the raw JSON value meaningful to the link service. If the global ID is not specified directly but the JSON value is an object containing a text field by this name (""globalId""), that value is used as the global ID. If neither method of supplying the global ID is used, then a random global ID will be generated for the link, instead.

See RemoteVersionLinkService for an example of this.

See Also:
Constant Field Values
Method Detail

getEntity

E getEntity()
Returns the local entity to which the remote entity link is associated. For example, if this is a RemoteVersionLink, then this will return a Version.

Returns:
the local entity to which the remote entity link is associated.

getEntityId

@Nonnull
Long getEntityId()
Returns the entity ID for the local entity to which the remote entity link is associated. For example, if this is a RemoteVersionLink, then this will be a version ID.

Returns:
the entity ID for the local entity to which the remote entity link is associated.

getGlobalId

@Nonnull
String getGlobalId()
Returns the global ID for the remote entity link.

Returns:
the global ID for the remote entity link.

getJsonString

@Nonnull
String getJsonString()
Returns the raw JSON value stored for this remote entity link.

Returns:
the raw JSON value stored for this remote entity link.

getTitle

@Nullable
String getTitle()
Returns the target object title for the remote entity link, as extracted from the raw JSON.

Returns:
the target object title for the remote entity link, or null if it is not defined

getSummary

@Nullable
String getSummary()
Returns the target object summary for the remote entity link, as extracted from the raw JSON.

Returns:
the target object summary for the remote entity link, or null if it is not defined

getUrl

@Nullable
String getUrl()
Returns the target object URL for the remote entity link, as extracted from the raw JSON.

Returns:
the target object URL for the remote entity link, or null if it is not defined

getIconUrl

@Nullable
String getIconUrl()
Returns the target object icon URL for the remote entity link, as extracted from the raw JSON.

Returns:
the target object icon URL for the remote entity link, or null if it is not defined

getIconTitle

@Nullable
String getIconTitle()
Returns the target object icon title for the remote entity link, as extracted from the raw JSON.

Returns:
the target object icon title for the remote entity link, or null if it is not defined

getApplicationName

@Nullable
String getApplicationName()
Returns the application name for the remote entity link, as extracted from the raw JSON.

Returns:
the application name for the remote entity link, or null if it is not defined

getApplicationType

@Nullable
String getApplicationType()
Returns the application type for the remote entity link, as extracted from the raw JSON.

Returns:
the application type for the remote entity link, or null if it is not defined


Copyright © 2002-2014 Atlassian. All Rights Reserved.