com.atlassian.applinks.host.spi.InternalHostApplication |
Known Indirect Subclasses
|
Class Overview
Injectable component interface that is implemented by the host application
and contains the application specific logic to determine the application's
capabilities.
This component is injected into each applinks-core module that requires
knowledge of the host application (such as the manifest publisher).
Custom (non-Atlassian) host applications must publish a public component
that implements this interface.
TODO: compute and use a user db hash? See https://studio.atlassian.com/browse/APL-259
Public Methods
public
abstract
boolean
canManageEntityLinksFor
(EntityReference entityReference)
Parameters
entityReference
| an EntityReference representing an entity contained in the local application
instance. |
Returns
true
if the current user has permission to link or unlink the specified EntityReference
to other entities, false
otherwise. Typically this method will return true if the current user is a
global administrator, or a 'project administrator' for the specified entity.
public
abstract
boolean
doesEntityExist
(String key, Class<? extends EntityType> type)
Returns
- true, if the specified entity exists, false otherwise. Note, the implementation must perform a
permission check and return true if, and only if, the specified entity exists and is visible to the
context user (who may be anonymous). For a variant on this method without permission checking, use
doesEntityExistNoPermissionCheck(String, Class)
.
public
abstract
URI
getDocumentationBaseUrl
()
Returns
- an absolute
URI
used as the base for constructing links to help pages. e.g.
http://developer.atlassian.com/static//fisheye/docs-023
or http://confluence.atlassian.com/display/APPLINKS
.
The returned URI
should not have a trailing slash.
Returns
- an
Iterable
containing an EntityReference
for every entity in the local instance visible
to the currently logged in user. Note, the implementation must perform a permission check and
return only entities visible the context user (who may be anonymous).
public
abstract
String
getName
()
Returns
- the name of this application instance, e.g. "My JIRA Server". If this application type doesn't support
customising the name of the instance, implementations should delegate to
InstanceNameGenerator
to
generate a name from the application's base URL.
public
abstract
Iterable<Class<? extends AuthenticationProvider>>
getSupportedOutboundAuthenticationTypes
()
Returns
- an
Iterable
of AuthenticationProvider
classes enumerating the outbound
authentication methods supported by this application (used to authenticate requests made by this application
instance to remote applications).
Returns
- the
ApplicationType
for this application instance. Implementations should delegate to the
TypeAccessor
to resolve an instance of the desired type.
public
abstract
boolean
hasPublicSignup
()
Returns
true
if the host application allows public signup,
false
otherwise.
Returns
- an
EntityReference
initialised with the key and type of the supplied domain object. This method
need not perform any permission checking. Implementations should delegate to the TypeAccessor
to
resolve an instance of the specified EntityType
.
public
abstract
EntityReference
toEntityReference
(Object domainObject)
Parameters
domainObject
| an entity domain object from the application's API (e.g. com.atlassian.jira.project.Project,
com.atlassian.confluence.spaces.Space). Implementations are free to choose which objects supported by this class,
but the complete list should be maintained on the EntityLinkService javadoc. |
Returns
- an
EntityReference
initialised with the key and type of the supplied domain object. This method
need not perform any permission checking. Implementations should delegate to the TypeAccessor
to
resolve an instance of the desired EntityType
.