org.openmrs.util
Class ClassLoaderFileOpener

java.lang.Object
  extended by org.openmrs.util.ClassLoaderFileOpener
All Implemented Interfaces:
liquibase.FileOpener

public class ClassLoaderFileOpener
extends java.lang.Object
implements liquibase.FileOpener

Implementation of liquibase FileOpener interface so that the OpenmrsClassLoader will be used to find files (or any other classloader that is passed into the contructor). This allows liquibase xml files in modules to be found.


Constructor Summary
ClassLoaderFileOpener(java.lang.ClassLoader cl)
           
 
Method Summary
 java.io.InputStream getResourceAsStream(java.lang.String file)
           
 java.util.Enumeration<java.net.URL> getResources(java.lang.String packageName)
           
 java.lang.ClassLoader toClassLoader()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassLoaderFileOpener

public ClassLoaderFileOpener(java.lang.ClassLoader cl)
Parameters:
cl - the ClassLoader to use for finding files.
Method Detail

getResourceAsStream

public java.io.InputStream getResourceAsStream(java.lang.String file)
                                        throws java.io.IOException
Specified by:
getResourceAsStream in interface liquibase.FileOpener
Throws:
java.io.IOException

getResources

public java.util.Enumeration<java.net.URL> getResources(java.lang.String packageName)
                                                 throws java.io.IOException
Specified by:
getResources in interface liquibase.FileOpener
Throws:
java.io.IOException

toClassLoader

public java.lang.ClassLoader toClassLoader()
Specified by:
toClassLoader in interface liquibase.FileOpener

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change