public abstract class SwarmWebApplication extends WaspWebApplication
Constructor and Description |
---|
SwarmWebApplication() |
Modifier and Type | Method and Description |
---|---|
WaspActionFactory |
getActionFactory()
Returns factory for action mapping.
|
protected abstract Object |
getHiveKey()
Returns the key to specify the hive.
|
StrategyFactory |
getStrategyFactory()
Returns the factory that will be used to create strategies for each session.
|
protected void |
init()
triggers the setup of the factories and the hive.
|
protected void |
setActionFactory(WaspActionFactory factory)
Allows the
ActionFactory field to be set once. |
protected void |
setStrategyFactory(StrategyFactory factory)
Allows the
StrategyFactory field to be set once. |
protected void |
setupActionFactory()
Called by the
WaspWebApplication.init() . |
protected abstract void |
setUpHive()
Set up a Hive for this Application.
|
protected void |
setupStrategyFactory()
Called by the
WaspWebApplication.init() . |
newSession, onDestroy
addResourceReplacement, addResourceReplacement, get, getAjaxRequestTargetListeners, getAjaxRequestTargetProvider, getAndRemoveBufferedResponse, getApplicationKey, getConfigurationType, getFilterFactoryManager, getInitParameter, getMimeType, getServletContext, getSessionAttributePrefix, getUpdateAutoLabelsOnAjaxRequests, getWicketFilter, hasBufferedResponse, hasFilterFactoryManager, internalDestroy, internalInit, logEventTarget, logResponseTarget, mount, mountPackage, mountPage, mountResource, newAjaxRequestTarget, newWebRequest, newWebResponse, outputDevelopmentModeWarning, renderXmlDecl, sessionUnbound, setAjaxRequestTargetProvider, setConfigurationType, setServletContext, setWicketFilter, storeBufferedResponse, unmount
configure, createRequestCycle, decorateHeaderResponse, exists, fetchCreateAndSetSession, get, getApplicationKeys, getApplicationListeners, getApplicationSettings, getBehaviorInstantiationListeners, getComponentInitializationListeners, getComponentInstantiationListeners, getComponentOnAfterRenderListeners, getComponentOnConfigureListeners, getComponentPostOnBeforeRenderListeners, getComponentPreOnBeforeRenderListeners, getConverterLocator, getDebugSettings, getExceptionMapperProvider, getExceptionSettings, getFrameworkSettings, getHeaderContributorListeners, getHomePage, getInitializers, getJavaScriptLibrarySettings, getMapperContext, getMarkupSettings, getMetaData, getName, getPageFactory, getPageManagerContext, getPageManagerProvider, getPageRendererProvider, getPageSettings, getRequestCycleListeners, getRequestCycleProvider, getRequestCycleSettings, getRequestLogger, getRequestLoggerSettings, getResourceBundles, getResourceReferenceRegistry, getResourceSettings, getRootRequestMapper, getRootRequestMapperAsCompound, getSecuritySettings, getSessionListeners, getSessionStore, getSessionStoreProvider, getSharedResources, getStoreSettings, initApplication, initializeComponents, newConverterLocator, newMapperContext, newPageFactory, newRequestLogger, newResourceBundles, newResourceReferenceRegistry, newSharedResources, onEvent, setApplicationSettings, setDebugSettings, setExceptionSettings, setFrameworkSettings, setHeaderResponseDecorator, setJavaScriptLibrarySettings, setMarkupSettings, setMetaData, setName, setPageManagerProvider, setPageRendererProvider, setPageSettings, setRequestCycleProvider, setRequestCycleSettings, setRequestLoggerSettings, setResourceSettings, setRootRequestMapper, setSecuritySettings, setSessionStoreProvider, setStoreSettings, usesDeploymentConfig, usesDevelopmentConfig, validateInit
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLoginPage
protected void setupActionFactory()
WaspWebApplication
WaspWebApplication.init()
. use this to create and initialize your
factory. The factory created here should be returned when calling
WaspApplication.getActionFactory()
.setupActionFactory
in class WaspWebApplication
WaspWebApplication.setupActionFactory()
protected final void setActionFactory(WaspActionFactory factory)
ActionFactory
field to be set once.factory
- the actionfactoryIllegalStateException
- if the factory is set more than once.protected void setupStrategyFactory()
WaspWebApplication
WaspWebApplication.init()
. use this to create and initialize your
factory. The factory created here should be returned when calling
WaspApplication.getStrategyFactory()
.setupStrategyFactory
in class WaspWebApplication
WaspWebApplication.setupStrategyFactory()
protected final void setStrategyFactory(StrategyFactory factory)
StrategyFactory
field to be set once.factory
- the strategyfactoryIllegalStateException
- if the factory is set more than once.protected void init()
init
in class WaspWebApplication
WaspWebApplication.init()
protected abstract void setUpHive()
PolicyFileHiveFactory factory = new PolicyFileHiveFactory();
factory.addPolicyFile("/policy.hive");
HiveMind.registerHive(getHiveKey(), factory);
Note that you must setup the actionfactory before you can setup the hive. Note that
the hive is not automatically unregistered since there is a chance you want to share it with
another webapp. If you want to unregister the hive please do so in the WaspWebApplication.onDestroy()
public WaspActionFactory getActionFactory()
WaspApplication
WaspApplication.getActionFactory()
public StrategyFactory getStrategyFactory()
WaspApplication
WaspApplication.getStrategyFactory()
protected abstract Object getHiveKey()
Copyright © 2015. All rights reserved.