public interface EntityLinkService
Provides methods for retrieving entities from linked applications that are associated with local entities (e.g. JIRA projects, Confluence spaces, etc.).
The Object typed first parameters of this interface's methods are Strings and/or domain objects that
represent project entities from the API of each Atlassian host application. This is specific to each application
that the Unified Application Links plugin is deployed to.
RepositoryHandle repHandle = repositoryManager.getRepository("my-source");
Iterable<EntityLink> entityLinkService.getEntityLinks(java.lang.Object, java.lang.Class<? extends com.atlassian.applinks.api.EntityType>)(repHandle);
Is equivalent to:
RepsoitoryData repData = repositoryService.getRepository("my-source");
Iterable<EntityLink> entityLinkService.getEntityLinks(java.lang.Object, java.lang.Class<? extends com.atlassian.applinks.api.EntityType>)(repData);
Both will return an Iterable of EntityLinks that are linked from the "my-source" FishEye repository.
Project project = projectManager.getProjectByKey("CR-MYSRC");
Iterable<EntityLink> entityLinkService.getEntityLinks(java.lang.Object, java.lang.Class<? extends com.atlassian.applinks.api.EntityType>)(project);
will return an Iterable of EntityLinks that are linked from the CR-MYSRC FishEye/Crucible project.
Iterable<EntityLink> entityLinkService.getEntityLinks(java.lang.Object, java.lang.Class<? extends com.atlassian.applinks.api.EntityType>)("JRA");
will return an Iterable of EntityLinks that are linked from the JRA JIRA project.| Modifier and Type | Method and Description |
|---|---|
Iterable<EntityLink> |
getEntityLinks(Object entity)
Returns the
EntityLinks that are visible to the context user. |
Iterable<EntityLink> |
getEntityLinks(Object entity,
Class<? extends EntityType> type)
Returns the
EntityLinks that are visible to the context user. |
EntityLink |
getPrimaryEntityLink(Object entity,
Class<? extends EntityType> type)
There are exactly zero or one primary
EntityLinks of each type configured for each local entity. |
Iterable<EntityLink> getEntityLinks(Object entity, Class<? extends EntityType> type)
EntityLinks that are visible to the context user.entity - an application specific entity domain object, see class javadoc for more detailstype - the type of EntityLinks to retrieve (e.g. fisheye-repository)Iterable containing EntityLinks associated with the specified entity, of the specified
type and are visible to the context userIterable<EntityLink> getEntityLinks(Object entity)
EntityLinks that are visible to the context user.entity - an application specific entity domain object, see class javadoc for more detailsIterable containing EntityLinks associated with the specified entity and are visible
to the context userEntityLink getPrimaryEntityLink(Object entity, Class<? extends EntityType> type)
EntityLinks of each type configured for each local entity.
If any links of the specified type exist, exactly one of them will be primary.entity - an application specific entity domain object, see class javadoc for more detailstype - the type of primary EntityLink to retrieve (e.g. fisheye-repository)Copyright © 2020 Atlassian. All rights reserved.