Search in sources :

Example 21 with Application

use of org.apache.wicket.Application in project wicket-dashboard by decebals.

the class DashboardSettings method get.

/**
 * Retrieves the instance of settings object.
 *
 * @return settings instance
 */
public static DashboardSettings get() {
    Application application = Application.get();
    DashboardSettings settings = application.getMetaData(KEY);
    if (settings == null) {
        synchronized (application) {
            settings = application.getMetaData(KEY);
            if (settings == null) {
                settings = new DashboardSettings();
                application.setMetaData(KEY, settings);
            }
        }
    }
    return application.getMetaData(KEY);
}
Also used : Application(org.apache.wicket.Application)

Aggregations

Application (org.apache.wicket.Application)21 WicketRuntimeException (org.apache.wicket.WicketRuntimeException)5 WebApplication (org.apache.wicket.protocol.http.WebApplication)5 IOException (java.io.IOException)4 RequestCycle (org.apache.wicket.request.cycle.RequestCycle)4 MockApplication (org.apache.wicket.mock.MockApplication)3 MockHttpServletRequest (org.apache.wicket.protocol.http.mock.MockHttpServletRequest)3 FilterChain (javax.servlet.FilterChain)2 ServletException (javax.servlet.ServletException)2 ServletRequest (javax.servlet.ServletRequest)2 ServletResponse (javax.servlet.ServletResponse)2 HttpServletRequest (javax.servlet.http.HttpServletRequest)2 HttpServletResponse (javax.servlet.http.HttpServletResponse)2 HttpSession (javax.servlet.http.HttpSession)2 IApplication (org.apache.openmeetings.IApplication)2 Page (org.apache.wicket.Page)2 WebSocketSettings (org.apache.wicket.protocol.ws.WebSocketSettings)2 IKey (org.apache.wicket.protocol.ws.api.registry.IKey)2 IRequestHandler (org.apache.wicket.request.IRequestHandler)2 WebResponse (org.apache.wicket.request.http.WebResponse)2