public class ApplicationProvider extends SiteApplication implements AccessibleApplication
ApplicationProvider
actually processes the ApplicationRequest
by building and executing
CallableAction
s and CallableDataSource
s.process(ApplicationRequest, MarshallService, Path, PlatformConfig)
,
CallableAction.perform()
,
CallableDataSource.perform(String, boolean, boolean)
,
Serialized FormConstructor and Description |
---|
ApplicationProvider(Site site,
Application application) |
ApplicationProvider(Site site,
Application application,
boolean monitorPerformance) |
Modifier and Type | Method and Description |
---|---|
void |
closeContext() |
boolean |
containsBean(String beanName)
Checks whether a bean with the given name exists for this
Application . |
boolean |
equals(Object o) |
Application |
getApplication() |
ApplicationConfigProvider |
getApplicationConfig() |
ApplicationRequest |
getApplicationRequest(HttpServletRequest servletRequest,
HttpServletResponse servletResponse) |
ApplicationRequest |
getApplicationRequest(HttpServletRequest servletRequest,
HttpServletResponse servletResponse,
boolean createNew) |
List<ApplicationSubject> |
getApplicationSubjects()
Returns the
ApplicationSubject s for this Application |
String |
getAppNGVersion()
Returns the version of appNG the
Application is compatible with. |
<T> T |
getBean(Class<T> clazz)
Returns the single bean of the given type, if any.
|
Object |
getBean(String beanName)
Returns the single bean with the given name, if any.
|
<T> T |
getBean(String name,
Class<T> clazz)
Retrieves the bean of the given name and type from the underlying
ApplicationContext , if any. |
String[] |
getBeanNames(Class<?> clazz)
Returns the names for all beans of the given type.
|
ConfigurableApplicationContext |
getContext() |
DatabaseConnection |
getDatabaseConnection() |
String |
getDescription()
Returns the description.
|
String |
getDisplayName()
Returns the display name.
|
FeatureProvider |
getFeatureProvider()
Returns the
FeatureProvider for this Application . |
Integer |
getId()
Returns the id.
|
List<JarInfo> |
getJarInfos() |
String |
getLongDescription()
Returns the description.
|
String |
getMessage(Locale locale,
String key,
Object... args)
Retrieves a message from the underlying
MessageSource . |
String |
getName()
Returns the name.
|
String |
getPackageVersion()
Returns the version.
|
Set<Permission> |
getPermissions()
Returns the
Permission s for this Application . |
Properties |
getProperties()
Returns the
Properties s for this Application . |
Resources |
getResources()
the
Resources for this Application . |
Set<Resource> |
getResourceSet()
Returns the
Resource s for this Application . |
Set<Role> |
getRoles()
Returns
Role s for this Application . |
String |
getSessionParamKey(Site site)
Returns the key to retrieve the session-parameters for this
Application within the given Site
from an Environment . |
Map<String,String> |
getSessionParams(Site site,
Environment environment)
Retrieves the session-parameters for for this
Application within the given Site from the given
Environment . |
Site |
getSite() |
String |
getTimestamp()
Returns the timestamp the
Application was build. |
Date |
getVersion()
Returns the version.
|
int |
hashCode() |
boolean |
isCoreApplication()
Returns
true if this Application is a core-application, which means it has access to the
platform's root-context and the platform-scoped Environment . |
boolean |
isFileBased()
Returns
true if this Application is filebased, which means it's original Resource s are
stored on disk, false if the Resource s are stored in the database. |
boolean |
isHidden()
Returns
true if this Application is hidden, which means it does not appear in the navigation
menu. |
boolean |
isInstalled()
Checks whether the
Application is installed. |
boolean |
isSnapshot()
Checks whether the
Application has a SNAPSHOT-version |
ApplicationReference |
process(ApplicationRequest applicationRequest,
MarshallService marshallService,
Path pathInfo,
PlatformConfig platformConfig)
|
Action |
processAction(HttpServletResponse servletResponse,
boolean applyPermissionsOnRef,
ApplicationRequest applicationRequest,
String actionId,
String eventId,
MarshallService marshallService) |
Datasource |
processDataSource(HttpServletResponse servletResponse,
boolean applyPermissionsOnRef,
ApplicationRequest applicationRequest,
String dataSourceId,
MarshallService marshallService) |
void |
setApplicationConfig(ApplicationConfigProvider applicationConfig) |
void |
setContext(ConfigurableApplicationContext applicationContext) |
void |
setCoreApplication(boolean isCoreApplication) |
void |
setDatabaseConnection(DatabaseConnection databaseConnection) |
void |
setDescription(String description) |
void |
setFeatureProvider(FeatureProvider featureProvider) |
void |
setFileBased(boolean fileBased) |
void |
setId(Integer id) |
void |
setName(String name) |
protected void |
setParamValues(ApplicationRequest applicationRequest,
Params params) |
void |
setPermissions(Set<Permission> permissions) |
void |
setPlatformScope() |
void |
setProperties(Properties properties) |
void |
setResources(Resources applicationResourceHolder) |
void |
setRoles(Set<Role> roles) |
void |
setVersion(Date version) |
String |
toString() |
getGrantedSites, getSiteApplicationId, isActive, isMarkedForDeletion, isReloadRequired, setActive, setApplication, setGrantedSites, setMarkedForDeletion, setReloadRequired, setSite, setSiteApplicationId
public ApplicationProvider(Site site, Application application, boolean monitorPerformance)
public ApplicationProvider(Site site, Application application)
public ApplicationReference process(ApplicationRequest applicationRequest, MarshallService marshallService, Path pathInfo, PlatformConfig platformConfig)
applicationRequest
- the ApplicationRequest
to processmarshallService
- a MarshallService
pathInfo
- the current Path
platformConfig
- the current PlatformConfig
ApplicationReference
to be used for the Content
of the Platform
public void setApplicationConfig(ApplicationConfigProvider applicationConfig) throws InvalidConfigurationException
InvalidConfigurationException
public Integer getId()
Identifiable
getId
in interface Identifiable<Integer>
public void setId(Integer id)
setId
in interface AccessibleApplication
public void setName(String name)
setName
in interface AccessibleApplication
public String getDescription()
Nameable
getDescription
in interface Nameable
public void setDescription(String description)
setDescription
in interface AccessibleApplication
public String getDisplayName()
Identifier
getDisplayName
in interface Identifier
public String getPackageVersion()
Identifier
getPackageVersion
in interface Identifier
public String getTimestamp()
Identifier
Application
was build.getTimestamp
in interface Identifier
Application
was buildpublic String getLongDescription()
Identifier
getLongDescription
in interface Identifier
public String getAppNGVersion()
Identifier
Application
is compatible with.getAppNGVersion
in interface Identifier
Application
is compatible withpublic boolean isInstalled()
Identifier
Application
is installed.isInstalled
in interface Identifier
true
if the Application
is installed, false
otherwisepublic boolean isSnapshot()
Identifier
Application
has a SNAPSHOT-versionisSnapshot
in interface Identifier
true
if the Application
has a SNAPSHOT-version, false
otherwisepublic boolean isFileBased()
Application
true
if this Application
is filebased, which means it's original Resource
s are
stored on disk, false
if the Resource
s are stored in the database.isFileBased
in interface Application
true
if this Application
is filebased, false
otherwisepublic void setFileBased(boolean fileBased)
setFileBased
in interface AccessibleApplication
public Date getVersion()
Versionable
getVersion
in interface Versionable<Date>
public void setVersion(Date version)
setVersion
in interface AccessibleApplication
public Set<Permission> getPermissions()
Application
Permission
s for this Application
.getPermissions
in interface Application
Permission
spublic void setPermissions(Set<Permission> permissions)
setPermissions
in interface AccessibleApplication
public Set<Role> getRoles()
Application
Role
s for this Application
.getRoles
in interface Application
Role
spublic void setRoles(Set<Role> roles)
setRoles
in interface AccessibleApplication
public Properties getProperties()
Application
Properties
s for this Application
.getProperties
in interface Application
Properties
spublic void setProperties(Properties properties)
setProperties
in interface AccessibleApplication
public void setContext(ConfigurableApplicationContext applicationContext)
setContext
in interface AccessibleApplication
public <T> T getBean(String name, Class<T> clazz)
Application
ApplicationContext
, if any.getBean
in interface Application
name
- the name of the bean to retrieveclazz
- the type of the bean to retrievepublic <T> T getBean(Class<T> clazz)
Application
getBean
in interface Application
clazz
- the type of the beannull
if no such bean exists.public Object getBean(String beanName)
Application
getBean
in interface Application
beanName
- the name of the beannull
if no such bean exists.public String[] getBeanNames(Class<?> clazz)
Application
getBeanNames
in interface Application
clazz
- the type to get the bean names forpublic boolean isCoreApplication()
Application
true
if this Application
is a core-application, which means it has access to the
platform's root-context and the platform-scoped Environment
.isCoreApplication
in interface Application
true
if this Application
is a core-application, false
otherwisepublic void setCoreApplication(boolean isCoreApplication)
setCoreApplication
in interface AccessibleApplication
public String getMessage(Locale locale, String key, Object... args)
Application
MessageSource
.getMessage
in interface Application
locale
- the Locale
for the messagekey
- the message-keyargs
- the arguments for the messageResourceType.DICTIONARY
public void closeContext()
closeContext
in interface AccessibleApplication
public void setResources(Resources applicationResourceHolder)
setResources
in interface AccessibleApplication
public Resources getResources()
Application
Resources
for this Application
.getResources
in interface Application
getResources
in interface AccessibleApplication
Resources
for this Application
public boolean isHidden()
Application
true
if this Application
is hidden, which means it does not appear in the navigation
menu.isHidden
in interface Application
true
if this Application
is hiddenpublic boolean containsBean(String beanName)
Application
Application
.containsBean
in interface Application
beanName
- the name of the bean to check existencetrue
if such a bean exists, false
otherwisepublic ApplicationConfigProvider getApplicationConfig()
public String getSessionParamKey(Site site)
Application
Application
within the given Site
from an Environment
.getSessionParamKey
in interface Application
site
- the Site
to retrieve the key forApplication.getSessionParams(Site, Environment)
public Map<String,String> getSessionParams(Site site, Environment environment)
Application
Application
within the given Site
from the given
Environment
.getSessionParams
in interface Application
site
- the Site
to retrieve the session parameters forenvironment
- the current Environment
Application
within the given Site
Application.getSessionParamKey(Site)
public FeatureProvider getFeatureProvider()
Application
FeatureProvider
for this Application
.getFeatureProvider
in interface Application
FeatureProvider
public void setFeatureProvider(FeatureProvider featureProvider)
setFeatureProvider
in interface AccessibleApplication
public List<ApplicationSubject> getApplicationSubjects()
Application
ApplicationSubject
s for this Application
getApplicationSubjects
in interface Application
ApplicationSubject
spublic ApplicationRequest getApplicationRequest(HttpServletRequest servletRequest, HttpServletResponse servletResponse)
public ApplicationRequest getApplicationRequest(HttpServletRequest servletRequest, HttpServletResponse servletResponse, boolean createNew)
public Action processAction(HttpServletResponse servletResponse, boolean applyPermissionsOnRef, ApplicationRequest applicationRequest, String actionId, String eventId, MarshallService marshallService) throws InvalidConfigurationException, ProcessingException
protected void setParamValues(ApplicationRequest applicationRequest, Params params)
public Datasource processDataSource(HttpServletResponse servletResponse, boolean applyPermissionsOnRef, ApplicationRequest applicationRequest, String dataSourceId, MarshallService marshallService) throws InvalidConfigurationException, ProcessingException
public ConfigurableApplicationContext getContext()
getContext
in interface AccessibleApplication
public Application getApplication()
getApplication
in class SiteApplication
public Site getSite()
getSite
in class SiteApplication
public Set<Resource> getResourceSet()
Application
Resource
s for this Application
.getResourceSet
in interface Application
Resource
spublic void setDatabaseConnection(DatabaseConnection databaseConnection)
setDatabaseConnection
in class SiteApplication
public DatabaseConnection getDatabaseConnection()
getDatabaseConnection
in class SiteApplication
public void setPlatformScope()
Copyright © 2011–2017 aiticon GmbH. All rights reserved.