Package com.esri.gpt.framework.collection

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


   * @throws CatalogIndexException is an exception occurs while writing to the index
   */
  private void reindex (Publisher publisher, StringSet uuids)
    throws SQLException, CatalogIndexException {
    if (uuids.size() == 0) return;
    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


    HttpServletResponse response,
    RequestContext context
    ) throws Exception {
  FeedWriter2 fW = null;
 
  StringAttributeMap attributeMap =
    context.getCatalogConfiguration().getParameters();
  /*for(Entry<String, StringAttribute> entry :  attributeMap.entrySet()) {
    if(entry.getKey().toLowerCase()) {
     
    }
View Full Code Here

protected boolean checkHasManageUsers(RequestContext context) {
  boolean umHasDeleteUserLink = false;
  UsernamePasswordCredentials upc = context.getIdentityConfiguration().getSimpleConfiguration().getServiceAccountCredentials();
  if(upc !=null) return umHasDeleteUserLink;
 
  StringAttributeMap umParameters = context.getCatalogConfiguration().getParameters();
  if(umParameters.containsKey("ldap.identity.manage.userRoleEnabled")){ 
    String umHasDeleteUserLinkEnabled = com.esri.gpt.framework.util.Val.chkStr(umParameters.getValue("ldap.identity.manage.userRoleEnabled"));
    umHasDeleteUserLink = Boolean.valueOf(umHasDeleteUserLinkEnabled);
  }
  return umHasDeleteUserLink;
}
View Full Code Here

* @param context the current request context
* @return true is the functionality is enabled
*/
private boolean checkHasDeleteUser(RequestContext context) {
  boolean umHasDeleteUserButton = false;
  StringAttributeMap umParameters = context.getCatalogConfiguration().getParameters();
  if(umParameters.containsKey("ldap.identity.manage.userRoleEnabled")){ 
     String umDeleteUserButtonEnabled = com.esri.gpt.framework.util.Val.chkStr(umParameters.getValue("ldap.identity.manage.userRoleEnabled"));
     umHasDeleteUserButton = Boolean.valueOf(umDeleteUserButtonEnabled);
  }
  return umHasDeleteUserButton;
}
View Full Code Here

* @param context the current request context
* @return true is the functionality is enabled
*/
protected boolean checkIfAllowConfigured(RequestContext context) {
  boolean bCheckIfAllowed = false;
  StringAttributeMap umParameters = context.getCatalogConfiguration().getParameters();
  if(umParameters.containsKey("ldap.identity.restrictToConfiguredRoles")){ 
     String sCheckIfAllowed = com.esri.gpt.framework.util.Val.chkStr(umParameters.getValue("ldap.identity.restrictToConfiguredRoles"));
     bCheckIfAllowed = Boolean.valueOf(sCheckIfAllowed);
  }
  return bCheckIfAllowed;
}
View Full Code Here

* @throws SchemaException if parsing document failed
*/
private void printXml(RequestContext context, PrintWriter writer, String sMetadata)
  throws SearchException, SchemaException {
 
  StringAttributeMap params = context.getCatalogConfiguration().getParameters();
  String s = Val.chkStr(params.getValue("RestServlet.printXml.stripStyleSheets"));
  boolean bStripStyleSheets = s.equalsIgnoreCase("true");
  if (bStripStyleSheets) {
    //sMetadata = sMetadata.replaceAll("<\\?xml\\-stylesheet.*\\?>|<\\!DOCTYPE.*>","");
    sMetadata = sMetadata.replaceAll("<\\?xml\\-stylesheet.+?>|<\\!DOCTYPE.+?>","");
  }
View Full Code Here

          JSONObject candidateLocation = candidateObj.getJSONObject("location");
          long candidateScore = candidateObj.getLong("score");
          JSONObject candidateAttributes = candidateObj.getJSONObject("attributes");
          double candidateX = candidateLocation.getDouble("x");
          double candidateY = candidateLocation.getDouble("y");
          StringAttributeMap attributes = new StringAttributeMap();
          JSONArray names = candidateAttributes.names();
          for (int n = 0; n < (names != null ? names.length() : 0); n++) {
            String name = names.getString(n);
            String value = candidateAttributes.getString(name);
            attributes.add(new StringAttribute(name, value));
          }

          Candidate candidate = new Candidate();
          candidate.setAddress(candidateAddress);
          candidate.setLocation(new double[]{candidateX, candidateY});
View Full Code Here

   
    //String sXsltPath = Val.chkStr(request.getParameter("xslt"));
    //String sMimeType = Val.chkStr(request.getParameter("mimeType"));
    //String sContentDisposition = Val.chkStr(request.getParameter("contentDisposition"));
   
    StringAttributeMap cfgParams = context.getCatalogConfiguration().getParameters();   
    String sCfgPfx = "catalog.cart.processor.mergeThenTransform";
    String sXsltPath = Val.chkStr(
        cfgParams.getValue(sCfgPfx+".xslt"));
    String sProperties = Val.chkStr(
        cfgParams.getValue(sCfgPfx+".xslt.properties"));
    String sMimeType = Val.chkStr(
        cfgParams.getValue(sCfgPfx+".response.mimeType"));
    String sContentDisposition = Val.chkStr(
        cfgParams.getValue(sCfgPfx+".response.contentDisposition"));
   
    if ((keys.length > 0) && (sXsltPath.length() > 0)) {
      XsltTemplate template = this.getCompiledTemplate(sXsltPath);
      ServletOutputStream out = response.getOutputStream();
     
View Full Code Here

  }

  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(",")));
    return set;
  }
View Full Code Here

  }
 
  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.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.