Package com.esri.gpt.framework.context

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


   * If not, use THRESHOLD_MAXRECORDS.
   * @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


* @param record record to insert a new job for
* @param jobType job type
* @return <code>true</code> if job has been created
*/
private boolean insertJob(HrRecord record, Integer maxRecs, Date fromDate) {
  ApplicationContext appCtx = ApplicationContext.getInstance();
  Harvester harvester = appCtx.getHarvestingEngine();
  return harvester.submit(getRequestContext(), record, maxRecs, fromDate);
}
View Full Code Here

   * @return instance of builder
   */
  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"));

View Full Code Here

      return new UrlUri(getServiceInfo().getResourceUrl());
    }

    @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

* @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();
  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;
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);


View Full Code Here

  if (sGenerator.length()>0) {
    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

   * Gets gpt.xml configuration parameter.
   * @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

   * Extracts registration info.
   * @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;
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

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.