java.lang.Object
org.apache.wicket.settings.FrameworkSettings
- All Implemented Interfaces:
IEventDispatcher
Framework settings for retrieving and configuring framework settings.
- Author:
- Jonathan Locke, Chris Turner, Eelco Hillenius, Juergen Donnerstag, Johan Compagner, Igor Vaynberg (ivaynberg), Martijn Dashorst, James Carman
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(IEventDispatcher dispatcher) Registers a new event dispatchervoid
dispatchEvent
(Object sink, IEvent<?> event, Component component) Dispatches event to registered dispatchersGets the Wicket version.final boolean
setDefaultEventDispatcher
(IEventDispatcher defaultEventDispatcher) Allows to set the default events dispatchersetDetachListener
(IDetachListener detachListener) Sets detach listenersetSerializer
(ISerializer serializer) Sets theISerializer
that will be used to convert objects to/from byte arrays
-
Constructor Details
-
FrameworkSettings
Construct.- Parameters:
application
-
-
-
Method Details
-
getVersion
Gets the Wicket version. The Wicket version is in the same format as the version element in the pom.xml file (project descriptor). The version is generated by maven in the build/release cycle and put in the /META-INF/MANIFEST.MF file located in the root folder of the Wicket jar.The version usually follows one of the following formats:
- major.minor[.bug] for stable versions. 1.1, 1.2, 1.2.1 are examples
- major.minor-state for development versions. 1.2-beta2, 1.3-SNAPSHOT are examples
- Returns:
- the Wicket version
-
getDetachListener
- Returns:
- detach listener or
null
if none
-
setDetachListener
Sets detach listener- Parameters:
detachListener
- listener ornull
to remove- Returns:
this
object for chaining
-
add
Registers a new event dispatcher- Parameters:
dispatcher
-IEventDispatcher
- Returns:
this
object for chaining
-
hasAnyEventDispatchers
- Returns:
- Returns
true
if there is at least one event dispatcher
-
dispatchEvent
Dispatches event to registered dispatchers- Specified by:
dispatchEvent
in interfaceIEventDispatcher
- Parameters:
sink
- the sink for the event. Sinks usually implementIEventSink
orIComponentAwareEventSink
. See thecomponent
parameter described below.component
- provides context to the sink. Some sinks are owned by the component, egBehavior
s, and thus it is useful for them to have a reference to their owning component. If this method is notnull
the dispatcher should try to look for an alternative sink method which takes a component reference as an additional parameter, one such implementation isIComponentAwareEventSink
.- See Also:
-
setDefaultEventDispatcher
Allows to set the default events dispatcher- Parameters:
defaultEventDispatcher
- IEventDispatcher- Returns:
this
object for chaining
-
setSerializer
Sets theISerializer
that will be used to convert objects to/from byte arrays- Parameters:
serializer
- theISerializer
to use- Returns:
this
object for chaining
-
getSerializer
- Returns:
- the
ISerializer
that will be used to convert objects to/from byte arrays
-