public class ApplicationConfigProviderImpl extends Object implements ApplicationConfigProvider
ApplicationConfigProvider-implementation.| Modifier and Type | Field and Description |
|---|---|
protected org.appng.api.support.ApplicationConfigProviderImpl.ActionMap |
actionMap |
protected org.appng.api.support.ApplicationConfigProviderImpl.DataSourceMap |
datasourceMap |
protected List<Object[]> |
descendantDatasources |
protected org.appng.api.support.ApplicationConfigProviderImpl.EventMap |
eventMap |
protected org.appng.api.support.ApplicationConfigProviderImpl.PageMap |
pageMap |
protected Map<String,String> |
resourceMap |
protected ApplicationRootConfig |
rootConfig |
protected ConfigValidator |
validator |
| Constructor and Description |
|---|
ApplicationConfigProviderImpl(MarshallService marshallService,
String applicationName,
Resources applicationResources,
boolean devMode) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
clear() |
ApplicationConfigProvider |
cloneConfig(MarshallService marshallService)
Clones this
ApplicationConfigProvider, which is necessary because the |
void |
close() |
Action |
getAction(String eventId,
String actionId)
|
Map<String,Action> |
getActions(String eventId)
|
ApplicationInfo |
getApplicationInfo()
|
ApplicationRootConfig |
getApplicationRootConfig()
Returns the
ApplicationRootConfig. |
Datasource |
getDatasource(String id)
Returns the
Datasource with the given id, if present. |
Map<String,Datasource> |
getDataSources()
Returns a map of all
Datasources, using the id as the key. |
String |
getDefaultPage()
Returns the id of the default-page, which is the
PageDefinition with the type 'index'. |
Event |
getEvent(String id)
Returns the
Event with the given id, if present. |
Set<String> |
getEventIds()
Returns all ids from all known
Events |
PageDefinition |
getPage(String id)
Returns the
PageDefinition with the given id, if present. |
Map<String,PageDefinition> |
getPages()
Returns a map of all
PageDefinitions, using the id as the key. |
String |
getResourceNameForApplicationRootConfig()
Returns the name of the
Resource where the ApplicationRootConfig was defined. |
String |
getResourceNameForDataSource(String datasourceId)
Returns the name of the
Resource where the Datasource with the given id was defined. |
String |
getResourceNameForEvent(String eventId)
|
String |
getResourceNameForPage(String pageId)
Returns the name of the
Resource where the PageDefinition with the given id was defined. |
Resources |
getResources() |
Set<String> |
getSessionParams() |
void |
setDefaultPage(String defaultPage) |
void |
setSessionParams(Set<String> sessionParams) |
protected org.appng.api.support.ApplicationConfigProviderImpl.ActionMap actionMap
protected org.appng.api.support.ApplicationConfigProviderImpl.DataSourceMap datasourceMap
protected org.appng.api.support.ApplicationConfigProviderImpl.PageMap pageMap
protected org.appng.api.support.ApplicationConfigProviderImpl.EventMap eventMap
protected ConfigValidator validator
protected ApplicationRootConfig rootConfig
public ApplicationConfigProviderImpl(MarshallService marshallService, String applicationName, Resources applicationResources, boolean devMode) throws InvalidConfigurationException
InvalidConfigurationExceptionpublic Map<String,Datasource> getDataSources()
ApplicationConfigProviderDatasources, using the id as the key.getDataSources in interface ApplicationConfigProviderDatasourcesprotected void clear()
public Action getAction(String eventId, String actionId)
ApplicationConfigProviderpublic Map<String,Action> getActions(String eventId)
ApplicationConfigProvidergetActions in interface ApplicationConfigProvidereventId - the id of the Event to get the Actions forActions for the given Event, or null if there is no such eventpublic Datasource getDatasource(String id)
ApplicationConfigProviderDatasource with the given id, if present.getDatasource in interface ApplicationConfigProviderid - the id of the Datasource to getDatasource with the given id, or null if no such Datasource existspublic String getDefaultPage()
ApplicationConfigProviderPageDefinition with the type 'index'.getDefaultPage in interface ApplicationConfigProviderpublic Event getEvent(String id)
ApplicationConfigProviderEvent with the given id, if present.getEvent in interface ApplicationConfigProviderid - the id of the Event to getEvent with the given id, or null if no such Event existspublic Set<String> getEventIds()
ApplicationConfigProviderEventsgetEventIds in interface ApplicationConfigProviderpublic PageDefinition getPage(String id)
ApplicationConfigProviderPageDefinition with the given id, if present.getPage in interface ApplicationConfigProviderid - the id of the PageDefinition to getPageDefinition with the given id, or null if no such PageDefinition existspublic Map<String,PageDefinition> getPages()
ApplicationConfigProviderPageDefinitions, using the id as the key.getPages in interface ApplicationConfigProviderPageDefinitionspublic ApplicationRootConfig getApplicationRootConfig()
ApplicationConfigProviderApplicationRootConfig.getApplicationRootConfig in interface ApplicationConfigProviderApplicationRootConfigpublic void setDefaultPage(String defaultPage)
public String getResourceNameForEvent(String eventId)
ApplicationConfigProvidergetResourceNameForEvent in interface ApplicationConfigProvidereventId - the id of the EventResource where the Event with the given id was defined, or null
if there is no such Eventpublic String getResourceNameForPage(String pageId)
ApplicationConfigProviderResource where the PageDefinition with the given id was defined.getResourceNameForPage in interface ApplicationConfigProviderpageId - the id of the PageDefinitionResource where the PageDefinition with the given id was defined, or
null if there is no such PageDefinitionpublic String getResourceNameForDataSource(String datasourceId)
ApplicationConfigProviderResource where the Datasource with the given id was defined.getResourceNameForDataSource in interface ApplicationConfigProviderdatasourceId - the id of the DatasourceResource where the Datasource with the given id was defined, or
null if there is no such Datasourcepublic String getResourceNameForApplicationRootConfig()
ApplicationConfigProviderResource where the ApplicationRootConfig was defined.getResourceNameForApplicationRootConfig in interface ApplicationConfigProviderResource where the ApplicationRootConfig was defined.public ApplicationConfigProvider cloneConfig(MarshallService marshallService) throws InvalidConfigurationException
ApplicationConfigProviderApplicationConfigProvider, which is necessary because thecloneConfig in interface ApplicationConfigProvidermarshallService - a MarshallService to read the configuration files, only needed if appNG is in
development-modeInvalidConfigurationException - if there is some configuration error inside the applicationpublic ApplicationInfo getApplicationInfo()
ApplicationConfigProvidergetApplicationInfo in interface ApplicationConfigProviderApplicationInfopublic Resources getResources()
getResources in interface ApplicationConfigProviderpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ApplicationConfigProviderIOExceptionCopyright © 2011–2023 aiticon GmbH. All rights reserved.