Package org.jboss.cache.util

Examples of org.jboss.cache.util.FileLookup


    *
    * @see org.jboss.cache.util.FileLookup
    */
   public Configuration parseFile(String filename)
   {
      InputStream is = new FileLookup().lookupFile(filename);
      if (is == null)
      {
         throw new ConfigurationException("Unable to find config file " + filename + " either in classpath or on the filesystem!");
      }
      return parseStream(is);
View Full Code Here


      // first see if a configFile is provided
      String cfgFile = getAttributeValue(element, "configFile");
      if (existsAttribute(cfgFile))
      {
         // try and load this file
         URL u = new FileLookup().lookupFileLocation(cfgFile);
         config.setJgroupsConfigFile(u);
      }
      else
      {
         String multiplexerStack = getAttributeValue(element, "multiplexerStack");
View Full Code Here

    *
    * @see org.jboss.cache.util.FileLookup
    */
   public Configuration parseFile(String filename)
   {
      InputStream is = new FileLookup().lookupFile(filename);
      if (is == null)
      {
         throw new ConfigurationException("Unable to find config file " + filename + " either in classpath or on the filesystem!");
      }
      return parseStream(is);
View Full Code Here

      // first see if a configFile is provided
      String cfgFile = getAttributeValue(element, "configFile");
      if (existsAttribute(cfgFile))
      {
         // try and load this file
         URL u = new FileLookup().lookupFileLocation(cfgFile);
         config.setJgroupsConfigFile(u);
      }
      else
      {
         String multiplexerStack = getAttributeValue(element, "multiplexerStack");
View Full Code Here

   private static final Log log = LogFactory.getLog(CacheConfigsXmlParser.class);


   public Map<String, Configuration> parseConfigs(String fileName) throws CloneNotSupportedException
   {
      FileLookup fileLookup = new FileLookup();
      InputStream is = fileLookup.lookupFile(fileName);
      if (is == null)
      {
         throw new ConfigurationException("Unable to find config file " + fileName + " either in classpath or on the filesystem!");
      }
View Full Code Here

    * as <b>is</b>. Transformation is performed according to the <b>xsltFile</b>. The xslt file is looked up using a
    * {@link org.jboss.cache.util.FileLookup}
    */
   public void parse(InputStream is, OutputStream os, String xsltFile) throws Exception
   {
      InputStream xsltInStream = new FileLookup().lookupFile(xsltFile);

      Document document = getInputDocument(is);

      // Use a Transformer for output
      Transformer transformer = getTransformer(xsltInStream);
View Full Code Here

    * as <b>inputFile</b>. Transformation is performed according to the <b>xsltFile</b>. Both <b>inputFile</b> and he xslt
    * file are looked up using a {@link org.jboss.cache.util.FileLookup}
    */
   public void parse(String inputFile, OutputStream os, String xsltFile) throws Exception
   {
      InputStream stream = new FileLookup().lookupFile(inputFile);
      try
      {
         parse(stream, os, xsltFile);
      }
      finally
View Full Code Here

    * @param filename the name of the XML file to parse.
    * @return a configured Configuration object representing the configuration in the file
    */
   public Configuration parseFile(String filename)
   {
      InputStream is = new FileLookup().lookupFile(filename);
      if (is == null)
      {
         throw new ConfigurationException("Unable to find config file " + filename + " either in classpath or on the filesystem!");
      }

View Full Code Here

   {

      public Configuration parseFile(String filename, CacheMode mode)
      {
         String finalFileName = filename == null ? DEFAULT_CONFIGURATION_FILE : filename;
         return parseStream(new FileLookup().lookupFile(finalFileName), mode);
      }
View Full Code Here

   private static final String NAME = "name";
   private static final String CONFIG = "config";

   public static Map<String, Element> getStackConfigs(String stacksXmlResource) throws Exception
   {
      FileLookup fileLookup = new FileLookup();
      InputStream is = fileLookup.lookupFile(stacksXmlResource);
      if (is == null)
      {
         throw new ConfigurationException("Unable to find config file " + stacksXmlResource + " either in classpath or on the filesystem!");
      }
     
View Full Code Here

TOP

Related Classes of org.jboss.cache.util.FileLookup

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.