Package net.sf.pipet.api

Examples of net.sf.pipet.api.InvalidConfigurationException


      XPath xpath = xpathfactory.newXPath();
      return (NodeList)xpath.evaluate(expression, dom, XPathConstants.NODESET);
    }
    catch (XPathExpressionException e)
    {
      throw new InvalidConfigurationException(String.format("Unable to evaluate X path expression: %s", expression), e);
    }
  }
View Full Code Here


      XPath xpath = xpathfactory.newXPath();
      return (String)xpath.evaluate(expression, dom, XPathConstants.STRING);
    }
    catch (XPathExpressionException e)
    {
      throw new InvalidConfigurationException(String.format("Unable to evaluate X path expression: %s", expression), e);
    }
  }
View Full Code Here

  {
    try
    {
      int val = value.intValue(min);
      if (val < min)
        throw new InvalidConfigurationException(String.format("The value of %s must be %d or greater.", desc, min));
      if (val > max)
        throw new InvalidConfigurationException(String.format("The value of %s must be %d or less.", desc, max));
    }
    catch (NumberFormatException e)
    {
      throw new InvalidConfigurationException(String.format("Illegal value for %s: %s", desc, value.stringValue(null)));
    }
  }
View Full Code Here

 
  private void parsePipelineConfigurationElement(Element elem, ServerConfig cfg) throws InvalidConfigurationException {
    String basepath = elem.hasAttribute("base") ? elem.getAttribute("base") : "/";
   
    if (!elem.hasAttribute("file"))
      throw new InvalidConfigurationException("Missing 'file' attribute in 'setup' element.");

    String filename = elem.getAttribute("file");
    cfg.setPipelineConfiguration(basepath, filename);
  }
View Full Code Here

 
  private void parsePipelineConfigurationScanElement(Element elem, ServerConfig cfg) throws InvalidConfigurationException {
    String basepath = elem.hasAttribute("base") ? elem.getAttribute("base") : "/";
   
    if (!elem.hasAttribute("dir"))
      throw new InvalidConfigurationException("Missing 'dir' attribute in 'scan' element.");

    String dirname = elem.getAttribute("dir");
    cfg.addPipelineConfigurationScanDirectory(basepath, dirname);
  }
View Full Code Here

      DocumentBuilder builder = dbf.newDocumentBuilder();
      dom = builder.parse(is);
    }
    catch (ParserConfigurationException e)
    {
      throw new InvalidConfigurationException("XML parser not available.", e);
    }
    catch (IOException e)
    {
      throw new InvalidConfigurationException("Communication error.", e);
    }
    catch (SAXException e)
    {
      throw new InvalidConfigurationException("Parse error.", e);
    }

    return parseDOM(dom);
  }
View Full Code Here

    return pipelines.get(basepath);
  }
 
  public void setPipelineConfiguration(String basepath, String filename) throws InvalidConfigurationException {
    if (pipelines.containsKey(basepath))
      throw new InvalidConfigurationException("Duplicate base path: "+basepath);
   
    pipelines.put(basepath, filename);
  }
View Full Code Here

    if (spec.equals(IFACE_NOCACHE))
      iface = null;
    else if (spec.equals(IFACE_FILE))
      iface = new FileCache();
    else
      throw new InvalidConfigurationException("Unknown cache interface: "+spec);
   
    return new CachePolicyImpl(name, iface, spec);
  }
View Full Code Here

      XPath xpath = xpathfactory.newXPath();
      return (String)xpath.evaluate(expression, dom, XPathConstants.STRING);
    }
    catch (XPathExpressionException e)
    {
      throw new InvalidConfigurationException(String.format("Unable to evaluate X path expression: %s", expression), e);
    }
  }
View Full Code Here

      DocumentBuilder builder = dbf.newDocumentBuilder();
      dom = builder.parse(is);
    }
    catch (ParserConfigurationException e)
    {
      throw new InvalidConfigurationException("XML parser not available.", e);
    }
    catch (IOException e)
    {
      throw new InvalidConfigurationException("Communication error.", e);
    }
    catch (SAXException e)
    {
      throw new InvalidConfigurationException("Parse error.", e);
    }

    cfg = new EditorConfig();
    cfg.setEnforceConnectorCompatibility(getBooleanAttribute(ATT_ENFORCE_CONNECTOR_COMPATIBILITY, EditorConfig.DEFAULT_ENFORCE_CONNECTOR_COMPATIBILITY, dom));
    cfg.setWorkingFile(getFileAttribute(ATT_WORKING_FILE, null, dom));
View Full Code Here

TOP

Related Classes of net.sf.pipet.api.InvalidConfigurationException

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.