Examples of GlobalSettings


Examples of org.dozer.config.GlobalSettings

    fail();
  }

  @Test(expected=MappingException.class)
  public void testBeanIsNotAssignable() {
    GlobalSettings settings = mock(GlobalSettings.class);
    when(settings.getClassLoaderName()).thenReturn("java.lang.String");
    when(settings.getProxyResolverName()).thenReturn(DozerConstants.DEFAULT_PROXY_RESOLVER_BEAN);

    instance.initialize(settings, getClass().getClassLoader());
    fail();
  }
View Full Code Here

Examples of org.dozer.config.GlobalSettings

     *                     {@link DozerTypeConverter} in
     *
     * @param configuration dozer mapping bean configuration.
     */
    public DozerTypeConverterLoader(CamelContext camelContext, DozerBeanMapperConfiguration configuration) {
        GlobalSettings settings = GlobalSettings.getInstance();
        try {
            log.info("Configuring GlobalSettings to use Camel classloader: {}", CamelToDozerClassResolverAdapter.class.getName());
            Field field = settings.getClass().getDeclaredField("classLoaderBeanName");
            ReflectionHelper.setField(field, settings, CamelToDozerClassResolverAdapter.class.getName());
        } catch (Exception e) {
            throw new IllegalStateException("Cannot configure Dozer GlobalSettings to use CamelToDozerClassResolverAdapter as classloader due " + e.getMessage(), e);
        }

View Full Code Here

Examples of org.olat.core.gui.GlobalSettings

      CoreSpringFactory.getBean(PopupBrowserWindowControllerCreator.class);
   
   
   
    final AJAXFlags aflags = new AJAXFlags(this);
    globalSettings = new GlobalSettings() {

      public int getFontSize() {
        return WindowManagerImpl.this.getFontSize();
      }
View Full Code Here

Examples of org.olat.core.gui.GlobalSettings

   * @param sb
   * @param source
   * @param args
   */
  public void render(StringOutput sb, Component source, String[] args) {
    GlobalSettings gset = getGlobalSettings();
    boolean ajaxon = gset.getAjaxFlags().isIframePostEnabled();
    // wrap with div's so javascript can replace this component by doing a document.getElementById(cid).innerHTML and so on.
    boolean domReplaceable = source.isDomReplaceable();
    boolean useSpan = source.getSpanAsDomReplaceable();
    boolean forceDebugDivs = gset.isIdDivsForced();

    if (source.isVisible()) {
      int lev = renderResult.getNestedLevel();
      if (lev > 42) throw new AssertException("components were nested more than 42 times, assuming endless loop bug: latest comp name: "+source.getComponentName());
      Translator componentTranslator = source.getTranslator();
View Full Code Here

Examples of org.olat.core.gui.GlobalSettings

      // sync dispatching per window to avoid rendering problems
      // when user repeateadly presses reload, and also to distribute bandwidth more
      // evenly.
      // postcondition: each controller's events are called by one gui-thread at a time only.
     
      GlobalSettings gsettings = wbackofficeImpl.getGlobalSettings();
      boolean bgEnab = gsettings.getAjaxFlags().isIframePostEnabled();
      //System.out.println("in window:");
      // -------------------------
      // ----- ajax mode ---------
      // -------------------------
      if (bgEnab && (ureq.getMode() & 1) == 1) {
View Full Code Here

Examples of org.olat.core.gui.GlobalSettings

          root.put("cc", dirties.size());
          root.put("wts", timestamp);
          JSONArray ja = new JSONArray();
          root.put("cps", ja);
         
          GlobalSettings gsettings = wbackofficeImpl.getGlobalSettings();
         
          synchronized(render_mutex) { //o_clusterOK by:fj
            // we let all dirty components render themselves.
            // not offered (since not usability-useful) is the include of new js-libraries and css-libraries here, since this may invoke a screen reload
            // which disturbes the user and lets him/her loose the focus and the cursor.
View Full Code Here

Examples of org.olat.core.gui.GlobalSettings

      Translator pageTranslator = new PackageTranslator(bundleName, I18nModule.getDefaultLocale());
      // Open velocity page for this help page
      String pagePath = bundleName.replace('.', '/') + ContextHelpModule.CHELP_DIR + page;
      VelocityContainer container =  new VelocityContainer("contextHelpPageVC", pagePath, pageTranslator, null);         
      Context ctx = container.getContext();   
      GlobalSettings globalSettings = new GlobalSettings() {
        public int getFontSize() { return 100;}
        public AJAXFlags getAjaxFlags() { return new EmptyAJAXFlags();}
        public ComponentRenderer getComponentRendererFor(Component source) {
          return null;
        }
View Full Code Here

Examples of org.sonar.batch.bootstrap.GlobalSettings

  @Before
  public void prepare() {
    projectRef = new ProjectReferentials();
    mode = mock(AnalysisMode.class);
    bootstrapProps = new GlobalSettings(new BootstrapProperties(Collections.<String, String>emptyMap()), new PropertyDefinitions(), new GlobalReferentials(), mode);
  }
View Full Code Here

Examples of org.sonar.batch.bootstrap.GlobalSettings

    assertThat(hierarchy.get(2)).isEqualTo(child);
  }

  @Test
  public void test_loading_of_module_settings() {
    GlobalSettings batchSettings = mock(GlobalSettings.class);
    when(batchSettings.getDefinitions()).thenReturn(new PropertyDefinitions());
    when(batchSettings.getProperties()).thenReturn(ImmutableMap.of(
      "overridding", "batch",
      "on-batch", "true"
      ));
    projectRef.addSettings("struts-core", ImmutableMap.of("on-module", "true", "overridding", "module"));
View Full Code Here

Examples of org.sonar.batch.bootstrap.GlobalSettings

  }

  @Test
  public void should_not_fail_when_accessing_secured_properties() {
    GlobalSettings batchSettings = mock(GlobalSettings.class);
    when(batchSettings.getDefinitions()).thenReturn(new PropertyDefinitions());
    when(batchSettings.getProperties()).thenReturn(ImmutableMap.of(
      "sonar.foo.secured", "bar"
      ));
    projectRef.addSettings("struts-core", ImmutableMap.of("sonar.foo.license.secured", "bar2"));

    ProjectDefinition module = ProjectDefinition.create().setKey("struts-core");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.