org.wicketstuff.security.swarm
Class SwarmWebApplication

java.lang.Object
  extended by org.apache.wicket.Application
      extended by org.apache.wicket.protocol.http.WebApplication
          extended by org.wicketstuff.security.WaspWebApplication
              extended by org.wicketstuff.security.swarm.SwarmWebApplication
All Implemented Interfaces:
org.apache.wicket.event.IEventSink, org.apache.wicket.session.ISessionStore.UnboundListener, org.wicketstuff.security.WaspApplication

public abstract class SwarmWebApplication
extends org.wicketstuff.security.WaspWebApplication

A default webapp. It sets up the strategy and action factories and triggers the hive setup. but you must remember to call super in the init or do your own factory setups.

Author:
marrink

Field Summary
 
Fields inherited from class org.apache.wicket.protocol.http.WebApplication
META_INF_RESOURCES
 
Fields inherited from class org.apache.wicket.Application
CONFIGURATION
 
Constructor Summary
SwarmWebApplication()
           
 
Method Summary
 org.wicketstuff.security.actions.WaspActionFactory getActionFactory()
           
protected abstract  Object getHiveKey()
          Returns the key to specify the hive.
 org.wicketstuff.security.strategies.StrategyFactory getStrategyFactory()
           
protected  void init()
          triggers the setup of the factories and the hive.
protected  void setActionFactory(org.wicketstuff.security.actions.WaspActionFactory factory)
          Allows the ActionFactory field to be set once.
protected  void setStrategyFactory(org.wicketstuff.security.strategies.StrategyFactory factory)
          Allows the StrategyFactory field to be set once.
protected  void setupActionFactory()
           
protected abstract  void setUpHive()
          Set up a Hive for this Application.
protected  void setupStrategyFactory()
           
 
Methods inherited from class org.wicketstuff.security.WaspWebApplication
newSession, onDestroy
 
Methods inherited from class org.apache.wicket.protocol.http.WebApplication
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
 
Methods inherited from class org.apache.wicket.Application
configure, createRequestCycle, decorateHeaderResponse, exists, fetchCreateAndSetSession, get, getApplicationKeys, getApplicationListeners, getApplicationSettings, getBehaviorInstantiationListeners, getComponentInitializationListeners, getComponentInstantiationListeners, getComponentOnAfterRenderListeners, getComponentOnConfigureListeners, getComponentPostOnBeforeRenderListeners, getComponentPreOnBeforeRenderListeners, getConverterLocator, getDebugSettings, getExceptionMapperProvider, getExceptionSettings, getFrameworkSettings, getHeaderContributorListenerCollection, getHomePage, getInitializers, getJavaScriptLibrarySettings, getMapperContext, getMarkupIdGenerator, 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, setMarkupIdGenerator, setMarkupSettings, setMetaData, setName, setPageManagerProvider, setPageRendererProvider, setPageSettings, setRequestCycleProvider, setRequestCycleSettings, setRequestLoggerSettings, setResourceSettings, setRootRequestMapper, setSecuritySettings, setSessionStoreProvider, setStoreSettings, usesDeploymentConfig, usesDevelopmentConfig, validateInit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.wicketstuff.security.WaspApplication
getLoginPage
 

Constructor Detail

SwarmWebApplication

public SwarmWebApplication()
Method Detail

setupActionFactory

protected void setupActionFactory()
Specified by:
setupActionFactory in class org.wicketstuff.security.WaspWebApplication
See Also:
WaspWebApplication.setupActionFactory()

setActionFactory

protected final void setActionFactory(org.wicketstuff.security.actions.WaspActionFactory factory)
Allows the ActionFactory field to be set once.

Parameters:
factory - the actionfactory
Throws:
IllegalStateException - if the factory is set more than once.

setupStrategyFactory

protected void setupStrategyFactory()
Specified by:
setupStrategyFactory in class org.wicketstuff.security.WaspWebApplication
See Also:
WaspWebApplication.setupStrategyFactory()

setStrategyFactory

protected final void setStrategyFactory(org.wicketstuff.security.strategies.StrategyFactory factory)
Allows the StrategyFactory field to be set once.

Parameters:
factory - the strategyfactory
Throws:
IllegalStateException - if the factory is set more than once.

init

protected void init()
triggers the setup of the factories and the hive. Please remember to call super.init when you override this method.

Overrides:
init in class org.wicketstuff.security.WaspWebApplication
See Also:
WaspWebApplication.init()

setUpHive

protected abstract void setUpHive()
Set up a Hive for this Application. For Example
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()


getActionFactory

public org.wicketstuff.security.actions.WaspActionFactory getActionFactory()
See Also:
WaspApplication.getActionFactory()

getStrategyFactory

public org.wicketstuff.security.strategies.StrategyFactory getStrategyFactory()
See Also:
WaspApplication.getStrategyFactory()

getHiveKey

protected abstract Object getHiveKey()
Returns the key to specify the hive.

Returns:
the key


Copyright © 2006–2018 Apache Software Foundation. All rights reserved.