Package org.springframework.context.support

Examples of org.springframework.context.support.FileSystemXmlApplicationContext


    return "";
  }

  @Override
  public void handleOption(CmdLineOption option, List<String> values) {
    FileSystemXmlApplicationContext appContext = new FileSystemXmlApplicationContext(new String[] { this.beanRepo }, false);
    appContext.setClassLoader(new Serializer().getClassLoader());
    appContext.refresh();
    PrintStream ps = new PrintStream(System.out);
        ps.println("Actions:");
        for (CatalogServiceServerAction action : ((Map<String, CatalogServiceServerAction>) appContext.getBeansOfType(CatalogServiceServerAction.class)).values()) {
            ps.println("  Action:");
            ps.println("    Id: " + action.getId());
            ps.println("    Description: " + action.getDescription());
            ps.println();
        }
View Full Code Here


  protected String beanRepo;
 
  @Override
  public void performAction(CatalogServiceClient csClient) throws Exception {
    FileSystemXmlApplicationContext repoAppContext = new FileSystemXmlApplicationContext(new String[] { this.beanRepo }, false);
    repoAppContext.setClassLoader(new Serializer().getClassLoader());
    repoAppContext.refresh();
    Map<String, Catalog> catalogs = repoAppContext.getBeansOfType(Catalog.class);
    for (Catalog catalog : catalogs.values())
      csClient.addCatalog(catalog);
  }
View Full Code Here

        crawler.setFilemgrUrl(this.pgeMetadata
                .getMetadataValue(PcsMetadataKeys.FILE_MANAGER_URL));
        String actionRepoFile = this.pgeMetadata
                .getMetadataValue(PcsMetadataKeys.ACTION_REPO_FILE);
        if (actionRepoFile != null && !actionRepoFile.equals("")) {
            crawler.setApplicationContext(new FileSystemXmlApplicationContext(
                    actionRepoFile));
            crawler.setActionIds(this.pgeMetadata
                    .getMetadataValues(PcsMetadataKeys.ACTION_IDS));
        }
        crawler.setRequiredMetadata(this.pgeMetadata
View Full Code Here

  protected String beanId;
  protected String beanRepo;
 
  @Override
  public void performAction(CatalogServiceClient csClient) throws Exception {
    FileSystemXmlApplicationContext appContext = new FileSystemXmlApplicationContext(new String[] { this.beanRepo }, false);
    appContext.setClassLoader(new Serializer().getClassLoader());
    appContext.refresh();
    CatalogRepositoryFactory factory = (CatalogRepositoryFactory) appContext.getBean(this.beanId, CatalogRepositoryFactory.class);
    CatalogRepository catalogRepository = factory.createRepository();
    Set<Catalog> catalogs = catalogRepository.deserializeAllCatalogs();
    System.out.println("Deserialized Catalogs: " + catalogs.toString());
    for (Catalog catalog : catalogs) {
      try {
View Full Code Here

    /**
     * @see org.apache.avalon.framework.activity.Initializable#initialize()
     */
    public void initialize() throws Exception
    {
        this.ctx = new FileSystemXmlApplicationContext(this.configLocations);
        this.beanFactoryServiceManager = new BeanFactoryServiceManager(ctx);
    }
View Full Code Here

    private AbstractApplicationContext ctx;

    /** @see junit.framework.TestCase#setUp() */
    protected void setUp() throws Exception {
        super.setUp();
        this.ctx = new FileSystemXmlApplicationContext("./src/test/avalonIntoSpringApplicationContext.xml");
    }
View Full Code Here

            logger.warn("Attempting to initialise OAJ Server more than once.");
    }
   
    private static void loadBeans() {
        if (INIT_OBJ instanceof String)
            new FileSystemXmlApplicationContext(INIT_OBJ.toString());
    }
View Full Code Here

      int orderId = Integer.parseInt(args[0]);
      int nrOfCalls = 1;
      if (args.length > 1 && !"".equals(args[1])) {
        nrOfCalls = Integer.parseInt(args[1]);
      }
      ListableBeanFactory beanFactory = new FileSystemXmlApplicationContext(CLIENT_CONTEXT_CONFIG_LOCATION);
      WorkflowStarterClient client = new WorkflowStarterClient(beanFactory);
      client.invokeOrderServices(orderId, nrOfCalls);
    }
  }
View Full Code Here

  private void setupDecisionTable(){
   
    if(dtLoader==null){
     
      log.debug("Loading Spring Decision Table Bean");
      context = new FileSystemXmlApplicationContext(appContext);
      dtLoader  = (SpringDecisionTableLoader) context.getBean(SPRING_DECISION_TABLE_LOADER_BEAN_NAME);
     
    } else {
      log.debug("Spring Decision Table Bean already loaded");
    }
View Full Code Here

        }
        catch (FileNotFoundException e ){
            e.printStackTrace(System.out);
        }
       
        ApplicationContext context = new FileSystemXmlApplicationContext(Config.WEBINF +
                "/" + Config.APPCONTEXT);

        //call the dialog
        RpGui dialog = new RpGui((KnowledgeSphereManager) context.getBean(
                    Config.KNOWLEDGEMANAGER_PLUGINNAME));
        dialog.setModal(true);
        dialog.setVisible(true);
    }
View Full Code Here

TOP

Related Classes of org.springframework.context.support.FileSystemXmlApplicationContext

Copyright © 2018 www.massapicom. 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.