Package com.atlassian.connect.spring
Class AtlassianHost
java.lang.Object
com.atlassian.connect.spring.AtlassianHost
An Atlassian host in which the add-on is or has been installed. Hosts are stored in
AtlassianHostRepository
.
During processing of a request from an Atlassian host, the details of the host and of the user at the browser can
be obtained from the AtlassianHostUser
.
- Since:
- 1.0.0
- See Also:
-
Constructor Summary
ConstructorDescriptionCreates a new empty Atlassian host (used by persistence mechanism). -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the authentication type to use when communicating with the host products.The URL prefix for the Atlassian product instance.The identifying key for the Atlassian product instance that the add-on was installed into.Returns the tenant identifier for use with OAuth 2.0 client credentials flow.The key of the Atlassian user that first installed the add-on on the host, if any.The time at which the add-on was first installed on the host.The host product description.Return the Display Url ie the Custom Domain Url for Jira/Confluence If Custom Domain doesn't exist this equals to base URLReturn the Display Url of Servicedesk Help Center ie the Custom Domain Url for JSD If Custom Domain doesn't exist this equals to base URLEntitlement ID is the add-on license identifier.Entitlement Number is the add-on license identifier.Installation ID is the Forge identifier of an installation to workspace.The key of the Atlassian user that last modified the add-on installation, if any.The time at which the add-on installation was last modified.Returns the client identifier for use with OAuth 2.0 authentication.The identifier of the category of Atlassian product.The Support Entitlement Number (SEN) is the add-on license identifier.The shared secret issued by the Atlassian product instance on installation of the add-on.int
hashCode()
boolean
Returns true if the add-on is currently installed on the host.void
setAddonInstalled
(boolean addonInstalled) Used by persistence mechanism.void
setAuthentication
(AddonAuthenticationType authentication) Used by persistence mechanism.void
setBaseUrl
(String baseUrl) Used by persistence mechanism.void
setClientKey
(String clientKey) Used by persistence mechanism.void
setCloudId
(String cloudId) Used by persistence mechanism.void
setCreatedBy
(String createdBy) Used by persistence mechanism.void
setCreatedDate
(Calendar createdDate) Used by persistence mechanism.void
setDescription
(String description) Used by persistence mechanism.void
setDisplayUrl
(String displayUrl) Used by persistence mechanism.void
setDisplayUrlServicedeskHelpCenter
(String displayUrlServicedeskHelpCenter) Used by persistence mechanism.void
setEntitlementId
(String entitlementId) Used by persistence mechanism.void
setEntitlementNumber
(String entitlementNumber) Used by persistence mechanism.void
setInstallationId
(String installationId) Used by persistence mechanism.void
setLastModifiedBy
(String lastModifiedBy) Used by persistence mechanism.void
setLastModifiedDate
(Calendar lastModifiedDate) Used by persistence mechanism.void
setOauthClientId
(String oauthClientId) Used by persistence mechanism.void
setProductType
(String productType) Used by persistence mechanism.void
setServiceEntitlementNumber
(String serviceEntitlementNumber) Used by persistence mechanism.void
setSharedSecret
(String sharedSecret) Used by persistence mechanism.toString()
-
Constructor Details
-
AtlassianHost
public AtlassianHost()Creates a new empty Atlassian host (used by persistence mechanism).
-
-
Method Details
-
getClientKey
The identifying key for the Atlassian product instance that the add-on was installed into. This will never change for a given instance, and is unique across all Atlassian product tenants. This value should be used to key tenant details in your add-on.- Returns:
- the client key of the host
-
setClientKey
Used by persistence mechanism.- Parameters:
clientKey
- the client key of the host
-
getOauthClientId
Returns the client identifier for use with OAuth 2.0 authentication.- Returns:
- the OAuth 2.0 client ID
-
setOauthClientId
Used by persistence mechanism.- Parameters:
oauthClientId
- the OAuth 2.0 client ID
-
getAuthentication
Returns the authentication type to use when communicating with the host products.- Returns:
- AddonAuthenticationType as authentication scheme
-
setAuthentication
Used by persistence mechanism.- Parameters:
authentication
- the authentication type to use when communicating with the host products.
-
getCloudId
Returns the tenant identifier for use with OAuth 2.0 client credentials flow.- Returns:
- cloudId
-
setCloudId
Used by persistence mechanism.- Parameters:
cloudId
- the tenant identifier for use with OAuth 2.0 client credentials flow.
-
getBaseUrl
The URL prefix for the Atlassian product instance. All of its REST endpoints begin with this URL.- Returns:
- the base URL of the host
-
setBaseUrl
Used by persistence mechanism.- Parameters:
baseUrl
- the base URL of the host
-
getDisplayUrl
Return the Display Url ie the Custom Domain Url for Jira/Confluence If Custom Domain doesn't exist this equals to base URL- Returns:
- the display URL of the host
-
setDisplayUrl
Used by persistence mechanism.- Parameters:
displayUrl
- the display URL of the host
-
getDisplayUrlServicedeskHelpCenter
Return the Display Url of Servicedesk Help Center ie the Custom Domain Url for JSD If Custom Domain doesn't exist this equals to base URL- Returns:
- the display URL of SD Helper Center of the host
-
setDisplayUrlServicedeskHelpCenter
Used by persistence mechanism.- Parameters:
displayUrlServicedeskHelpCenter
- the display servicedesk help center URL of the host
-
getProductType
The identifier of the category of Atlassian product.- Returns:
- the host product type, e.g.
jira
orconfluence
-
setProductType
Used by persistence mechanism.- Parameters:
productType
- the host product type, e.g.jira
orconfluence
-
getDescription
The host product description. This string is customisable by an instance administrator.- Returns:
- the description of the host
-
setDescription
Used by persistence mechanism.- Parameters:
description
- the description of the host
-
getServiceEntitlementNumber
The Support Entitlement Number (SEN) is the add-on license identifier. This attribute will only be included during installation of a paid add-on.- Returns:
- the SEN
-
setServiceEntitlementNumber
Used by persistence mechanism.- Parameters:
serviceEntitlementNumber
- the SEN
-
getEntitlementId
Entitlement ID is the add-on license identifier. This attribute will only be included during installation of a paid add-on.- Returns:
- the Entitlement ID
-
setEntitlementId
Used by persistence mechanism.- Parameters:
entitlementId
- the Entitlement ID
-
getEntitlementNumber
Entitlement Number is the add-on license identifier. This attribute will only be included during installation of a paid add-on.- Returns:
- the Entitlement Number
-
setEntitlementNumber
Used by persistence mechanism.- Parameters:
entitlementNumber
- the Entitlement Number
-
getInstallationId
Installation ID is the Forge identifier of an installation to workspace.- Returns:
- the Forge installation ID string (in ARI format, e.g. ari:cloud:ecosystem::installation/c3658f0f-8380-41e5-bb1e-68903f8efdca) if the installed version is registered on Forge, otherwise null
-
setInstallationId
Used by persistence mechanism.- Parameters:
installationId
- the Installation ID
-
isAddonInstalled
public boolean isAddonInstalled()Returns true if the add-on is currently installed on the host. Upon uninstallation, the value of this flag will be set tofalse
.- Returns:
- true if the add-on is installed
-
setAddonInstalled
public void setAddonInstalled(boolean addonInstalled) Used by persistence mechanism.- Parameters:
addonInstalled
- true if the add-on is installed
-
getCreatedDate
The time at which the add-on was first installed on the host.- Returns:
- the creation time
-
setCreatedDate
Used by persistence mechanism.- Parameters:
createdDate
- the creation time
-
getLastModifiedDate
The time at which the add-on installation was last modified.- Returns:
- the last modification time
-
setLastModifiedDate
Used by persistence mechanism.- Parameters:
lastModifiedDate
- the last modification time
-
getCreatedBy
The key of the Atlassian user that first installed the add-on on the host, if any.- Returns:
- the user key of the creator
-
setCreatedBy
Used by persistence mechanism.- Parameters:
createdBy
- the user key of the creator
-
getLastModifiedBy
The key of the Atlassian user that last modified the add-on installation, if any.- Returns:
- the user key of the last modifier
-
setLastModifiedBy
Used by persistence mechanism.- Parameters:
lastModifiedBy
- the user key of the last modifier
-
equals
-
hashCode
public int hashCode() -
toString
-