Examples of Catalog


Examples of org.apache.commons.chain.Catalog

   /**
    * @return default catalog
    */
   public Catalog getCatalog()
   {
      Catalog catalog = catalogFactory.getCatalog();
      return catalog;
   }
View Full Code Here

Examples of org.apache.commons.chain.Catalog

    * @param name
    * @return named catalog
    */
   public Catalog getCatalog(String name)
   {
      Catalog catalog = catalogFactory.getCatalog(name);
      return catalog;

   }
View Full Code Here

Examples of org.apache.commons.chain.Catalog

     * @throws IllegalArgumentException If catalog cannot be found
     * @throws IllegalStateException    If command property is not specified
     */
    protected Command lookupExceptionCommand() {
        String catalogName = getCatalogName();
        Catalog catalog;

        if (catalogName == null) {
            catalog = CatalogFactory.getInstance().getCatalog();

            if (catalog == null) {
                LOG.error("Cannot find default catalog");
                throw new IllegalArgumentException(
                    "Cannot find default catalog");
            }
        } else {
            catalog = CatalogFactory.getInstance().getCatalog(catalogName);

            if (catalog == null) {
                LOG.error("Cannot find catalog '" + catalogName + "'");
                throw new IllegalArgumentException("Cannot find catalog '"
                    + catalogName + "'");
            }
        }

        String exceptionCommand = getExceptionCommand();

        if (exceptionCommand == null) {
            LOG.error("No exceptionCommand property specified");
            throw new IllegalStateException(
                "No exceptionCommand property specfied");
        }

        return catalog.getCommand(exceptionCommand);
    }
View Full Code Here

Examples of org.apache.commons.chain.Catalog

     * @return The Command to process for this Context
     */
    protected Command getCommand(Context context) {
        CatalogFactory catalogFactory = CatalogFactory.getInstance();
        String catalogName = getCatalogName();
        Catalog catalog;

        if (catalogName == null) {
            catalog = catalogFactory.getCatalog();
            catalogName = "{default}"; // for debugging purposes
        } else {
            catalog = catalogFactory.getCatalog(catalogName);
        }

        if (catalog == null) {
            throw new IllegalArgumentException("Cannot find catalog '"
                + catalogName + "'");
        }

        Command command;
        String name = getName();

        if (name == null) {
            name = (String) context.get(getNameKey());
        }

        if (name != null) {
            if (LOG.isDebugEnabled()) {
                LOG.debug("Lookup command " + name + " in catalog "
                    + catalogName);
            }

            command = catalog.getCommand(name);

            if (LOG.isDebugEnabled()) {
                LOG.debug("Found command " + command + ";" + " optional: "
                    + isOptional());
            }
View Full Code Here

Examples of org.apache.commons.chain.Catalog

    protected Command getCommand(String commandName, String catalogName) {
        if (commandName == null) {
            return null;
        }

        Catalog catalog;

        if (catalogName != null) {
            catalog = CatalogFactory.getInstance().getCatalog(catalogName);

            if (catalog == null) {
                LOG.warn("When looking up " + commandName + ","
                    + " no catalog found under " + catalogName);

                return null;
            }
        } else {
            catalogName = "the default catalog";
            catalog = CatalogFactory.getInstance().getCatalog();

            if (catalog == null) {
                LOG.warn("When looking up " + commandName + ","
                    + " no default catalog found.");

                return null;
            }
        }

        if (LOG.isDebugEnabled()) {
            LOG.debug("looking up command " + commandName + " in "
                + catalogName);
        }

        return catalog.getCommand(commandName);
    }
View Full Code Here

Examples of org.apache.jetspeed.om.cms.Catalog

                     
            // get all catalogs objects used for the "catalog path"
            Vector catalogPath = this.getCmsManager().getCatalogs(fromcatalogName, tocatalogName);
           
            // get the catalog selected in the velocity template
            Catalog catalog = (Catalog) catalogPath.lastElement();
            // Retrieve catalog items
            this.getCmsManager().populateCatalog(catalog,true,true,1);
                                   
            // Store the cataloPath collection and the catalog into the portlet session for performance reason
            // (can be used by the customizer without a second retrieve in the cms repository          
View Full Code Here

Examples of org.apache.oodt.cas.catalog.system.Catalog

  }
 
  public void addCatalog(String catalogId, Index index) throws CatalogServiceException {
    if (!this.containsCatalog(catalogId)) {
      try {
        this.replaceCatalog(new Catalog(catalogId, index, null, false, false));
      }catch (Exception e) {
       
      }
    } else {
      LOG.log(Level.WARNING, "Attempt to override an existing catalog '" + catalogId + "' already used in CatalogService, remedy and retry add -- no changes took place!");
View Full Code Here

Examples of org.apache.oodt.cas.catalog.system.Catalog

  }
 
  public void addCatalog(String catalogId, Index index, List<Dictionary> dictionaries) throws CatalogServiceException {
    if (!this.containsCatalog(catalogId)) {
      try {
        this.replaceCatalog(new Catalog(catalogId, index, dictionaries, false, false));
      }catch (Exception e) {
       
      }
    } else {
      LOG.log(Level.WARNING, "Attempt to override an existing catalog '" + catalogId + "' already used in CatalogService, remedy and retry add -- no changes took place!");
View Full Code Here

Examples of org.apache.oodt.cas.catalog.system.Catalog

  }

  public void addCatalog(String catalogId, Index index, List<Dictionary> dictionaries, boolean restrictQueryPermission, boolean restrictIngestPermission) throws CatalogServiceException {
    if (!this.containsCatalog(catalogId)) {
      try {
        this.replaceCatalog(new Catalog(catalogId, index, dictionaries, restrictQueryPermission, restrictIngestPermission));
      }catch (Exception e) {
       
      }
    } else {
      LOG.log(Level.WARNING, "Attempt to override an existing catalog '" + catalogId + "' already used in CatalogService, remedy and retry add -- no changes took place!");
View Full Code Here

Examples of org.apache.oodt.cas.catalog.system.Catalog

   * @param catalogUrn
   * @throws CatalogServiceException
   */
  public void removeCatalog(String catalogId, boolean preserveMapping) throws CatalogServiceException {
      this.catalogsLock.readLock().lock();
      Catalog rmCatalog = null;
      try {
        for (Catalog catalog : this.catalogs) {
          if (catalog.getId().equals(catalogId)) {
            rmCatalog = catalog;
            break;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.