Class DefaultApplicationContext
- java.lang.Object
-
- org.gcube.smartgears.context.application.DefaultApplicationContext
-
- All Implemented Interfaces:
ApplicationContext
public class DefaultApplicationContext extends Object implements ApplicationContext
DefaultApplicationContextimplementation.- Author:
- Fabio Simeoni
-
-
Constructor Summary
Constructors Constructor Description DefaultApplicationContext(ApplicationContext context)Creates an instance by copying the configuration of another.DefaultApplicationContext(ContainerContext container, jakarta.servlet.ServletContext sctx, ApplicationConfiguration configuration, org.gcube.common.events.Hub hub, ApplicationLifecycle lifecycle, Properties properties)Crates an intance with mandatory parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<SecretFactory<? extends org.gcube.common.security.secrets.Secret>>allowedSecretFactories()returns the list of factory secrets ordered by priorityjakarta.servlet.ServletContextapplication()Returns the servlet context of the application.PathappSpecificConfigurationFolder()Returns the Path to the configuration Folder for the current apporg.gcube.common.security.factories.AuthorizationProviderauthorizationProvider()Returns the authorization provider.ApplicationConfigurationconfiguration()Returns the configuration of the application.ContainerContextcontainer()Returns the management context of the container.org.gcube.common.events.Hubevents()Returns the event hub of the applicationStringid()ApplicationLifecyclelifecycle()Returns the lifecycle of the application.Stringname()Returns the name of the application.PersistenceWriterpersistence()Returns the persistence manager of the application.Propertiesproperties()Returns the properties of the application
-
-
-
Constructor Detail
-
DefaultApplicationContext
public DefaultApplicationContext(ContainerContext container, jakarta.servlet.ServletContext sctx, ApplicationConfiguration configuration, org.gcube.common.events.Hub hub, ApplicationLifecycle lifecycle, Properties properties)
Crates an intance with mandatory parameters- Parameters:
container- the container contextsctx- the servlet contextconfiguration- the configurationhub- the event hublifecycle- the lifecycleproperties- the properties
-
DefaultApplicationContext
public DefaultApplicationContext(ApplicationContext context)
Creates an instance by copying the configuration of another.- Parameters:
context- the other instance
-
-
Method Detail
-
application
public jakarta.servlet.ServletContext application()
Description copied from interface:ApplicationContextReturns the servlet context of the application.- Specified by:
applicationin interfaceApplicationContext- Returns:
- the context
-
container
public ContainerContext container()
Description copied from interface:ApplicationContextReturns the management context of the container.- Specified by:
containerin interfaceApplicationContext- Returns:
- the context
-
name
public String name()
Description copied from interface:ApplicationContextReturns the name of the application.- Specified by:
namein interfaceApplicationContext- Returns:
- the name
-
configuration
public ApplicationConfiguration configuration()
Description copied from interface:ApplicationContextReturns the configuration of the application.- Specified by:
configurationin interfaceApplicationContext- Returns:
- the configuration
-
lifecycle
public ApplicationLifecycle lifecycle()
Description copied from interface:ApplicationContextReturns the lifecycle of the application.- Specified by:
lifecyclein interfaceApplicationContext- Returns:
- the lifecycle
-
events
public org.gcube.common.events.Hub events()
Description copied from interface:ApplicationContextReturns the event hub of the application- Specified by:
eventsin interfaceApplicationContext- Returns:
- the hub
-
persistence
public PersistenceWriter persistence()
Description copied from interface:ApplicationContextReturns the persistence manager of the application.- Specified by:
persistencein interfaceApplicationContext- Returns:
- the manager
-
properties
public Properties properties()
Description copied from interface:ApplicationContextReturns the properties of the application- Specified by:
propertiesin interfaceApplicationContext- Returns:
- the properties
-
id
public String id()
- Specified by:
idin interfaceApplicationContext
-
authorizationProvider
public org.gcube.common.security.factories.AuthorizationProvider authorizationProvider()
Returns the authorization provider.- Specified by:
authorizationProviderin interfaceApplicationContext- Returns:
- the AuhtorizationProvider
-
appSpecificConfigurationFolder
public Path appSpecificConfigurationFolder()
Description copied from interface:ApplicationContextReturns the Path to the configuration Folder for the current app- Specified by:
appSpecificConfigurationFolderin interfaceApplicationContext- Returns:
- the Path to the folder , null if the Path is not present
-
allowedSecretFactories
public List<SecretFactory<? extends org.gcube.common.security.secrets.Secret>> allowedSecretFactories()
Description copied from interface:ApplicationContextreturns the list of factory secrets ordered by priority- Specified by:
allowedSecretFactoriesin interfaceApplicationContext
-
-