Package com.esri.gpt.catalog.context

Examples of com.esri.gpt.catalog.context.CatalogConfiguration


   * @return the resource identifier
   */
  public static ResourceIdentifier newIdentifier(RequestContext context) {
 
    // initialize
    CatalogConfiguration catCfg = null;
    if (context != null) {
      catCfg = context.getCatalogConfiguration();
    } else {
      ApplicationContext appCtx = ApplicationContext.getInstance();
      catCfg = appCtx.getConfiguration().getCatalogConfiguration();
    }
 
    // look for a configured class name for the resource identifier
    String className = Val.chkStr(catCfg.getParameters().getValue("resourceLinkIdentifier"));
    if (className.length() == 0) {
      className = com.esri.gpt.catalog.search.ResourceIdentifier.class.getName();
    }
 
    // instantiate the object
View Full Code Here


   * /gptConfig/catalog/parameter@key="assertion.AsnFactory"
   * @param requestContext the active request context
   * @return the factory
   */
  public static AsnFactory newFactory(RequestContext requestContext) {
    CatalogConfiguration catCfg = null;
    if (requestContext != null) {
      catCfg = requestContext.getCatalogConfiguration();
    } else {
      catCfg = ApplicationContext.getInstance().getConfiguration().getCatalogConfiguration();
    }
   
    String key = "assertion.AsnFactory";
    String className = Val.chkStr(catCfg.getParameters().getValue(key));
    if (className.length() == 0) {
      return new AsnFactory();
    } else {

      try {
View Full Code Here

private int readImsOwnerId(Connection con) throws SQLException {
  int nUserId = -1;
  PreparedStatement st = null;
  try {
    boolean bQuery = true;
    CatalogConfiguration config = getRequestContext().getCatalogConfiguration();
    String sUserTable = config.getUserTableName();
    String sDN = getQueryCriteria().getOwner();

    // only an administrator can query all records
    if (sDN.length() == 0) {
      if (getPublisher().getIsAdministrator()) {
View Full Code Here

private String readImsOwnerName(Connection con) throws SQLException {
  String sImsOwnerName = "-1";
  PreparedStatement st = null;
  try {
    boolean bQuery = true;
    CatalogConfiguration config = getRequestContext().getCatalogConfiguration();
    String sUserTable = config.getUserTableName();
    String sDN = getQueryCriteria().getOwner();

    // only an administrator can query all records
    if (sDN.length() == 0) {
      if (getPublisher().getIsAdministrator()) {
View Full Code Here

    }
    if (messageBroker == null) {
      messageBroker = new MessageBroker();
      messageBroker.setBundleBaseName("gpt.resources.gpt");
    }
    CatalogConfiguration catCfg = context.getCatalogConfiguration();
 
    // look for a configured class name for the resource link builder
    String className = Val.chkStr(catCfg.getParameters().getValue("restUrlBuilder"));
    if (className.length() == 0) {
      className = com.esri.gpt.catalog.search.RestUrlBuilder.class.getName();
    }
 
    // instantiate the builder
View Full Code Here

      }
     
      // add additional indexable fields based upon the SQL database record
      boolean bReadDB = true;
      if (bReadDB) {
        CatalogConfiguration cfg = this.getRequestContext().getCatalogConfiguration();
        this.getRequestContext().getCatalogConfiguration().getResourceTableName();
        String sql = "SELECT SITEUUID, TITLE FROM "+cfg.getResourceTableName()+" WHERE DOCUUID=?";
        Connection con = this.returnConnection().getJdbcConnection();
        this.logExpression(sql);
        st = con.prepareStatement(sql);
        st.setString(1,uuid);
        ResultSet rs = st.executeQuery();
View Full Code Here

  /**
   * Constructs with an associated request context.
   * @param requestContext the active request context
   */
  public StatsRequest(RequestContext requestContext) {
    CatalogConfiguration catCfg = requestContext.getCatalogConfiguration();
    PropertyMeanings meanings = catCfg.getConfiguredSchemas().getPropertyMeanings();
    this.requestContext = requestContext;
    this.storeables = new Storeables(meanings);
    if ((requestContext != null) && (requestContext.getServletRequest() != null) &&
        (requestContext.getServletRequest() instanceof HttpServletRequest)) {
      HttpServletRequest http = (HttpServletRequest)requestContext.getServletRequest();
View Full Code Here

    this.requestParameterMap = request.getParameterMap();
    this.requestContext  = context;
    this.restQuery = query;
   
    // determine the aliased discoverables
    CatalogConfiguration catCfg = this.requestContext.getCatalogConfiguration();
    PropertyMeanings propertyMeanings = catCfg.getConfiguredSchemas().getPropertyMeanings();
    setDiscoverables(propertyMeanings.getDcPropertySets().getAllAliased());
   
    // establish RSS provider and source URLs
    String basePath = RequestContext.resolveBaseContextPath(request);
    getQuery().setRssProviderUrl(catCfg.getParameters().getValue("rssProviderUrl"));
    if (getQuery().getRssProviderUrl().length() == 0) {
      getQuery().setRssProviderUrl(basePath);
    }
    String sourceURL = basePath+"/rest/find/document";
    String queryString = request.getQueryString();
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
    if (className.length() == 0) {
      return new LiveDataRendererFactoryBuilder();
    } else {
View Full Code Here

TOP

Related Classes of com.esri.gpt.catalog.context.CatalogConfiguration

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.