Package com.esri.gpt.framework.context

Examples of com.esri.gpt.framework.context.ApplicationContext


   * Gets singleton instance.
   */
  public static ValidatorFactory getInstance() {
    if (instance==null) {
      LOGGER.fine("Creating singleton instance of protcol validator factory...");
      ApplicationContext appCtx = ApplicationContext.getInstance();
      ApplicationConfiguration appCfg = appCtx.getConfiguration();
      StringAttributeMap parameters = appCfg.getCatalogConfiguration().getParameters();
      String validatorFactoryClassName = Val.chkStr(parameters.getValue("webharvester.validatorFactory.class"));
      if (!validatorFactoryClassName.isEmpty()) {
        try {
          Class validatorFactoryClass = Class.forName(validatorFactoryClassName);
View Full Code Here


   */
  public Agp2AgpValidator(String url, HarvestProtocolAgp2Agp protocol) {
    this.url = url;
    this.protocol = protocol;

    ApplicationContext appCtx = ApplicationContext.getInstance();
    ApplicationConfiguration appCfg = appCtx.getConfiguration();

    String sArcgisDotComAllowed = appCfg.getCatalogConfiguration().getParameters().getValue("webharvester.agp2agp.arcgisDotCom.allowed");
    this.arcgisDotComAllowed = Val.chkBool(sArcgisDotComAllowed, false);


View Full Code Here

         
        }
      }
      if (metrics.contains(StatisticsMetrics.ENGINE.toString()
          .toLowerCase())) {
        ApplicationContext appCtx = ApplicationContext
            .getInstance();
        if(hasDatabaseInfo || hasConfigInfo){
          sb.append(",");
          addSpaces(1);
        }
        sb.append("\"engineInfo\": {");
        addSpaces(3);
        appCtx.getHarvestingEngine().writeStatistics(writer, sb);
        sb.append("}");
        addSpaces(2);
      }
      sb.append("}").append(writer.getNewline());
      sb.append("}").append(writer.getNewline());
View Full Code Here

/**
* Gets AGP2AGP max items.
* @return return AGP2AGP max items
*/
public static Long getAgp2AgpMaxItems() {
  ApplicationContext appCtx = ApplicationContext.getInstance();
  ApplicationConfiguration appCfg = appCtx.getConfiguration();
 
  String sMaxItems = appCfg.getCatalogConfiguration().getParameters().getValue(DEFAULT_MAX_ITEMS_AGP2AGP_KEY);
 
  return Val.chkLong(sMaxItems, DEFAULT_MAX_ITEMS_AGP2AGP);
}
View Full Code Here

   * Gets instance of the cache.
   * @return singleton instance of the cache
   */
  public static DcatCache getInstance() {
    if (instance==null) {
      ApplicationContext appCtx = ApplicationContext.getInstance();
      ApplicationConfiguration appCfg = appCtx.getConfiguration();
      StringAttributeMap parameters = appCfg.getCatalogConfiguration().getParameters();
      String dcatCachePath = Val.chkStr(parameters.getValue("dcat.cache.path"),getDefaultDCATPath());
      File root = new File(dcatCachePath);
     
      instance = new DcatCache(root);
View Full Code Here

  /**
   * Creates instance as configured in gpt.xml.
   * @return instance of the service
   */
  public static GeometryService createDefaultInstance() {
    ApplicationContext appCtx = ApplicationContext.getInstance();
    ApplicationConfiguration appCfg = appCtx.getConfiguration();
    return new GeometryService(appCfg.getInteractiveMap().getGeometryServiceUrl());
  }
View Full Code Here

  /**
   * Gets encryption key.
   * @return encryption key
   */
  private String getEncKey() {
    ApplicationContext appCtx = ApplicationContext.getInstance();
    ApplicationConfiguration appCfg = appCtx.getConfiguration();
    return appCfg.getIdentityConfiguration().getEncKey();
  }
View Full Code Here

/**
* Gets download configuration.
* @return download configuration
*/
private DownloadConfiguration getConfiguration() {
  ApplicationContext appCtx = ApplicationContext.getInstance();
  ApplicationConfiguration appCfg = appCtx.getConfiguration();
  return appCfg.getDownloadDataConfiguration();
}
View Full Code Here

   //url = this.getClass().getResource("data/Config_GetRecords8.xml");
   //url = this.getClass().getResource("data/Config_Dev.xml");
  
   this.verbose = true;
  
   ApplicationContext appCtx = ApplicationContext.getInstance();

   // create harvester engine
   MessageBroker messageBroker = new MessageBroker();
   messageBroker.setBundleBaseName(MessageBroker.DEFAULT_BUNDLE_BASE_NAME);
   Harvester harvester = new Harvester(messageBroker, appCtx.getConfiguration().getHarvesterConfiguration());
   appCtx.setHarvestingEngine(harvester);
  
   CfgConfigFileProcessor processor = new CfgConfigFileProcessor();
   processor.processConfigFile(new File(url.getPath()),this,true);
  }
View Full Code Here

TOP

Related Classes of com.esri.gpt.framework.context.ApplicationContext

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.