Package com.esri.gpt.framework.context

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


   * @return max records threshold
   */
  private static synchronized int getMaxRecordsThreshold() {
    if (maxRecordsThreshold==null) {
      ApplicationContext appCtx = ApplicationContext.getInstance();
      ApplicationConfiguration appCfg = appCtx.getConfiguration();
      StringAttributeMap parameters = appCfg.getCatalogConfiguration().getParameters();
      String value = parameters.getValue("lucene.maxrecords.threshold");
      maxRecordsThreshold = Val.chkInt(value, THRESHOLD_MAXRECORDS);
    }
    return maxRecordsThreshold;
  }
View Full Code Here


   */
  public static LiveDataRendererFactoryBuilder newBuilder() {

    // initialize
    ApplicationContext appCtx = ApplicationContext.getInstance();
    ApplicationConfiguration appCfg = appCtx.getConfiguration();
    CatalogConfiguration catCfg = appCfg.getCatalogConfiguration();

    // look for a configured class name for the resource link builder
    String className = Val.chkStr(catCfg.getParameters().getValue("liveDataRendererFactoryBuilder"));

    // instantiate the builder
View Full Code Here

    }

    @Override
    public String getContent() throws IOException {
      ApplicationContext appCtx = ApplicationContext.getInstance();
      ApplicationConfiguration cfg = appCtx.getConfiguration();
      LOGGER.finer("Collecting metadata for: " + getServiceInfo().getSoapUrl());
      try {
        ServiceHandler.this.collectMetadata(factory, getServiceInfo());
        return getServiceInfo().asDublinCore(cfg, http);
      } catch (Exception ex) {
View Full Code Here

    if (serviceUrl.length() == 0) {
      // provide base map only renderer
      renderer = basemapOnlyRenderer;
    } else {
      ApplicationConfiguration appConfig = ApplicationContext.getInstance().getConfiguration();
      StringAttributeMap parameters = appConfig.getCatalogConfiguration().getParameters();
      boolean advPreviewEnabled = Val.chkBool(parameters.getValue("preview.advanced.enabled"), true);

      if (advPreviewEnabled) {
        RendererSelector selector = new RendererSelector(this);
        renderer = selector.select(url, cp);
View Full Code Here

   
    // initialize
    this.indexReferences = new AsnIndexReferences();
    this.operations = new AsnOperations();
    AsnIndexReferences indexRefs = this.indexReferences;
    ApplicationConfiguration appCfg = ApplicationContext.getInstance().getConfiguration();
    CatalogConfiguration catCfg = appCfg.getCatalogConfiguration();
    StringAttributeMap catParams = catCfg.getParameters();
    LuceneConfig luceneCfg = catCfg.getLuceneConfig();
   
    // API operations
    AsnOperation op = new AsnOperation();
View Full Code Here

*/
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();
  protocols.add(new SelectItem("", msgBroker.retrieveMessage("catalog.harvest.manage.edit.protocol.any")));
  for (String key: protocolFactories.getKeys()) {
    ProtocolFactory pf = protocolFactories.get(key);
    if (pf instanceof AgpProtocolFactory && !AGSProcessorConfig.isAvailable()) continue;
    String resourceKey = protocolFactories.getResourceKey(key);
View Full Code Here

public HarvestEditor(HrRecord harvestRepository) {
  _harvestRepository = harvestRepository;
  protocols.put(harvestRepository.getProtocol().getKind(), harvestRepository.getProtocol());
 
  ApplicationContext appCtx = ApplicationContext.getInstance();
  ApplicationConfiguration appCfg = appCtx.getConfiguration();
   
  String sArcgisDotComAllowed = appCfg.getCatalogConfiguration().getParameters().getValue("webharvester.agp2agp.arcgisDotCom.allowed");
  this.arcgisDotComAllowed = Val.chkBool(sArcgisDotComAllowed, false);


  String sCrossAllowed = appCfg.getCatalogConfiguration().getParameters().getValue("webharvester.agp2agp.sameDomain.allowed");
  this.crossAllowed = Val.chkBool(sCrossAllowed, false);
}
View Full Code Here

    writeTag("generator", sGenerator);
  }
 
  // emails
  ApplicationContext appCtx = ApplicationContext.getInstance();
  ApplicationConfiguration appCfg = appCtx.getConfiguration();
  String sEmail = appCfg.getMailConfiguration().getIncomingToAddress();
  if (sEmail.length()>0) {
    writeTag("managingEditor", sEmail);
    writeTag("webMaster", sEmail);
  }
 
View Full Code Here

   * @param request HTTP request
   * @return registration info or <code>null</code> if unable to extract registration info
   */
  private HrRecord extractRegistrationInfo(HttpServletRequest request) {
    ApplicationContext appCtx = ApplicationContext.getInstance();
    ApplicationConfiguration appCfg = appCtx.getConfiguration();

    HrRecord record = new HrRecord();
    StringAttributeMap attributes = new StringAttributeMap();
    boolean updateContent = true;
    boolean updateDefinition = true;
    boolean autoApprove = true;

    for (String paramName : new EnumerationAdapter<String>(request.getParameterNames())) {
      String paramValue = request.getParameter(paramName);
      if (paramName.equalsIgnoreCase("uuid")) {
        record.setUuid(paramValue);
      }
      if (paramName.equalsIgnoreCase("name")) {
        record.setName(paramValue);
      }
      else if (paramName.equalsIgnoreCase("url")) {
        record.setHostUrl(paramValue);
      }
      else if (paramName.equalsIgnoreCase("soapurl")) {
        attributes.add(new StringAttribute(ArcGISProtocol.SOAP_URL,paramValue));
      }
      else if (paramName.equalsIgnoreCase("protocol")) {
        ProtocolFactory factory = appCfg.getProtocolFactories().get(paramValue);
        if (factory!=null) {
          record.setProtocol(factory.newProtocol());
        }
      }
      else if (paramName.equalsIgnoreCase("frequency")) {
        record.setHarvestFrequency(HarvestFrequency.checkValueOf(paramValue));
      }
      else if (paramName.equalsIgnoreCase("sendNotification")) {
        record.setSendNotification(Val.chkBool(paramValue, false));
      }
      else if (paramName.equalsIgnoreCase("updateContent")) {
        updateContent = Val.chkBool(paramValue, true);
      }
      else if (paramName.equalsIgnoreCase("updateDefinition")) {
        updateDefinition = Val.chkBool(paramValue, true);
      }
      else if (paramName.equalsIgnoreCase("autoApprove")) {
        autoApprove = Val.chkBool(paramValue, true);
      }
      else if (paramName.equalsIgnoreCase("findable")) {
        record.setFindable(Val.chkBool(paramValue, true));
      }
      else if (paramName.equalsIgnoreCase("searchable")) {
        record.setSearchable(Val.chkBool(paramValue, true));
      }
      else if (paramName.equalsIgnoreCase("synchronizable")) {
        record.setSynchronizable(Val.chkBool(paramValue, true));
      }
      else {
        attributes.add(new StringAttribute(paramName,paramValue));
      }
    }

    if (record.getProtocol()==null || record.getProtocol().getKind().equalsIgnoreCase(ProtocolType.None.name())) {
      ProtocolFactory factory = appCfg.getProtocolFactories().get(ProtocolType.RES.name());
      if (factory!=null) {
        record.setProtocol(factory.newProtocol());
      }
    }
   
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.ApplicationConfiguration

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.