Package eu.miltema.slimweb.common
Class ApplicationConfigurationAdapter
- java.lang.Object
-
- eu.miltema.slimweb.common.ApplicationConfigurationAdapter
-
- All Implemented Interfaces:
ApplicationConfiguration
public abstract class ApplicationConfigurationAdapter extends java.lang.Object implements ApplicationConfiguration
-
-
Constructor Summary
Constructors Constructor Description ApplicationConfigurationAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetFrameForTemplate(java.lang.String templateFile, HttpAccessor htAccessor)java.lang.StringgetLoginView()java.lang.String[]getValidOrigins()Provides a list of valid origins for CSRF attack detection.voidpostprocessComponent(java.lang.Object component, HttpAccessor htAccessor)This postprocessor is invoked for all components immediately after get-, post-, put- or delete-method has finished.voidpreprocessComponent(java.lang.Object component, HttpAccessor htAccessor)This preprocessor is invoked for all components immediately prior get-, post-, put- or delete-method.voidregisterInjectors(java.util.Map<java.lang.Class<?>,ArgumentInjector> mapInjectors)Register injectors for method parameters-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface eu.miltema.slimweb.common.ApplicationConfiguration
getComponentPackages
-
-
-
-
Method Detail
-
registerInjectors
public void registerInjectors(java.util.Map<java.lang.Class<?>,ArgumentInjector> mapInjectors)
Description copied from interface:ApplicationConfigurationRegister injectors for method parameters- Specified by:
registerInjectorsin interfaceApplicationConfiguration- Parameters:
mapInjectors- map of injectors
-
getLoginView
public java.lang.String getLoginView()
- Specified by:
getLoginViewin interfaceApplicationConfiguration- Returns:
- path to view, which requires user login
-
getValidOrigins
public java.lang.String[] getValidOrigins()
Description copied from interface:ApplicationConfigurationProvides a list of valid origins for CSRF attack detection. When null is returned, all origins are valid and CSRF attack is possible- Specified by:
getValidOriginsin interfaceApplicationConfiguration- Returns:
- a list of valid origins, for example ["http://myhost.com", "https://myhost.com"]; these origins are used in CSRF attack detection algorithm
-
getFrameForTemplate
public java.lang.String getFrameForTemplate(java.lang.String templateFile, HttpAccessor htAccessor)- Specified by:
getFrameForTemplatein interfaceApplicationConfiguration- Parameters:
templateFile- template file name, including extension, but excluding folder nameshtAccessor- http request/response details- Returns:
- frame template file name (without folders and .html extension)
-
preprocessComponent
public void preprocessComponent(java.lang.Object component, HttpAccessor htAccessor)Description copied from interface:ApplicationConfigurationThis preprocessor is invoked for all components immediately prior get-, post-, put- or delete-method.- Specified by:
preprocessComponentin interfaceApplicationConfiguration- Parameters:
component- componenthtAccessor- http request/response details
-
postprocessComponent
public void postprocessComponent(java.lang.Object component, HttpAccessor htAccessor)Description copied from interface:ApplicationConfigurationThis postprocessor is invoked for all components immediately after get-, post-, put- or delete-method has finished.- Specified by:
postprocessComponentin interfaceApplicationConfiguration- Parameters:
component- componenthtAccessor- http request/response details
-
-