/** * * @return true, of app is in Development mode */ public final boolean usesDevelopmentConfig() { return RuntimeConfigurationType.DEVELOPMENT.equals(getConfigurationType()); }
/** * * @return true, of app is in Deployment mode */ public final boolean usesDeploymentConfig() { return RuntimeConfigurationType.DEPLOYMENT.equals(getConfigurationType()); } }
private static String getJQueryJavascript() { return Application.get().getConfigurationType().equals( Application.DEVELOPMENT) ? JQUERY_DEVELOPMENT : JQUERY_DEPLOYMENT; } }
/** * * @return true, of app is in Deployment mode */ public final boolean usesDeploymentConfig() { return RuntimeConfigurationType.DEPLOYMENT.equals(getConfigurationType()); } }
/** * * @return true, of app is in Development mode */ public final boolean usesDevelopmentConfig() { return RuntimeConfigurationType.DEVELOPMENT.equals(getConfigurationType()); }
/** * @see org.apache.wicket.jmx.ApplicationMBean#getConfigurationType() */ @Override public String getConfigurationType() { return application.getConfigurationType().name(); }
public static boolean isProduction() { return Application.DEPLOYMENT.equals(Application.get() .getConfigurationType()); } }
public static boolean isProduction() { return RuntimeConfigurationType.DEPLOYMENT == Application.get().getConfigurationType(); } }
public S2WebSessionStoreProvider(Application application) { this.defaultProvider = application.getSessionStoreProvider(); this.configurationType = application.getConfigurationType(); }
private void writeObject(ObjectOutputStream output) throws IOException { if ((flags & ATTACHED) != 0) { // TODO: walk the stack to identify owner log.warn("Undetached DetachMonitor"); if (Application.DEPLOYMENT.equals(Application.get().getConfigurationType())) { detach(); } } output.defaultWriteObject(); } }
private void writeObject(ObjectOutputStream output) throws IOException { if ((flags & ATTACHED) != 0) { // TODO: walk the stack to identify owner log.warn("Undetached DetachMonitor"); if (RuntimeConfigurationType.DEPLOYMENT.equals(Application.get().getConfigurationType())) { detach(); } } output.defaultWriteObject(); } }
public static UrlResourceReference getCKEditorJsReference() { if (Application.get().getConfigurationType().equals(RuntimeConfigurationType.DEVELOPMENT) && existsOnClassPath(CKEditorConstants.CKEDITOR_SRC_JS)) { log.info("Using non-optimized CKEditor sources."); return CKEditorConstants.CKEDITOR_SRC_JS; } log.info("Using optimized CKEditor sources"); return CKEditorConstants.CKEDITOR_OPTIMIZED_JS; } }
CacheEntry(Application application) { cacheEnabled = application.getConfigurationType().equals(RuntimeConfigurationType.DEPLOYMENT); dependencyResolver = new YuiDependencyResolver(cacheEnabled); }
private void writeObject(ObjectOutputStream output) throws IOException { if (stopping && Application.exists()) { if (Application.get().getConfigurationType().equals(RuntimeConfigurationType.DEVELOPMENT)) { throw new WicketRuntimeException("Stopped plugin is still being referenced: " + (plugin != null ? plugin.getClass().getName() : "unknown")); } } output.defaultWriteObject(); }
private void writeObject(ObjectOutputStream output) throws IOException { if (isAttached()) { log.warn("Undetached JcrItemModel " + getPath()); if (Application.DEPLOYMENT.equals(Application.get().getConfigurationType())) { detach(); } } output.defaultWriteObject(); }
private void writeObject(ObjectOutputStream output) throws IOException { if (isAttached()) { log.warn("Undetached JcrItemModel "+getPath()); T object = this.getObject(); if (object != null) { TraceMonitor.trace(object); } if (RuntimeConfigurationType.DEPLOYMENT.equals(Application.get().getConfigurationType())) { detach(); } } output.defaultWriteObject(); }
@Override protected void onConfigure() { super.onConfigure(); // Do not cache pages in development mode - allows us to make changes to the HMTL without // having to reload the application if (RuntimeConfigurationType.DEVELOPMENT.equals(getApplication().getConfigurationType())) { getApplication().getMarkupSettings().getMarkupFactory().getMarkupCache().clear(); getApplication().getResourceSettings().setCachingStrategy(NoOpResourceCachingStrategy.INSTANCE); } }
@Override protected void onConfigure() { super.onConfigure(); // Do not cache pages in development mode - allows us to make changes to the HMTL without // having to reload the application if (RuntimeConfigurationType.DEVELOPMENT.equals(getApplication().getConfigurationType())) { getApplication().getMarkupSettings().getMarkupFactory().getMarkupCache().clear(); getApplication().getResourceSettings() .setCachingStrategy(NoOpResourceCachingStrategy.INSTANCE); } }
@Override protected void onConfigure() { super.onConfigure(); // Do not cache pages in development mode - allows us to make changes to the HMTL without // having to reload the application if (RuntimeConfigurationType.DEVELOPMENT.equals(getApplication().getConfigurationType())) { getApplication().getMarkupSettings().getMarkupFactory().getMarkupCache().clear(); getApplication().getResourceSettings() .setCachingStrategy(NoOpResourceCachingStrategy.INSTANCE); } }
@Override public void renderHead(final IHeaderResponse response) { response.render(CssHeaderItem.forReference(new WebjarsJavaScriptResourceReference("openlayers/current/ol.css"))); if (RuntimeConfigurationType.DEVELOPMENT.equals(getApplication().getConfigurationType())) { response.render(JavaScriptHeaderItem.forReference(new WebjarsJavaScriptResourceReference("openlayers/current/ol-debug.js"))); } else { response.render(JavaScriptHeaderItem.forReference(new WebjarsJavaScriptResourceReference("openlayers/current/ol.js"))); } response.render(OnDomReadyHeaderItem.forScript(this.renderJs())); } }