Package com.atlassian.applinks.spi.util
Interface TypeAccessor
public interface TypeAccessor
Provides access to singleton instances of
EntityType and ApplicationType and registered
AuthenticationProvider classes.- Since:
- 3.0
-
Method Summary
Modifier and TypeMethodDescription<T extends ApplicationType>
TgetApplicationType(Class<T> typeClass) Class<? extends AuthenticationProvider>getAuthenticationProviderClass(String className) Iterable<? extends ApplicationType>Iterable<? extends EntityType>Iterable<? extends EntityType>getEnabledEntityTypesForApplicationType(ApplicationType applicationType) <T extends EntityType>
TgetEntityType(Class<T> typeClass) loadApplicationType(TypeId typeId) Load application type using its unique identifier represented bytypeId.loadEntityType(TypeId typeId)
-
Method Details
-
getEntityType
- Type Parameters:
T- the type to the typeClass parameter- Parameters:
typeClass- the interface or superclass (extendingEntityTypeof the type to retrieve. Generally this will be a class from a sub-package ofcom.atlassian.applinks.api.application- Returns:
- an instance of the specified
EntityType, or null if an implementation of the specifiedEntityTypeis not registered via the plugin system.
-
loadEntityType
- Parameters:
typeId- the id of the EntityType to retrieve.- Returns:
- a specific EntityType with a given ID. Null if no entity with given typeId
-
getApplicationType
- Type Parameters:
T- the type to the typeClass parameter- Parameters:
typeClass- the interface or superclass (extendingApplicationTypeof the type to retrieve. Generally this will be a class fromcom.atlassian.applinks.api.application- Returns:
- an instance of the specified
ApplicationType, or null if an implementation of the specifiedApplicationTypeis not registered via the plugin system.
-
loadApplicationType
Load application type using its unique identifier represented bytypeId.- Parameters:
typeId- identifier of the application type to load- Returns:
- application type instance, or
nullif no such application type exists
-
getAuthenticationProviderClass
- Parameters:
className- the full class name of a registeredAuthenticationProvider(must be equal to the result of a call toClass.getName()).- Returns:
- the
Classof the specifiedAuthenticationProvider
-
getEnabledEntityTypes
Iterable<? extends EntityType> getEnabledEntityTypes()- Returns:
- a collection of all enabled
EntityTypeinstances registered via the plugin system
-
getEnabledEntityTypesForApplicationType
Iterable<? extends EntityType> getEnabledEntityTypesForApplicationType(ApplicationType applicationType) - Returns:
- the collection of
entity typesthat are supported by the givenApplicationType.
-
getEnabledApplicationTypes
Iterable<? extends ApplicationType> getEnabledApplicationTypes()- Returns:
- a collection of all enabled
ApplicationTypeinstances registered via the plugin system
-