|
Mura CMS 6.1 | ||||
FRAMES |
railo-context.Componentmura.javaloader.JavaLoader
public class JavaLoader
Loads External Java Classes, while providing access to ColdFusion classes
Constructor Summary | |
---|---|
init([array loadPaths='[runtime expression]'], [boolean loadColdFusionClassPath='false'], [any parentClassLoader=''], [array sourceDirectories], [string compileDirectory='[runtime expression]'], [boolean trustedSource='false'])
Constructor |
Method Summary | |
---|---|
private string |
calculateJarName(array directoryArray)
returns the jar file name for a directory array |
private mura.javaloader.datetime |
calculateSourceLastModified()
returns what the source last modified was |
private void |
compileSource()
compile dynamic source |
any |
create(string className)
Retrieves a reference to the java class |
private any |
createJavaProxy(any class)
create a javaproxy, dependent on CF server settings |
private any |
createJavaProxyCFC(any class)
create a javaproxy, dependent on CF server settings |
private any |
createWithSourceCheck(string className)
does the create call, but first makes a source check |
private any |
directoryCopy(string source, string destination, any nameconflict='overwrite')
|
private void |
ensureNetworkClassLoaderOnServerScope()
makes sure there is a URL class loader on the server scope that can load me up some networkClassLoader goodness |
private array |
getClassLoadPaths()
|
private string |
getCompileDirectory()
|
private JavaCompiler |
getJavaCompiler()
|
private any |
getParentClassLoader()
|
private any |
getServerURLClassLoader()
returns the server URL class loader |
private array |
getSourceDirectories()
|
private mura.javaloader.datetime |
getSourceLastModified()
|
any |
getURLClassLoader()
Returns the com |
string |
getVersion()
Retrieves the version of the loader you are using |
private boolean |
hasJavaCompiler()
whether this object has a javaCompiler |
private boolean |
hasSourceLastModified()
whether this object has a sourceLastModified |
private string |
initUseJavaProxyCFC()
initialise whether or not to use the JavaProxy CFC instead of the coldfusion java object |
private boolean |
isTrustedSource()
|
private void |
loadClasses()
loads up the classes in the system |
private array |
queryJars()
pulls a query of all the jars in the /resources/lib folder |
private void |
setClassLoadPaths(array classLoadPaths)
|
private void |
setCompileDirectory(string compileDirectory)
|
private void |
setJavaCompiler(JavaCompiler javaCompiler)
|
private void |
setParentClassLoader(any parentClassLoader)
|
private void |
setSourceDirectories(array sourceDirectories)
|
private void |
setSourceLastModified(date sourceLastModified)
|
private void |
setTrustedSource(boolean isTrustedSource)
|
private void |
setURLClassLoader(any ClassLoader)
|
private any |
throwException(string type, string message, [string detail=''])
Throws an Exception |
Methods inherited from class railo-context.Component |
---|
|
Constructor Detail |
---|
public init([array loadPaths='[runtime expression]'], [boolean loadColdFusionClassPath='false'], [any parentClassLoader=''], [array sourceDirectories], [string compileDirectory='[runtime expression]'], [boolean trustedSource='false'])
loadPaths
- An array of directories of classes, or paths to .jar files to loadloadColdFusionClassPath
- Loads the ColdFusion librariesparentClassLoader
- (Expert use only) The parent java.lang.ClassLoader to set when creating the URLClassLoadersourceDirectories
- Directories that contain Java source code that are to be dynamically compiledcompileDirectory
- the directory to build the .jar file for dynamic compilation in, defaults to ./tmptrustedSource
- Whether or not the source is trusted, i.e. it is going to change? Defaults to false, so changes will be recompiled and loadedMethod Detail |
---|
private string calculateJarName(array directoryArray)
directoryArray
- array of directories to compileprivate mura.javaloader.datetime calculateSourceLastModified()
private void compileSource()
public any create(string className)
className
- The name of the class to createprivate any createJavaProxy(any class)
class
- the java class to create the proxy withprivate any createJavaProxyCFC(any class)
class
- the java class to create the proxy withprivate any createWithSourceCheck(string className)
className
- The name of the class to createprivate any directoryCopy(string source, string destination, any nameconflict='overwrite')
source
destination
nameconflict
private void ensureNetworkClassLoaderOnServerScope()
private array getClassLoadPaths()
private string getCompileDirectory()
private JavaCompiler getJavaCompiler()
private any getParentClassLoader()
private any getServerURLClassLoader()
private array getSourceDirectories()
private mura.javaloader.datetime getSourceLastModified()
public any getURLClassLoader()
public string getVersion()
private boolean hasJavaCompiler()
private boolean hasSourceLastModified()
private string initUseJavaProxyCFC()
private boolean isTrustedSource()
private void loadClasses()
private array queryJars()
private void setClassLoadPaths(array classLoadPaths)
classLoadPaths
private void setCompileDirectory(string compileDirectory)
compileDirectory
private void setJavaCompiler(JavaCompiler javaCompiler)
javaCompiler
private void setParentClassLoader(any parentClassLoader)
parentClassLoader
private void setSourceDirectories(array sourceDirectories)
sourceDirectories
private void setSourceLastModified(date sourceLastModified)
sourceLastModified
private void setTrustedSource(boolean isTrustedSource)
isTrustedSource
private void setURLClassLoader(any ClassLoader)
ClassLoader
private any throwException(string type, string message, [string detail=''])
type
- The type of exceptionmessage
- The message to accompany the exceptiondetail
- The detail message for the exception
|
Mura CMS 6.1 | ||||
FRAMES |