Class FrameworkSettings

java.lang.Object
org.apache.wicket.settings.FrameworkSettings
All Implemented Interfaces:
IEventDispatcher

public class FrameworkSettings extends Object implements 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 Details

  • Method Details

    • getVersion

      public String 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 or null to remove
      Returns:
      this object for chaining
    • add

      public FrameworkSettings add(IEventDispatcher dispatcher)
      Registers a new event dispatcher
      Parameters:
      dispatcher - IEventDispatcher
      Returns:
      this object for chaining
    • hasAnyEventDispatchers

      public final boolean hasAnyEventDispatchers()
      Returns:
      Returns true if there is at least one event dispatcher
    • dispatchEvent

      public void dispatchEvent(Object sink, IEvent<?> event, Component component)
      Dispatches event to registered dispatchers
      Specified by:
      dispatchEvent in interface IEventDispatcher
      Parameters:
      sink - the sink for the event. Sinks usually implement IEventSink or IComponentAwareEventSink. See the component parameter described below.
      component - provides context to the sink. Some sinks are owned by the component, eg Behaviors, and thus it is useful for them to have a reference to their owning component. If this method is not null the dispatcher should try to look for an alternative sink method which takes a component reference as an additional parameter, one such implementation is IComponentAwareEventSink.
      See Also:
    • setDefaultEventDispatcher

      Allows to set the default events dispatcher
      Parameters:
      defaultEventDispatcher - IEventDispatcher
      Returns:
      this object for chaining
    • setSerializer

      Sets the ISerializer that will be used to convert objects to/from byte arrays
      Parameters:
      serializer - the ISerializer to use
      Returns:
      this object for chaining
    • getSerializer

      Returns:
      the ISerializer that will be used to convert objects to/from byte arrays