Package com.esri.gpt.framework.context

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


   * @return collection of protocols eligible to choose
   */
  public ArrayList<SelectItem> getProtocols() {
    ArrayList<SelectItem> protocols = new ArrayList<SelectItem>();
    MessageBroker msgBroker = getContextBroker().extractMessageBroker();
    ApplicationContext appCtx = ApplicationContext.getInstance();
    ApplicationConfiguration appCfg = appCtx.getConfiguration();
    ProtocolFactories protocolFactories = appCfg.getProtocolFactories();
    for (String key : protocolFactories.getKeys()) {
      ProtocolFactory pf = protocolFactories.get(key);
      if (pf instanceof AgpProtocolFactory && !AGSProcessorConfig.isAvailable()) {
        continue;
View Full Code Here


   * Creates new instance of the locator.
   * @return locator
   * @throws IllegalArgumentException if "lucene.locatorClass" parameter is invalid
   */
  public static Locator newInstance() {
    ApplicationContext appCtx = ApplicationContext.getInstance();
    ApplicationConfiguration appCfg = appCtx.getConfiguration();

    String locatorClassName = appCfg.getCatalogConfiguration().getParameters().getValue("lucene.locatorClass");

    if (Val.chkStr(locatorClassName).length() == 0) {
      return new Locator();
View Full Code Here

  /**
   * Creates instance of the locator.
   */
  protected Locator() {
    ApplicationContext appCtx = ApplicationContext.getInstance();
    ApplicationConfiguration appCfg = appCtx.getConfiguration();
    this.url = appCfg.getInteractiveMap().getLocatorUrl();
  }
View Full Code Here

    }
    return toSkip != null ? toSkip.contains(uuid) : false;
  }

  protected Set<String> getSitesToSkip() {
    ApplicationContext appCtx = ApplicationContext.getInstance();
    ApplicationConfiguration appCfg = appCtx.getConfiguration();
    StringAttributeMap parameters = appCfg.getCatalogConfiguration().getParameters();
    String skip = Val.chkStr(parameters.getValue("webharvester.skip"));

    TreeSet<String> set = new TreeSet<String>();
    set.addAll(Arrays.asList(skip.split(",")));
View Full Code Here

    }
    return isSuspended();
  }
 
  private int getMaxAttempts() {
    ApplicationContext appCtx = ApplicationContext.getInstance();
    ApplicationConfiguration appCfg = appCtx.getConfiguration();
    StringAttributeMap parameters = appCfg.getCatalogConfiguration().getParameters();
    return Val.chkInt(parameters.getValue("webharvester.maxAttempts"),DEFAULT_MAX_ATTEMPTS);
  }
View Full Code Here

  @Override
  public void appendRecord(Collection<Resource> records, ServiceHandlerFactory factory, ServiceInfo serviceInfo, boolean isNative) throws Exception {
    super.appendRecord(records, factory, serviceInfo, isNative);

    // configuration parameters for data element recursion
    ApplicationContext appCtx = ApplicationContext.getInstance();
    ApplicationConfiguration cfg = appCtx.getConfiguration();
    StringAttributeMap params = cfg.getCatalogConfiguration().getParameters();
    boolean recurse = true;
    if (Val.chkStr(params.getValue("AGSProcessor.GeoDataServer.recurse")).equalsIgnoreCase("false")) {
      recurse = false;
    }
View Full Code Here

    // initialize
    CatalogConfiguration catCfg = null;
    if (context != null) {
      catCfg = context.getCatalogConfiguration();
    } else {
      ApplicationContext appCtx = ApplicationContext.getInstance();
      catCfg = appCtx.getConfiguration().getCatalogConfiguration();
    }
 
    // look for a configured class name for the resource identifier
    String className = Val.chkStr(catCfg.getParameters().getValue("resourceLinkIdentifier"));
    if (className.length() == 0) {
View Full Code Here

    });
  }

  public AgpValidator() {

    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

  }
  return suspended;
}
 
private int getMaxAttempts() {
  ApplicationContext appCtx = ApplicationContext.getInstance();
  ApplicationConfiguration appCfg = appCtx.getConfiguration();
  StringAttributeMap parameters = appCfg.getCatalogConfiguration().getParameters();
  return Val.chkInt(parameters.getValue("webharvester.maxAttempts"),DEFAULT_MAX_ATTEMPTS);
}
View Full Code Here

   *
   * @param paramName parameter name
   * @return parameter value
   */
  protected static String getConfigParam(String paramName) {
    ApplicationContext appCtx = ApplicationContext.getInstance();
    ApplicationConfiguration appCfg = appCtx.getConfiguration();
    return Val.chkStr(appCfg.getCatalogConfiguration().getParameters().getValue(paramName));
  }
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.