List of usage examples for org.apache.wicket Application getMetaData
public final synchronized <T> T getMetaData(final MetaDataKey<T> key)
From source file:ro.fortsoft.wicket.plugin.PluginComponentInjector.java
License:Apache License
public PluginComponentInjector(Application application) { PluginManager pluginManager = application.getMetaData(PluginManagerInitializer.PLUGIN_MANAGER_KEY); factory = new PluginFieldValueFactory(pluginManager); }
From source file:sk.drunkenpanda.leaflet.Leaflet.java
License:Apache License
/** * Returns Leaflet settings of given application. * * @param application application, which setting are retrieved * @return leaflet settings of application * @throws IllegalArgumentException if application is {@code null} * @throws IllegalStateException if Leaflet is not installed in application *//*from ww w. j a v a2 s. c o m*/ public static LeafletSettings getSettings(Application application) { // get settings by MetaKey Args.notNull(application, "application"); LeafletSettings settings = application.getMetaData(LEAFLET_SETTINGS_KEY); if (settings == null) { throw new IllegalStateException( "Leaflets aren't installed in application [" + application.getName() + "]."); } return settings; }