public static CdiConfiguration get(Application application) { return application.getMetaData(CDI_CONFIGURATION_KEY); } }
/** * Checks whether Webjars support is already installed * * @param application the wicket application * @return {@code true} if Webjars is already installed, otherwise {@code false} */ public static boolean isInstalled(Application application) { return application.getMetaData(WEBJARS_SETTINGS_METADATA_KEY) != null; }
/** * returns the {@link IWebjarsSettings} which are assigned to given application * * @param app The current application * @return assigned {@link IWebjarsSettings} */ public static IWebjarsSettings settings(final Application app) { return app.getMetaData(WEBJARS_SETTINGS_METADATA_KEY); }
public static CdiConfiguration get(Application application) { return application.getMetaData(CDI_CONFIGURATION_KEY); } }
/** * @param application * @return {@code true} if there is an installed EventBus to the given application */ public static boolean isInstalled(Application application) { return application.getMetaData(EVENT_BUS_KEY) != null; }
/** * returns the {@link IBootstrapSettings} which are assigned to given application * * @param app The current application * @return assigned {@link IBootstrapSettings} */ public static IBootstrapSettings getSettings(final Application app) { return app.getMetaData(BOOTSTRAP_SETTINGS_METADATA_KEY); }
public static List<IDebugBarContributor> getContributors(final Application application) { List<IDebugBarContributor> list = application.getMetaData(CONTRIBS_META_KEY); return list == null ? new ArrayList<IDebugBarContributor>() : list; }
private static List<IDebugBarContributor> getContributors(Application application) { List<IDebugBarContributor> list = application.getMetaData(CONTRIBS_META_KEY); return list == null ? new ArrayList<IDebugBarContributor>() : list; }
public static List<IDebugBarContributor> getContributors(final Application application) { List<IDebugBarContributor> list = application.getMetaData(CONTRIBS_META_KEY); return list == null ? new ArrayList<IDebugBarContributor>() : list; }
/** * @return Injector associated with the application instance */ public static Injector get() { return Application.get().getMetaData(KEY); }
@Override public ApplicationContext getSpringContext() { if (context == null) { context = Application.get().getMetaData(CONTEXT_KEY); } return context; }
/** * returns the {@link IBootstrapSettings} which are assigned to given application * * @param app The current application * @return assigned {@link IBootstrapSettings} * @throws java.lang.IllegalArgumentException if given application is null */ public static IBootstrapSettings getSettings(final Application app) { return Args.notNull(app, "app").getMetaData(BOOTSTRAP_SETTINGS_METADATA_KEY); }
/** * @return instance registered with the current threads wicket application */ protected static SpringReferenceSupporter get() { return Application.get().getMetaData(LOCATOR_KEY); }
private Injector getInjector() { final GuiceInjectorHolder holder = Application.get().getMetaData( GuiceInjectorHolder.INJECTOR_KEY); return holder.getInjector(); }
@Programmatic @Override public <T> T lookup(final Class<T> beanType, final Annotation qualifier) { final Application application = Application.get(); final GuiceInjectorHolder injectorHolder = application.getMetaData(GuiceInjectorHolder.INJECTOR_KEY); final Injector injector = injectorHolder.getInjector(); return injector.getInstance(Key.get(beanType, qualifier)); } }
public static RepeaterUtil get() { Application app = Application.get(); RepeaterUtil util = app.getMetaData(REPEATER_UTIL_KEY); if (util != null) { return util; } util = new RepeaterUtil(app); //this registers too return util; }
public JamonProvider(MonitorSpecification specification) { this.specification = specification; jamonRepository = Application.get().getMetaData(MonitoringRepositoryKey.KEY); setSort("label", SortOrder.ASCENDING); }
private static void touch(final Application application, String id) { id = getPageId(application, id); ConcurrentMap<String, Time> eventsTimeById; synchronized (application) { eventsTimeById = application.getMetaData(EVENTS_KEY); if (eventsTimeById == null) { eventsTimeById = new ConcurrentHashMap<String, Time>(); application.setMetaData(EVENTS_KEY, eventsTimeById); } } eventsTimeById.put(id, Time.now()); }
private Dashboard getDashboard() { DashboardContext dashboardContext = Application.get().getMetaData(DashboardContextInitializer.DASHBOARD_CONTEXT_KEY); Dashboard dashboard = dashboardContext.getDashboardPersister().load(); return dashboard; }
synchronized static ViolationMessageRenderer getViolationMessageRenderer() { final Application app = Application.get(); ViolationMessageRenderer renderer = app.getMetaData(violationMessageRendererKey); if (renderer == null) { renderer = new ViolationMessageRenderer.Default(); setViolationMessageRenderer(renderer); } return renderer; }