public interface ApplicationConfigProvider extends Closeable
Application
, which is the ApplicationInfo
parsed from the
application-info.xml
and all defined PageDefinition
s, Event
s, Action
s,
Datasource
s and also the ApplicationRootConfig
.Modifier and Type | Method and Description |
---|---|
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
Datasource s, 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
Event s |
PageDefinition |
getPage(String id)
Returns the
PageDefinition with the given id, if present. |
Map<String,PageDefinition> |
getPages()
Returns a map of all
PageDefinition s, 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() |
ApplicationConfigProvider cloneConfig(MarshallService marshallService) throws InvalidConfigurationException
ApplicationConfigProvider
, which is necessary because themarshallService
- a MarshallService
to read the configuration files, only needed if appNG is in development-modeInvalidConfigurationException
- if there is some configuration error inside the applicationApplicationRootConfig getApplicationRootConfig()
ApplicationRootConfig
.ApplicationRootConfig
String getDefaultPage()
PageDefinition
with the type 'index
'.PageDefinition getPage(String id)
PageDefinition
with the given id, if present.id
- the id of the PageDefinition
to getPageDefinition
with the given id, or null
if no such PageDefinition
existsMap<String,PageDefinition> getPages()
PageDefinition
s, using the id as the key.PageDefinition
sDatasource getDatasource(String id)
Datasource
with the given id, if present.id
- the id of the Datasource
to getDatasource
with the given id, or null
if no such Datasource
existsMap<String,Datasource> getDataSources()
Datasource
s, using the id as the key.Datasource
sString getResourceNameForPage(String pageId)
Resource
where the PageDefinition
with the given id was defined.pageId
- the id of the PageDefinition
Resource
where the PageDefinition
with the given id was defined, or
null
if there is no such PageDefinition
String getResourceNameForDataSource(String dataSourceId)
Resource
where the Datasource
with the given id was defined.dataSourceId
- the id of the Datasource
Resource
where the Datasource
with the given id was defined, or
null
if there is no such Datasource
String getResourceNameForApplicationRootConfig()
Resource
where the ApplicationRootConfig
was defined.Resource
where the ApplicationRootConfig
was defined.ApplicationInfo getApplicationInfo()
ApplicationInfo
Resources getResources()
void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
IOException
Copyright © 2011–2020 aiticon GmbH. All rights reserved.