Package com.esri.gpt.framework.collection

Examples of com.esri.gpt.framework.collection.StringAttributeMap


   *
   * @param ctx request context
   * @return credential provider
   */
  protected static CredentialProvider extractCredentialProvider(RequestContext ctx) {
    StringAttributeMap params = ctx.getCatalogConfiguration().getParameters();
    return new CredentialProvider(
            params.get("share.with.arcgis.username").getValue(),
            params.get("share.with.arcgis.password").getValue());
  }
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

    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();
    op.setHandlerClass("com.esri.gpt.server.assertion.handler.AsnApiHandler");
    op.setSubject(new AsnSubject(AsnConstants.APP_URN_PREFIX));
    op.getSubject().setRequiresValuePart(false);
    op.setPredicate(new AsnPredicate(AsnConstants.APP_URN_PREFIX+":assertion:operations"));
    op.setAuthPolicy(new AsnAuthPolicy());
    op.getAuthPolicy().setAuthenticationRequired(false);
    op.getAuthPolicy().setQueryPrincipals(new AsnPrincipals());
    op.getAuthPolicy().getQueryPrincipals().add(AsnConstants.PRINCIPAL_ANY);
    this.operations.add(op);
   
    // root index reference
    String val = Val.chkStr(catParams.getValue("assertion.index.allowNonLocalResourceIds"));
    this.allowNonLocalResourceIds = val.equalsIgnoreCase("true");
    AsnIndexReference rootIndexRef = new AsnIndexReference();
    val = Val.chkStr(catParams.getValue("assertion.index.enabled"));
    rootIndexRef.setEnabled(!val.equalsIgnoreCase("false"));
    val = Val.chkStr(catParams.getValue("assertion.index.location"));
    rootIndexRef.setIndexLocation(val);
    rootIndexRef.setUseNativeFSLockFactory(luceneCfg.getUseNativeFSLockFactory());
    rootIndexRef.setWriteLockTimeout(luceneCfg.getWriteLockTimeout());
    if (!rootIndexRef.getEnabled()) {
      LOGGER.config("assertion.index.enabled=false");
View Full Code Here

   * @param name the assertion set name
   */
  private void configureComments(CatalogConfiguration catCfg,
                                 AsnIndexReference indexRef,
                                 String name) {
    StringAttributeMap catParams = catCfg.getParameters();
    AsnOperations ops =  this.operations;
    AsnOperation op;
   
    if (indexRef.getEnabled()) {
     
      int maxLength = Val.chkInt(catParams.getValue("assertion."+name+".maxLength"),4000);
      String valueFilterClass = Val.chkStr(catParams.getValue("assertion."+name+".valueFilterClass"));
      if (valueFilterClass.length() == 0) {
        valueFilterClass = null;
      }
     
      AsnAuthPolicy authForRead = new AsnAuthPolicy();
View Full Code Here

   * @param name the index reference name
   */
  private AsnIndexReference makeIndexRef(CatalogConfiguration catCfg,
                                         AsnIndexReference rootIndexRef,
                                         String name) {
    StringAttributeMap catParams = catCfg.getParameters();
    AsnIndexReference indexRef = new AsnIndexReference();
    String indexAdapterClass = "com.esri.gpt.server.assertion.index.AsnIndexAdapter";
    String val = Val.chkStr(catParams.getValue("assertion."+name+".enabled"));
    indexRef.setEnabled(!val.equalsIgnoreCase("false"));
    if (!indexRef.getEnabled()) {
      LOGGER.config("assertion."+name+".enabled=false");
    } else {
      val = Val.chkStr(catParams.getValue("assertion."+name+".location"));
      indexRef.setIndexLocation(rootIndexRef,name,val);
      indexRef.setIndexAdatperClass(indexAdapterClass);
      indexRef.setUseNativeFSLockFactory(rootIndexRef.getUseNativeFSLockFactory());
      indexRef.setWriteLockTimeout(rootIndexRef.getWriteLockTimeout());
      try {
View Full Code Here

    if ((sEncoding == null) || (sEncoding.trim().length() == 0)) {
      request.setCharacterEncoding("UTF-8");
    }
    context = RequestContext.extract(request);
   
    StringAttributeMap params = context.getCatalogConfiguration().getParameters();
    String autoAuthenticate = Val.chkStr(params.getValue("BaseServlet.autoAuthenticate"));
    if (!autoAuthenticate.equalsIgnoreCase("false")) {
      Credentials credentials = getCredentials(request);
      if (credentials != null) {
        authenticate(context,credentials);
      }
View Full Code Here

* Determine if apply to all is allowable.
* @return <code>true</code> if apply to all is allowable
*/
public boolean getAllowApplyToAll() {
  RequestContext context = this.getContextBroker().extractRequestContext();
  StringAttributeMap params = context.getCatalogConfiguration().getParameters();
  String s = Val.chkStr(params.getValue("catalog.admin.allowApplyToAll"));
  return !s.equalsIgnoreCase("false");
}
View Full Code Here

public Map<String,String> getAttrs() {
  return new FacesMap<String>() {

      @Override
      public String get(Object key) {
        StringAttributeMap map = _harvestRepository.getProtocol().getAttributeMap();
        String value = map.getValue(key.toString());
        if ("src-m".equals(key) && Val.chkStr(value).isEmpty()) {
          value = HarvestProtocolAgp2Agp.getAgp2AgpMaxItems().toString();
        }
        return Val.chkStr(value);
      }

      @Override
      public String put(String key, String value) {
        StringAttributeMap map = _harvestRepository.getProtocol().getAttributeMap();
        map.set(key.toString(), Val.chkStr(value));
        _harvestRepository.getProtocol().setAttributeMap(map);
        return value;
      }

  };
View Full Code Here

/**
* Sets additional parameters.
* @param parameters parameters
*/
public void setParameters(StringAttributeMap parameters) {
  _parameters = parameters!=null? parameters: new StringAttributeMap();
}
View Full Code Here

   */
  public static KeysetProcessor newProcessor(HttpServletRequest request,
      RequestContext context) throws Exception {
    String sClassName = Val.chkStr(request.getParameter("processor"));
    if (sClassName.length() == 0) {
      StringAttributeMap cfg = context.getCatalogConfiguration().getParameters();
      sClassName = Val.chkStr(cfg.getValue("catalog.cart.processor"));
    }
    if (sClassName.length() > 0) {
      Class<?> cls = Class.forName(sClassName);
      Object obj = cls.newInstance();
      if (obj instanceof KeysetProcessor) {
View Full Code Here

TOP

Related Classes of com.esri.gpt.framework.collection.StringAttributeMap

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.