public interface MutatingApplicationLinkService extends ApplicationLinkService
ApplicationLinks.| Modifier and Type | Method and Description |
|---|---|
MutableApplicationLink |
addApplicationLink(ApplicationId id,
ApplicationType type,
ApplicationLinkDetails details)
Register an outgoing
ApplicationLink |
void |
changeApplicationId(ApplicationId oldId,
ApplicationId newId)
Changes the value of an application link's ID.
|
void |
configureAuthenticationForApplicationLink(ApplicationLink applicationLink,
AuthenticationScenario authenticationScenario,
String username,
String password)
Configures authentication on an application link
|
ApplicationLink |
createApplicationLink(ApplicationType type,
ApplicationLinkDetails linkDetails)
Creates an application link from this application to a remote application.
|
void |
createReciprocalLink(URI remoteRpcUrl,
URI customLocalRpcUrl,
String username,
String password)
Deprecated.
will be removed in a future version, should only be used by test code
|
URI |
createSelfLinkFor(ApplicationId id)
Returns the URI of the application link resource exposed to a remote application.
|
void |
deleteApplicationLink(ApplicationLink link)
Deletes an outgoing
ApplicationLink |
void |
deleteReciprocatedApplicationLink(ApplicationLink link)
Delete the outgoing and incoming
ApplicationLinks to and from a linked application. |
MutableApplicationLink |
getApplicationLink(ApplicationId id) |
boolean |
isAdminUserInRemoteApplication(URI url,
String username,
String password)
Determines whether a set of credentials belong to an administrator of a remote application.
|
boolean |
isNameInUse(String name,
ApplicationId id)
Checks whether an application link already exists with this name
|
void |
makePrimary(ApplicationId id)
Make the specified
ApplicationLink the primary link of its ApplicationType. |
void |
setSystem(ApplicationId id,
boolean isSystem)
Make the
ApplicationLink specified by ApplicationId a system link. |
getApplicationLinks, getApplicationLinks, getPrimaryApplicationLinkMutableApplicationLink addApplicationLink(ApplicationId id, ApplicationType type, ApplicationLinkDetails details)
ApplicationLinkid - the ApplicationId of the application to create a link totype - the ApplicationType of the link (use the TypeAccessor to access registered ApplicationTypes)details - an ApplicationLinkDetails object initialised with the ApplicationLink's details. Note that
another name may be used if an application link with this name already exists.ApplicationLinkvoid deleteReciprocatedApplicationLink(ApplicationLink link) throws ReciprocalActionException, CredentialsRequiredException
ApplicationLinks to and from a linked application. If the (incoming)
link deletion in the remote application fails, the local (outgoing) link will not be deleted. Use
deleteApplicationLink(ApplicationLink) to delete just the outgoing ApplicationLink if such
behaviour is desired.link - the ApplicationLink to deleteReciprocalActionException - if there was an issue deleting the link from the remote applicationCredentialsRequiredException - if a request to delete the remote application link could not be created as
the current user has not provided credentials for the remote application. See
ApplicationLinkRequestFactory.createRequest(com.atlassian.sal.api.net.Request.MethodType, java.lang.String) for more details.void deleteApplicationLink(ApplicationLink link)
ApplicationLinklink - the ApplicationLink to deleteMutableApplicationLink getApplicationLink(ApplicationId id) throws TypeNotInstalledException
getApplicationLink in interface ApplicationLinkServiceid - the ApplicationId of a stored ApplicationLinkMutableApplicationLink object, specified by the id, or null if it does not existTypeNotInstalledException - if the specified ApplicationLink's ApplicationType is
not currently installed.void makePrimary(ApplicationId id) throws TypeNotInstalledException
ApplicationLink the primary link of its ApplicationType. Note that exactly
one primary link of each type is allowed, so this method will remove the primary flag from the current primary
link of the link's type.id - the ApplicationId of a stored ApplicationLinkTypeNotInstalledException - if the specified ApplicationLink's ApplicationType is
not currently installed.void setSystem(ApplicationId id, boolean isSystem) throws TypeNotInstalledException
ApplicationLink specified by ApplicationId a system link.
A system link is invisible to non-sysadmin users which is controlled in the UI.id - the ApplicationId of a stored ApplicationLinkTypeNotInstalledException - if the specified ApplicationLink's ApplicationType is
not currently installed.void changeApplicationId(ApplicationId oldId, ApplicationId newId) throws TypeNotInstalledException
IllegalArgumentException - if oldId does not exist.TypeNotInstalledExceptionApplicationLink createApplicationLink(ApplicationType type, ApplicationLinkDetails linkDetails) throws ManifestNotFoundException
ApplicationId for you (depending on the
ApplicationType's ManifestRetriever implementation.type - The type of the remote applicationlinkDetails - The details of the link to createManifestNotFoundException - for manifest not found@Deprecated void createReciprocalLink(URI remoteRpcUrl, URI customLocalRpcUrl, String username, String password) throws ReciprocalActionException
remoteRpcUrl - The base URI of the remote application, for RPC purposescustomLocalRpcUrl - The base URI of the local application, for display purposes, or null to use the configured base URLusername - The username of an administrator of the remote systempassword - The password of the administrator on the remote systemNotAdministratorException - if the supplied credentials are not those of an administrator on the remote systemLinkCreationResponseException - if the link creation response from the remote system was invalidAuthenticationResponseException - if the authentication response from the remote system was invalidRemoteErrorListException - if the remote system reported one or more errorsReciprocalActionExceptionboolean isAdminUserInRemoteApplication(URI url, String username, String password) throws com.atlassian.sal.api.net.ResponseException
url - The base URI of the remote applicationusername - A username to checkpassword - A password to checktrue if the supplied credentials belong to administator of the remote application. false otherwise.com.atlassian.sal.api.net.ResponseException - if the response from the remote application was invalidvoid configureAuthenticationForApplicationLink(ApplicationLink applicationLink, AuthenticationScenario authenticationScenario, String username, String password) throws AuthenticationConfigurationException
applicationLink - The application link to configureauthenticationScenario - holder for details that are used to determine the most appropriate
AuthenticationProvider, which will be configured by this method (e.g. if
AuthenticationScenario.isCommonUserBase() and AuthenticationScenario.isTrusted() are both true,
2LOi will be configured).username - The username of an administrator on the remote applicationpassword - The password of the administrator on the remote applicationAuthenticationConfigurationException - if authentication could not be configuredURI createSelfLinkFor(ApplicationId id)
id - The ID of the remote applicationboolean isNameInUse(String name, ApplicationId id)
name - Name of the application linkid - Applink to be excluded from the result. If null, it means no link will be excluded.Copyright © 2018 Atlassian. All rights reserved.