Package com.esri.gpt.framework.collection

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


   */
  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


  }
 
  // publish the record to the index if approved
  CatalogIndexAdapter indexAdapter = getCatalogIndexAdapter();
  if (indexAdapter != null) {
    StringAttributeMap params = this.getRequestContext().getCatalogConfiguration().getParameters();
    String param = Val.chkStr(params.getValue("lucene.useRemoteWriter"));
    boolean bUseRemoteWriter = param.equalsIgnoreCase("true");
    param = Val.chkStr(params.getValue("lucene.useLocalWriter"));
    boolean bUseLocalWriter = !param.equalsIgnoreCase("false");
    if (bUseRemoteWriter) {
      RemoteIndexer remoteIndexer = new RemoteIndexer();
      remoteIndexer.send(this.getRequestContext(),"publish",
          uuids.toArray(new String[0]));
View Full Code Here

  // publish to or remove from the index
  CatalogIndexAdapter indexAdapter = getCatalogIndexAdapter();
  if ((indexAdapter != null) && (uuids.size() > 0)) {
    if (MmdEnums.ApprovalStatus.isPubliclyVisible(approvalStatus.toString())) {
     
      StringAttributeMap params = this.getRequestContext().getCatalogConfiguration().getParameters();
      String param = Val.chkStr(params.getValue("lucene.useRemoteWriter"));
      boolean bUseRemoteWriter = param.equalsIgnoreCase("true");
      param = Val.chkStr(params.getValue("lucene.useLocalWriter"));
      boolean bUseLocalWriter = !param.equalsIgnoreCase("false");
      if (bUseRemoteWriter) {
        RemoteIndexer remoteIndexer = new RemoteIndexer();
        remoteIndexer.send(this.getRequestContext(),"publish",
            uuids.toArray(new String[0]));
View Full Code Here

   * Extracts end-point from the configuration
   * @param ctx request context
   * @return end-point
   */
  public static EndPoint extract(RequestContext ctx) {
    StringAttributeMap params = ctx.getCatalogConfiguration().getParameters();
    return new EndPoint(
        params.get("share.with.arcgis.base.url").getValue(),
        params.get("share.with.arcgis.token.url").getValue(),
        params.get("share.with.arcgis.referer").getValue());
  }
View Full Code Here

      boolean peekForXmlEncoding = false;
      String encoding = request.getResponseInfo().getContentEncoding();
      if ((encoding == null) || (encoding.length() == 0)) {
        String lct = Val.chkStr(ct).toLowerCase();
        if (lct.endsWith("/xml") || lct.endsWith("+xml")) {         
          StringAttributeMap params = ApplicationContext.getInstance().getConfiguration().getCatalogConfiguration().getParameters();
          String param = params.getValue("HttpClientRequest.allowPeekForXmlEncoding");
          peekForXmlEncoding = !Val.chkStr(param).equalsIgnoreCase("false");
        }
      }
     
      if (!peekForXmlEncoding) {
View Full Code Here

public boolean isManageUser() {
  RequestContext rc = getContextBroker().extractRequestContext();
  UsernamePasswordCredentials upc = rc.getIdentityConfiguration().getSimpleConfiguration().getServiceAccountCredentials();
  if(upc !=null) return _manageUser;
 
  StringAttributeMap sNavParameters = rc.getCatalogConfiguration().getParameters();
  if(sNavParameters.containsKey("ldap.identity.manage.userRoleEnabled")){ 
    String hasManageUser = Val.chkStr(sNavParameters.getValue("ldap.identity.manage.userRoleEnabled"));
    _manageUser = Boolean.valueOf(hasManageUser);
  }
  return _manageUser;
}
View Full Code Here

* @param context the active request context
* @return true if the database is case sensitive
*/
public static boolean getIsDbCaseSensitive(RequestContext context) {
  if (context == null) return true;
  StringAttributeMap params  = context.getCatalogConfiguration().getParameters();
  String s = Val.chkStr(params.getValue("database.isCaseSensitive"));
  return !s.equalsIgnoreCase("false");
}
View Full Code Here

public void processAction(ActionEvent event)
   throws AbortProcessingException {
  boolean autoAuthenticate = true;
  try {
    RequestContext context = onExecutionPhaseStarted();
    StringAttributeMap params = context.getCatalogConfiguration().getParameters();
    autoAuthenticate = !Val.chkStr(params.getValue("BaseServlet.autoAuthenticate")).equalsIgnoreCase("false");
    authorizeAction(context);
    if (autoAuthenticate) {
      CredentialProvider.establishThreadLocalInstance(this.getContextBroker().extractHttpServletRequest());
    }
    processSubAction(event,context);
View Full Code Here

  setPublisher(publisher);
  getPublicationRecord().setSourceXml(sourceXml);
 
  // check for auto-approval (only applies to new records)
  if (requestContext != null) {
    StringAttributeMap params = requestContext.getCatalogConfiguration().getParameters();
    String sAuto = Val.chkStr(params.getValue("publicationRequest.autoApprove"));
    if (sAuto.toLowerCase().equals("true")) {
      this.getPublicationRecord().setAutoApprove(true);
    }
  }
}
View Full Code Here

   * Configure the parser.
   */
  private void configure() {
    if (this.wasConfigured) return;
    this.wasConfigured = true;
    StringAttributeMap params = ApplicationContext.getInstance().getConfiguration().getCatalogConfiguration().getParameters();
    int n;
    String s;
   
    s = Val.chkStr(params.getValue("timeperiod.allowAfterAndBefore"));
    if (s.equalsIgnoreCase("true")) {
      this.allowAfterAndBefore = true;
    }
    s = Val.chkStr(params.getValue("timeperiod.allowOpenEndedRange"));
    if (s.equalsIgnoreCase("false")) {
      this.allowOpenEndedRange = false;
    }
    n = Val.chkInt(params.getValue("timeperiod.maxIntervalsPerDocument"),-1);
    if (n >= 0) {
      this.maxIntervalsPerDocument = n;
    }
  }
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.