public interface MutatingEntityLinkService extends EntityLinkService
| Modifier and Type | Method and Description |
|---|---|
EntityLink |
addEntityLink(String localKey,
Class<? extends EntityType> localType,
EntityLink entityLink)
Create an
EntityLink from an entity in the local application to an entity in the remote application. |
EntityLink |
addReciprocatedEntityLink(String localKey,
Class<? extends EntityType> localType,
EntityLink entityLink)
Create an
EntityLink from an entity in the local application to an entity in the remote application, and
a reciprocal link from the entity in the remote application back to the local entity. |
boolean |
deleteEntityLink(String localKey,
Class<? extends EntityType> localType,
EntityLink entityLink)
Delete an
EntityLink from an entity in the local application to an entity in the remote application. |
void |
deleteEntityLinksFor(ApplicationLink link)
Delete all
EntityLinks targeting entities in the application instance specified by the supplied
ApplicationLink |
boolean |
deleteReciprocatedEntityLink(String localKey,
Class<? extends EntityType> localType,
EntityLink entityLink)
Delete an
EntityLink from an entity in the local application to an entity in the remote application after
first deleting the reciprocal link from the entity in the remote application back to the local entity. |
EntityLink |
getEntityLink(String localKey,
Class<? extends EntityType> localType,
String remoteKey,
Class<? extends EntityType> remoteType,
ApplicationId applicationId)
Retrieve an existing
EntityLink that links the specified local entity to the specified remote entity, or
return null if no link matching linking the specified entities exists. |
EntityLinkBuilderFactory |
getEntityLinkBuilderFactory() |
Iterable<EntityLink> |
getEntityLinksForApplicationLink(ApplicationLink applicationLink)
Retrieves all configured entity links for a configured application link.
|
Iterable<EntityLink> |
getEntityLinksForKey(String localKey,
Class<? extends EntityType> localType)
Retrieves all
EntityLinks from a local entity. |
Iterable<EntityLink> |
getEntityLinksForKey(String localKey,
Class<? extends EntityType> localType,
Class<? extends EntityType> type)
Retrieves all
EntityLinks from a local entity, filtered by the target entity's EntityType. |
EntityLink |
getPrimaryEntityLinkForKey(String localKey,
Class<? extends EntityType> localType,
Class<? extends EntityType> type) |
EntityLink |
makePrimary(String localKey,
Class<? extends EntityType> localType,
EntityLink entityLink)
Make the specified
EntityLink the primary link of its EntityType for the specified local
entity |
getEntityLinks, getEntityLinks, getPrimaryEntityLinkEntityLink addEntityLink(String localKey, Class<? extends EntityType> localType, EntityLink entityLink)
EntityLink from an entity in the local application to an entity in the remote application.localKey - the key of a local entity to create a link from (JIRA project, Confluence space, etc.),
for example "JRA", "CONF".localType - the Class of the local entity EntityType to create a link fromentityLink - an EntityLink object initialised with the details of the target entity in the remote
application to link to. Use EntityLinkBuilderFactory to create the EntityLink object.EntityLink objectgetEntityLinkBuilderFactory(),
addReciprocatedEntityLink(String, Class, EntityLink)EntityLink addReciprocatedEntityLink(String localKey, Class<? extends EntityType> localType, EntityLink entityLink) throws ReciprocalActionException, CredentialsRequiredException
EntityLink from an entity in the local application to an entity in the remote application, and
a reciprocal link from the entity in the remote application back to the local entity. Note that the local
outgoing entity link will not be created if the link back from the remote application can not be established for
any reason.localKey - the key of a local entity to create a link from (JIRA project, Confluence space, etc.),
for example "JRA", "CONF".localType - the Class of the local entity EntityType to create a link fromentityLink - an EntityLink object initialised with the details of the target entity in the remote
application to link to. Use EntityLinkBuilderFactory to create the EntityLink object.EntityLink objectCredentialsRequiredException - if the currently logged in user does not have credentials stored for the
authenticator configured for the remote applicationReciprocalActionException - if the reciprocal link could not be created back from the remote applicationgetEntityLinkBuilderFactory(),
addEntityLink(String, Class, EntityLink)boolean deleteEntityLink(String localKey, Class<? extends EntityType> localType, EntityLink entityLink)
EntityLink from an entity in the local application to an entity in the remote application.localKey - the key of a local entity to that is the source of the link to be deleted,
for example "JRA", "CONF".localType - the Class of the local entity EntityType that is the source of the link to be
deletedentityLink - an EntityLink representing the entity in the remote application that is the target of
the link.deleteReciprocatedEntityLink(String, Class, EntityLink)boolean deleteReciprocatedEntityLink(String localKey, Class<? extends EntityType> localType, EntityLink entityLink) throws ReciprocalActionException, CredentialsRequiredException
EntityLink from an entity in the local application to an entity in the remote application after
first deleting the reciprocal link from the entity in the remote application back to the local entity. Note that
the local outgoing entity link will not be deleted if the link back from the remote application could not be
deleted for any reason.localKey - the key of a local entity to that is the source of the link to be deleted, for example "JRA",
"CONF".localType - the Class of the local entity EntityType that is the source of the link to be
deletedentityLink - an EntityLink representing the entity in the remote application that is the target of
the link.CredentialsRequiredException - if the currently logged in user does not have credentials stored for the
authenticator configured for the remote applicationReciprocalActionException - if the reciprocal link could not be deleted from the remote applicationdeleteEntityLink(String, Class, EntityLink)void deleteEntityLinksFor(ApplicationLink link)
EntityLinks targeting entities in the application instance specified by the supplied
ApplicationLinklink - an established ApplicationLinkEntityLink makePrimary(String localKey, Class<? extends EntityType> localType, EntityLink entityLink)
EntityLink the primary link of its EntityType for the specified local
entitylocalKey - the key of a local entity to that is the source of the link to be deleted, for example "JRA",
"CONF".localType - the Class of the local entity EntityType that is the source of the link to be
deletedentityLink - an EntityLink representing the entity in the remote application that is the target of
the link.EntityLink, with its primary status updatedEntityLinkService.getPrimaryEntityLink(Object, Class)EntityLink getEntityLink(String localKey, Class<? extends EntityType> localType, String remoteKey, Class<? extends EntityType> remoteType, ApplicationId applicationId)
EntityLink that links the specified local entity to the specified remote entity, or
return null if no link matching linking the specified entities exists.localKey - the key of a local entity to that is the source of the link to be retrieved, for example "JRA",
"CONF".localType - the Class of the local entity EntityType that is the source of the link to be
retrievedremoteKey - the key of the remote entity to that is the target of the link to be retrieved, for example "JRA",
"CONF".remoteType - the Class of the remote entity EntityType that is the target of the link to be
retrievedapplicationId - the ApplicationId of the application containing the entity that is the target of
the link to be retrievedEntityLink if it exists, or null otherwise.Iterable<EntityLink> getEntityLinksForApplicationLink(ApplicationLink applicationLink) throws TypeNotInstalledException
applicationLink - an established ApplicationLink, cannot be null.EntityLinks for this application.TypeNotInstalledException - if the application type is not installedIterable<EntityLink> getEntityLinksForKey(String localKey, Class<? extends EntityType> localType, Class<? extends EntityType> type)
EntityLinks from a local entity, filtered by the target entity's EntityType.localKey - the key of a local entity to that is the source of the links to be retrieved, for example "JRA",
"CONF".localType - the Class of the local entity EntityType that is the source of the links to betype - the Class of the remote entities EntityType to retrieve established
EntityLinks forIterable containing EntityLinks associated with the specified entity, of the
specified typeIterable<EntityLink> getEntityLinksForKey(String localKey, Class<? extends EntityType> localType)
EntityLinks from a local entity.localKey - the key of a local entity to that is the source of the links to be retrieved, for example "JRA",
"CONF".localType - the Class of the local entity EntityType that is the source of the links to beIterable containing EntityLinks associated with the specified entityEntityLink getPrimaryEntityLinkForKey(String localKey, Class<? extends EntityType> localType, Class<? extends EntityType> type)
localKey - the key of an entity local to this application, for which to retrieve a link for (e.g. JRA, CONF)localType - the Class of the local entity EntityType that is the source of the linktype - the type of EntityLink to retrieve (e.g. fisheye-repository)EntityLinkBuilderFactory getEntityLinkBuilderFactory()
EntityLinkBuilderFactory for creating EntityLinksCopyright © 2018 Atlassian. All rights reserved.