Examples of ApplicationContext


Examples of org.springframework.context.ApplicationContext

        DependencyCheckPostProcessor.VALUE));
  }

  @Test
  public void testChecksOptionalMissing() throws Exception {
    ApplicationContext ac = loadApplicationContext("/org/geomajas/spring/dependencyTestOptionalMissing.xml");
    TestRecorder recorder = ac.getBean(TestRecorder.class);
    Assert.assertEquals("", recorder.matches(DependencyCheckPostProcessor.GROUP,
        DependencyCheckPostProcessor.VALUE));
  }
View Full Code Here

Examples of org.springframework.context.ApplicationContext

    }
  }

  @Test
  public void testChecksSourceFirst() throws Exception {
    ApplicationContext ac = loadApplicationContext("/org/geomajas/spring/dependencyTestSourceFirst.xml");
    TestRecorder recorder = ac.getBean(TestRecorder.class);
    Assert.assertEquals("", recorder.matches(DependencyCheckPostProcessor.GROUP,
        DependencyCheckPostProcessor.VALUE));
  }
View Full Code Here

Examples of org.springframework.context.ApplicationContext

        DependencyCheckPostProcessor.VALUE));
  }

  @Test
  public void testChecksSourceLast() throws Exception {
    ApplicationContext ac = loadApplicationContext("/org/geomajas/spring/dependencyTestSourceLast.xml");
    TestRecorder recorder = ac.getBean(TestRecorder.class);
    Assert.assertEquals("", recorder.matches(DependencyCheckPostProcessor.GROUP,
        DependencyCheckPostProcessor.VALUE));
  }
View Full Code Here

Examples of org.springframework.context.ApplicationContext

    super.init(config);
    log.info("JSON servlet init");
    log.debug("current working directory = {}", System.getProperty("user.dir"));

    ApplicationContext applicationContext = ApplicationContextUtil.getApplicationContext(config);
    if (null == applicationContext) {
      applicationContext = ContextLoaderListener.getCurrentWebApplicationContext();
    }
    if (applicationContext instanceof ConfigurableApplicationContext) {
      ((ConfigurableApplicationContext) applicationContext).addApplicationListener(this);
View Full Code Here

Examples of org.springframework.context.ApplicationContext

  public DtoGeometrySerializerTest() {
    dtoSerializer = new DtoGeometrySerializer();
    jtsSerializer = new GeometrySerializer();

    ApplicationContext applicationContext = new ClassPathXmlApplicationContext(new String[] {
        "org/geomajas/spring/geomajasContext.xml", "org/geomajas/spring/emptyApplication.xml" });
    converter = applicationContext.getBean("service.DtoConverterService", DtoConverterService.class);
  }
View Full Code Here

Examples of org.springframework.context.ApplicationContext

   }

   @Test
   public void validateTypeMappingsExistInSpring()
   {
      ApplicationContext ctx = new ClassPathXmlApplicationContext("spring-typemapping-test-server.xml");
      SynchronousDispatcher dispatcher = (SynchronousDispatcher) ctx.getBean("resteasy.dispatcher");
      Map<String, MediaType> mappings = dispatcher.getMediaTypeMappings();
      assertEquals(2, mappings.size());
      assertEquals("application/xml", mappings.get("xml").toString());
      assertEquals("application/json", mappings.get("json").toString());
   }
View Full Code Here

Examples of org.springframework.context.ApplicationContext

    Object bean = null;
    synchronized (getConversation()) {
      Map<String, Object> registry = getViewRegistry();
      if (!registry.containsKey(name)) {
        if (GroovyBeanFactory.getInstance().getBeans().contains(name)) {
          ApplicationContext applicationContext = Application.getApplicationContext();
          registry.put(name, applicationContext.getBean(name));
        }
      }
      bean = registry.get(name);
    }
    return bean;
View Full Code Here

Examples of org.springframework.context.ApplicationContext

     
          if (AuthLevelmanagement.getInstance().checkWebServiceLevel(User_level)){
           
        String current_dir = getServletContext().getRealPath("/");
       
        ApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
            FileProcessor fileProcessor = (FileProcessor) context.getBean("openmeetings.FileProcessor");
       
            URL url = new URL(path);
            URLConnection uc = url.openConnection();
            InputStream inputstream = new BufferedInputStream(uc.getInputStream());
           
View Full Code Here

Examples of org.springframework.context.ApplicationContext

     
          if (AuthLevelmanagement.getInstance().checkWebServiceLevel(User_level)){
           
        String current_dir = getServletContext().getRealPath("/");
       
        ApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
            FileProcessor fileProcessor = (FileProcessor) context.getBean("openmeetings.FileProcessor");
       
            URL url = new URL(path);
            URLConnection uc = url.openConnection();
            InputStream inputstream = new BufferedInputStream(uc.getInputStream());
           
View Full Code Here

Examples of org.springframework.context.ApplicationContext

                "utf-8");
        InputStream is = upload.getFileContents("Filedata");
        String fileSystemName = upload.getBaseFilename("Filedata");
        log.debug("fileSystemName: " + fileSystemName);

        ApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
       
        FileProcessor fileProcessor = (FileProcessor) context.getBean("openmeetings.FileProcessor");
       
        HashMap<String, HashMap<String, Object>> returnError = fileProcessor.processFile(userId, room_id_to_Store,
            isOwner, is, parentFolderId, fileSystemName, current_dir, hs,
            0L, ""); //externalFilesId, externalType
       
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.