diff --git a/README.md b/README.md deleted file mode 100644 index 766361f..0000000 --- a/README.md +++ /dev/null @@ -1,35 +0,0 @@ -JavaLoader 1.2 -============== - -JavaLoader is a library that has been built to ease the use, development and integration of Java within ColdFusion applications. - -It has several key features: - -1. Dynamically loading Java libraries without having to place them on the ColdFusion classpath -1. Dynamically compiling Java code to be utilised within ColdFusion Applications -1. Providing a Java Dynamic Proxy for ColdFusion Components to allow for seamless interoperability between Java and ColdFusion Components -1. Spring integration with ColdFusion Components -1. and more... - -Resources ---------- - -The homepage for JavaLoader can be found at: -http://www.compoundtheory.com/?action=javaloader.index - -To download JavaLoader, [visit RiaForge][1]. ( Trying to keep JavaLoader as the project most downloaded! :) ) - -Documentation for JavaLoader can be found on the [GitHub Wiki][2]. - -The source code can be found in the [GitHub repository][3]. - -Bugs and feature requests can be entered into the [GitHub issue tracker][4]. - -Support can be found through the [JavaLoader Mailing list][5]. - - -[1]: http://javaloader.riaforge.org/index.cfm?event=action.download -[2]: https://github.com/markmandel/JavaLoader/wiki -[3]: https://github.com/markmandel/JavaLoader -[4]: https://github.com/markmandel/JavaLoader/issues -[5]: https://groups.google.com/forum/#!forum/javaloader-dev diff --git a/api/cfcdynamicproxy/allclasses-frame.html b/api/cfcdynamicproxy/allclasses-frame.html new file mode 100644 index 0000000..d4fb56a --- /dev/null +++ b/api/cfcdynamicproxy/allclasses-frame.html @@ -0,0 +1,31 @@ + + + + + + +All Classes + + + + + + + + + + + +All Classes +
+ + + + + +
CFCDynamicProxy +
+
+ + + diff --git a/api/cfcdynamicproxy/allclasses-noframe.html b/api/cfcdynamicproxy/allclasses-noframe.html new file mode 100644 index 0000000..237613b --- /dev/null +++ b/api/cfcdynamicproxy/allclasses-noframe.html @@ -0,0 +1,31 @@ + + + + + + +All Classes + + + + + + + + + + + +All Classes +
+ + + + + +
CFCDynamicProxy +
+
+ + + diff --git a/api/cfcdynamicproxy/com/compoundtheory/coldfusion/cfc/CFCDynamicProxy.html b/api/cfcdynamicproxy/com/compoundtheory/coldfusion/cfc/CFCDynamicProxy.html new file mode 100644 index 0000000..55e316d --- /dev/null +++ b/api/cfcdynamicproxy/com/compoundtheory/coldfusion/cfc/CFCDynamicProxy.html @@ -0,0 +1,478 @@ + + + + + + +CFCDynamicProxy + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +com.compoundtheory.coldfusion.cfc +
+Class CFCDynamicProxy

+
+java.lang.Object
+  extended by com.compoundtheory.coldfusion.cfc.CFCDynamicProxy
+
+
+
All Implemented Interfaces:
java.lang.reflect.InvocationHandler
+
+
+
+
public class CFCDynamicProxy
extends java.lang.Object
implements java.lang.reflect.InvocationHandler
+ + +

+This is a dynamic proxy for ColdFusion components, for complete + interoperability between CFCs and Java objects,. + + Creation of the Proxy is done through one of the several createInstance() methods. +

+ +

+

+
Author:
+
Mark Mandel
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+static java.lang.ObjectcreateInstance(java.io.File path, + java.lang.Class<?>[] interfaces) + +
+          Create a proxy instance
+static java.lang.ObjectcreateInstance(java.io.File path, + java.lang.String[] interfaces) + +
+          Create a proxy instance
+static java.lang.ObjectcreateInstance(java.lang.String path, + java.lang.Class<?>[] interfaces) + +
+          Create a proxy instance
+static java.lang.ObjectcreateInstance(java.lang.String path, + java.util.List<java.lang.String> interfaces) + +
+          Create a proxy instance
+static java.lang.ObjectcreateInstance(java.lang.String path, + java.lang.String[] interfaces) + +
+          Create a proxy instance
+static java.lang.ObjectcreateInstance(coldfusion.runtime.TemplateProxy cfc, + java.lang.Class<?>[] interfaces) + +
+          Create a proxy instance
+static java.lang.ObjectcreateInstance(coldfusion.runtime.TemplateProxy cfc, + java.util.List<java.lang.String> interfaces) + +
+          Create a proxy instance
+static java.lang.ObjectcreateInstance(coldfusion.runtime.TemplateProxy cfc, + java.lang.String[] interfaces) + +
+          Create a proxy instance
+ java.lang.Objectinvoke(java.lang.Object proxy, + java.lang.reflect.Method method, + java.lang.Object[] args) + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Method Detail
+ +

+createInstance

+
+public static java.lang.Object createInstance(java.io.File path,
+                                              java.lang.Class<?>[] interfaces)
+                                       throws java.lang.Throwable
+
+
Create a proxy instance +

+

+
+
+
+
Parameters:
path - The File that points to the CFC
interfaces - the proxy will implement +
Returns:
the proxy that implements the interfaces given +
Throws: +
java.lang.Throwable - if there is an error in the CFC
+
+
+
+ +

+createInstance

+
+public static java.lang.Object createInstance(java.lang.String path,
+                                              java.lang.Class<?>[] interfaces)
+                                       throws java.lang.Throwable
+
+
Create a proxy instance +

+

+
+
+
+
Parameters:
path - Absolute path to the CFC we want to proxy
interfaces - the proxy will implement +
Returns:
the proxy that implements the interfaces given +
Throws: +
java.lang.Throwable - if there is an error in the CFC
+
+
+
+ +

+createInstance

+
+public static java.lang.Object createInstance(java.io.File path,
+                                              java.lang.String[] interfaces)
+                                       throws java.lang.Throwable
+
+
Create a proxy instance +

+

+
+
+
+
Parameters:
path - The File that points to the CFC
interfaces - An array of the names of the classes that this proxy will implement. +
Returns:
the proxy that implements the interfaces given +
Throws: +
java.lang.Throwable - if there is an error in the CFC
+
+
+
+ +

+createInstance

+
+public static java.lang.Object createInstance(java.lang.String path,
+                                              java.lang.String[] interfaces)
+                                       throws java.lang.Throwable
+
+
Create a proxy instance +

+

+
+
+
+
Parameters:
path - Absolute path to the CFC we want to proxy
interfaces - An array of the names of the classes that this proxy will implement. +
Returns:
the proxy that implements the interfaces given +
Throws: +
java.lang.Throwable - if there is an error in the CFC
+
+
+
+ +

+createInstance

+
+public static java.lang.Object createInstance(java.lang.String path,
+                                              java.util.List<java.lang.String> interfaces)
+                                       throws java.lang.Throwable
+
+
Create a proxy instance +

+

+
+
+
+
Parameters:
path - Absolute path to the CFC we want to proxy
interfaces - A List of the names of the classes that this proxy will implement. +
Returns:
the proxy that implements the interfaces given +
Throws: +
java.lang.Throwable - if there is an error in the CFC
+
+
+
+ +

+createInstance

+
+public static java.lang.Object createInstance(coldfusion.runtime.TemplateProxy cfc,
+                                              java.lang.Class<?>[] interfaces)
+
+
Create a proxy instance +

+

+
+
+
+
Parameters:
cfc - An actual CFC to pass in to the proxy.
interfaces - the proxy will implement +
Returns:
the proxy that implements the interfaces given
+
+
+
+ +

+createInstance

+
+public static java.lang.Object createInstance(coldfusion.runtime.TemplateProxy cfc,
+                                              java.lang.String[] interfaces)
+                                       throws java.lang.Throwable
+
+
Create a proxy instance +

+

+
+
+
+
Parameters:
cfc - An actual CFC to pass in to the proxy.
interfaces - An array of the names of the classes that this proxy will implement. +
Returns:
the proxy that implements the interfaces given +
Throws: +
java.lang.Throwable - if there is an error in the CFC
+
+
+
+ +

+createInstance

+
+public static java.lang.Object createInstance(coldfusion.runtime.TemplateProxy cfc,
+                                              java.util.List<java.lang.String> interfaces)
+                                       throws java.lang.Throwable
+
+
Create a proxy instance +

+

+
+
+
+
Parameters:
cfc - An actual CFC to pass in to the proxy.
interfaces - A List of the names of the classes that this proxy will implement. +
Returns:
the proxy that implements the interfaces given +
Throws: +
java.lang.Throwable - if there is an error in the CFC
+
+
+
+ +

+invoke

+
+public java.lang.Object invoke(java.lang.Object proxy,
+                               java.lang.reflect.Method method,
+                               java.lang.Object[] args)
+                        throws java.lang.Throwable
+
+
+
Specified by:
invoke in interface java.lang.reflect.InvocationHandler
+
+
+ +
Throws: +
java.lang.Throwable
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/cfcdynamicproxy/com/compoundtheory/coldfusion/cfc/class-use/CFCDynamicProxy.html b/api/cfcdynamicproxy/com/compoundtheory/coldfusion/cfc/class-use/CFCDynamicProxy.html new file mode 100644 index 0000000..915d59b --- /dev/null +++ b/api/cfcdynamicproxy/com/compoundtheory/coldfusion/cfc/class-use/CFCDynamicProxy.html @@ -0,0 +1,142 @@ + + + + + + +Uses of Class com.compoundtheory.coldfusion.cfc.CFCDynamicProxy + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
com.compoundtheory.coldfusion.cfc.CFCDynamicProxy

+
+No usage of com.compoundtheory.coldfusion.cfc.CFCDynamicProxy +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/cfcdynamicproxy/com/compoundtheory/coldfusion/cfc/package-frame.html b/api/cfcdynamicproxy/com/compoundtheory/coldfusion/cfc/package-frame.html new file mode 100644 index 0000000..6f6ccc3 --- /dev/null +++ b/api/cfcdynamicproxy/com/compoundtheory/coldfusion/cfc/package-frame.html @@ -0,0 +1,32 @@ + + + + + + +com.compoundtheory.coldfusion.cfc + + + + + + + + + + + +com.compoundtheory.coldfusion.cfc + + + + +
+Classes  + +
+CFCDynamicProxy
+ + + + diff --git a/api/cfcdynamicproxy/com/compoundtheory/coldfusion/cfc/package-summary.html b/api/cfcdynamicproxy/com/compoundtheory/coldfusion/cfc/package-summary.html new file mode 100644 index 0000000..fef3320 --- /dev/null +++ b/api/cfcdynamicproxy/com/compoundtheory/coldfusion/cfc/package-summary.html @@ -0,0 +1,156 @@ + + + + + + +com.compoundtheory.coldfusion.cfc + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

+Package com.compoundtheory.coldfusion.cfc +

+ + + + + + + + + +
+Class Summary
CFCDynamicProxyThis is a dynamic proxy for ColdFusion components, for complete + interoperability between CFCs and Java objects,.
+  + +

+

+
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/cfcdynamicproxy/com/compoundtheory/coldfusion/cfc/package-tree.html b/api/cfcdynamicproxy/com/compoundtheory/coldfusion/cfc/package-tree.html new file mode 100644 index 0000000..8c20a54 --- /dev/null +++ b/api/cfcdynamicproxy/com/compoundtheory/coldfusion/cfc/package-tree.html @@ -0,0 +1,149 @@ + + + + + + +com.compoundtheory.coldfusion.cfc Class Hierarchy + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Hierarchy For Package com.compoundtheory.coldfusion.cfc +

+
+

+Class Hierarchy +

+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/cfcdynamicproxy/com/compoundtheory/coldfusion/cfc/package-use.html b/api/cfcdynamicproxy/com/compoundtheory/coldfusion/cfc/package-use.html new file mode 100644 index 0000000..efe102f --- /dev/null +++ b/api/cfcdynamicproxy/com/compoundtheory/coldfusion/cfc/package-use.html @@ -0,0 +1,142 @@ + + + + + + +Uses of Package com.compoundtheory.coldfusion.cfc + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Package
com.compoundtheory.coldfusion.cfc

+
+No usage of com.compoundtheory.coldfusion.cfc +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/cfcdynamicproxy/constant-values.html b/api/cfcdynamicproxy/constant-values.html new file mode 100644 index 0000000..368ee43 --- /dev/null +++ b/api/cfcdynamicproxy/constant-values.html @@ -0,0 +1,144 @@ + + + + + + +Constant Field Values + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Constant Field Values

+
+
+Contents + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/cfcdynamicproxy/deprecated-list.html b/api/cfcdynamicproxy/deprecated-list.html new file mode 100644 index 0000000..679699c --- /dev/null +++ b/api/cfcdynamicproxy/deprecated-list.html @@ -0,0 +1,144 @@ + + + + + + +Deprecated List + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Deprecated API

+
+
+Contents + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/cfcdynamicproxy/help-doc.html b/api/cfcdynamicproxy/help-doc.html new file mode 100644 index 0000000..4e27cb1 --- /dev/null +++ b/api/cfcdynamicproxy/help-doc.html @@ -0,0 +1,215 @@ + + + + + + +API Help + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+How This API Document Is Organized

+
+This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

+Package

+
+ +

+Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

+
+

+Class/Interface

+
+ +

+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+ +

+Annotation Type

+
+ +

+Each annotation type has its own separate page with the following sections:

+
+ +

+Enum

+
+ +

+Each enum has its own separate page with the following sections:

+
+

+Use

+
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
+

+Tree (Class Hierarchy)

+
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object. +
+

+Deprecated API

+
+The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+

+Index

+
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+

+Prev/Next

+These links take you to the next or previous class, interface, package, or related page.

+Frames/No Frames

+These links show and hide the HTML frames. All pages are available with or without frames. +

+

+Serialized Form

+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description. +

+

+Constant Field Values

+The Constant Field Values page lists the static final fields and their values. +

+ + +This help file applies to API documentation generated using the standard doclet. + +
+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/cfcdynamicproxy/index-files/index-1.html b/api/cfcdynamicproxy/index-files/index-1.html new file mode 100644 index 0000000..0e0db86 --- /dev/null +++ b/api/cfcdynamicproxy/index-files/index-1.html @@ -0,0 +1,165 @@ + + + + + + +C-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +C I
+

+C

+
+
CFCDynamicProxy - Class in com.compoundtheory.coldfusion.cfc
This is a dynamic proxy for ColdFusion components, for complete + interoperability between CFCs and Java objects,.
com.compoundtheory.coldfusion.cfc - package com.compoundtheory.coldfusion.cfc
 
createInstance(File, Class<?>[]) - +Static method in class com.compoundtheory.coldfusion.cfc.CFCDynamicProxy +
Create a proxy instance +
createInstance(String, Class<?>[]) - +Static method in class com.compoundtheory.coldfusion.cfc.CFCDynamicProxy +
Create a proxy instance +
createInstance(File, String[]) - +Static method in class com.compoundtheory.coldfusion.cfc.CFCDynamicProxy +
Create a proxy instance +
createInstance(String, String[]) - +Static method in class com.compoundtheory.coldfusion.cfc.CFCDynamicProxy +
Create a proxy instance +
createInstance(String, List<String>) - +Static method in class com.compoundtheory.coldfusion.cfc.CFCDynamicProxy +
Create a proxy instance +
createInstance(TemplateProxy, Class<?>[]) - +Static method in class com.compoundtheory.coldfusion.cfc.CFCDynamicProxy +
Create a proxy instance +
createInstance(TemplateProxy, String[]) - +Static method in class com.compoundtheory.coldfusion.cfc.CFCDynamicProxy +
Create a proxy instance +
createInstance(TemplateProxy, List<String>) - +Static method in class com.compoundtheory.coldfusion.cfc.CFCDynamicProxy +
Create a proxy instance +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +C I
+ + + diff --git a/api/cfcdynamicproxy/index-files/index-2.html b/api/cfcdynamicproxy/index-files/index-2.html new file mode 100644 index 0000000..41adafc --- /dev/null +++ b/api/cfcdynamicproxy/index-files/index-2.html @@ -0,0 +1,143 @@ + + + + + + +I-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +C I
+

+I

+
+
invoke(Object, Method, Object[]) - +Method in class com.compoundtheory.coldfusion.cfc.CFCDynamicProxy +
  +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +C I
+ + + diff --git a/api/cfcdynamicproxy/index.html b/api/cfcdynamicproxy/index.html new file mode 100644 index 0000000..ed42799 --- /dev/null +++ b/api/cfcdynamicproxy/index.html @@ -0,0 +1,36 @@ + + + + + + +Generated Documentation (Untitled) + + + + + + + + +<H2> +Frame Alert</H2> + +<P> +This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. +<BR> +Link to<A HREF="com/compoundtheory/coldfusion/cfc/package-summary.html">Non-frame version.</A> + + + diff --git a/api/cfcdynamicproxy/overview-tree.html b/api/cfcdynamicproxy/overview-tree.html new file mode 100644 index 0000000..76ffcc9 --- /dev/null +++ b/api/cfcdynamicproxy/overview-tree.html @@ -0,0 +1,151 @@ + + + + + + +Class Hierarchy + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Hierarchy For All Packages

+
+
+
Package Hierarchies:
com.compoundtheory.coldfusion.cfc
+
+

+Class Hierarchy +

+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/cfcdynamicproxy/package-list b/api/cfcdynamicproxy/package-list new file mode 100644 index 0000000..a4302fe --- /dev/null +++ b/api/cfcdynamicproxy/package-list @@ -0,0 +1 @@ +com.compoundtheory.coldfusion.cfc diff --git a/api/cfcdynamicproxy/resources/inherit.gif b/api/cfcdynamicproxy/resources/inherit.gif new file mode 100644 index 0000000..c814867 Binary files /dev/null and b/api/cfcdynamicproxy/resources/inherit.gif differ diff --git a/api/cfcdynamicproxy/stylesheet.css b/api/cfcdynamicproxy/stylesheet.css new file mode 100644 index 0000000..6ea9e51 --- /dev/null +++ b/api/cfcdynamicproxy/stylesheet.css @@ -0,0 +1,29 @@ +/* Javadoc style sheet */ + +/* Define colors, fonts and other style attributes here to override the defaults */ + +/* Page background color */ +body { background-color: #FFFFFF; color:#000000 } + +/* Headings */ +h1 { font-size: 145% } + +/* Table colors */ +.TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve */ +.TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve */ +.TableRowColor { background: #FFFFFF; color:#000000 } /* White */ + +/* Font used in left-hand frame lists */ +.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 } +.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } +.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } + +/* Navigation bar fonts and colors */ +.NavBarCell1 { background-color:#EEEEFF; color:#000000} /* Light mauve */ +.NavBarCell1Rev { background-color:#00008B; color:#FFFFFF} /* Dark Blue */ +.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;} +.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;} + +.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} +.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} + diff --git a/api/javaloader/allclasses-frame.html b/api/javaloader/allclasses-frame.html new file mode 100644 index 0000000..2a4b3b0 --- /dev/null +++ b/api/javaloader/allclasses-frame.html @@ -0,0 +1,40 @@ + + + + + + + +All Classes + + + + + + + + +All Classes + +
+ + + + + +
+ +JavaCompiler +
+ +JavaLoader +
+ +JavaProxy +
+ +
+
+ + + diff --git a/api/javaloader/index.html b/api/javaloader/index.html new file mode 100644 index 0000000..6b4353e --- /dev/null +++ b/api/javaloader/index.html @@ -0,0 +1,39 @@ + + + + + + +Generated Documentation (JavaLoader - 1.1) + + + + + + + + + + + +<H2> +Frame Alert</H2> + +<P> +This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. +<BR> +Link to<A HREF="overview-summary.html">Non-frame version.</A> + + + diff --git a/api/javaloader/javaloader/JavaCompiler.html b/api/javaloader/javaloader/JavaCompiler.html new file mode 100644 index 0000000..907b9fc --- /dev/null +++ b/api/javaloader/javaloader/JavaCompiler.html @@ -0,0 +1,555 @@ + + + + + + + + +Callable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+JavaLoader - 1.1 + +
+ + + +
+ +

+ +javaloader +
+ +Class +JavaCompiler

+ + + +
WEB-INF.cftags.component
+        extended by javaloader.JavaCompiler
+
+ + + +
+
+
+ + + +
public class JavaCompiler
+
extends WEB-INF.cftags.component
+
+
+ + +

+ Compiles Java source dirs to an array of .jar files. +

+ + +


+ +

+ + + + + + + + + + + + + +
+ Constructor Summary
+ init([string jarDirectory='[runtime expression]']) +
+ + +           Constructor +
+   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+private arrayaddClassLoaderFiles(array options, any classLoader, array directoryArray) +
+ + +          adds a set of files to the file manager from the urlclassloader +
+ anycompile(array directoryArray, [any classLoader], [string jarName='[runtime expression]']) +
+ + +          compiles Java to bytecode, and returns a JAR +
+private anygetCompiler() +
+ +
+private stringgetJarDirectory() +
+ +
+ stringgetVersion() +
+ + +          returns the version number +
+private voidprintln(string str) +
+ +
+private voidsetCompiler(any Compiler) +
+ +
+private voidsetJarDirectory(string jarDirectory) +
+ +
+private anythrowException(string type, string message, [string detail='']) +
+ + +          Throws an Exception +
+ + + +   + + + + + + + + +
Methods inherited from class WEB-INF.cftags.component
+ + + +
+ + +  +

+ + + + + + +

+ + + +
+Constructor Detail
+ +

+ +init

+public init([string jarDirectory='[runtime expression]']) +
+
+Constructor +

+

+ +
+
Parameters:
+ +
jarDirectory - the directory to build the .jar file in, defaults to ./tmp
+ +
+ + +
+ + + + + + + + + + +
+Method Detail
+ +

+ addClassLoaderFiles

+ private array addClassLoaderFiles(array options, any classLoader, array directoryArray) + +
+
+ adds a set of files to the file manager from the urlclassloader +

+

+ + + +
+
Parameters:
+ +
options - the options array
+ +
classLoader - URLClassloader to use as the parent for compilation
+ +
directoryArray - array of directories to compile
+ +
+ + + +
+
+ +

+ compile

+ public any compile(array directoryArray, [any classLoader], [string jarName='[runtime expression]']) + +
+
+ compiles Java to bytecode, and returns a JAR +

+

+ + + +
+
Parameters:
+ +
directoryArray - array of directories to compile
+ +
classLoader - a optional URLClassloader to use as the parent for compilation
+ +
jarName - The name of the jar file. Defaults to a UUID
+ +
+ + + +
+
+ +

+ getCompiler

+ private any getCompiler() + +
+
+ +

+

+ + + + + +
+
+ +

+ getJarDirectory

+ private string getJarDirectory() + +
+
+ +

+

+ + + + + +
+
+ +

+ getVersion

+ public string getVersion() + +
+
+ returns the version number +

+

+ + + + + +
+
+ +

+ println

+ private void println(string str) + +
+
+ +

+

+ + + +
+
Parameters:
+ +
str -
+ +
+ + + +
+
+ +

+ setCompiler

+ private void setCompiler(any Compiler) + +
+
+ +

+

+ + + +
+
Parameters:
+ +
Compiler
+ +
+ + + +
+
+ +

+ setJarDirectory

+ private void setJarDirectory(string jarDirectory) + +
+
+ +

+

+ + + +
+
Parameters:
+ +
jarDirectory
+ +
+ + + +
+
+ +

+ throwException

+ private any throwException(string type, string message, [string detail='']) + +
+
+ Throws an Exception +

+

+ + + +
+
Parameters:
+ +
type - The type of exception
+ +
message - The message to accompany the exception
+ +
detail - The detail message for the exception
+ +
+ + + +
+
+ + + + + + + + + + + + + + + + +
+JavaLoader - 1.1 + +
+ + + +
+ + + diff --git a/api/javaloader/javaloader/JavaLoader.html b/api/javaloader/javaloader/JavaLoader.html new file mode 100644 index 0000000..0a417c2 --- /dev/null +++ b/api/javaloader/javaloader/JavaLoader.html @@ -0,0 +1,1312 @@ + + + + + + + + +Callable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+JavaLoader - 1.1 + +
+ + + +
+ +

+ +javaloader +
+ +Class +JavaLoader

+ + + +
WEB-INF.cftags.component
+        extended by javaloader.JavaLoader
+
+ + + +
+
+
+ + + +
public class JavaLoader
+
extends WEB-INF.cftags.component
+
+
+ + +

+ 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 stringcalculateJarName(array directoryArray) +
+ + +          returns the jar file name for a directory array +
+private datecalculateSourceLastModified() +
+ + +          returns what the source last modified was +
+private voidcompileSource() +
+ + +          compile dynamic source +
+ anycreate(string className) +
+ + +          Retrieves a reference to the java class +
+private anycreateJavaProxy(any class) +
+ + +          create a javaproxy, dependent on CF server settings +
+private anycreateJavaProxyCFC(any class) +
+ + +          create a javaproxy, dependent on CF server settings +
+private anycreateWithSourceCheck(string className) +
+ + +          does the create call, but first makes a source check +
+private anydirectoryCopy(string source, string destination, any nameconflict='overwrite') +
+ +
+private voidensureNetworkClassLoaderOnServerScope() +
+ + +          makes sure there is a URL class loader on the server scope that can load me up some networkClassLoader goodness +
+ arraygetClassLoadPaths() +
+ +
+private stringgetCompileDirectory() +
+ +
+private JavaCompilergetJavaCompiler() +
+ +
+private anygetParentClassLoader() +
+ +
+private anygetServerURLClassLoader() +
+ + +          returns the server URL class loader +
+private arraygetSourceDirectories() +
+ +
+private dategetSourceLastModified() +
+ +
+ anygetURLClassLoader() +
+ + +          Returns the com +
+ stringgetVersion() +
+ + +          Retrieves the version of the loader you are using +
+private booleanhasJavaCompiler() +
+ + +          whether this object has a javaCompiler +
+private booleanhasSourceLastModified() +
+ + +          whether this object has a sourceLastModified +
+private stringinitUseJavaProxyCFC() +
+ + +          initialise whether or not to use the JavaProxy CFC instead of the coldfusion java object +
+private booleanisTrustedSource() +
+ +
+private voidloadClasses() +
+ + +          loads up the classes in the system +
+private arrayqueryJars() +
+ + +          pulls a query of all the jars in the /resources/lib folder +
+private voidsetClassLoadPaths(array classLoadPaths) +
+ +
+private voidsetCompileDirectory(string compileDirectory) +
+ +
+private voidsetJavaCompiler(JavaCompiler javaCompiler) +
+ +
+private voidsetParentClassLoader(any parentClassLoader) +
+ +
+private voidsetSourceDirectories(array sourceDirectories) +
+ +
+private voidsetSourceLastModified(date sourceLastModified) +
+ +
+private voidsetTrustedSource(boolean isTrustedSource) +
+ +
+private voidsetURLClassLoader(any ClassLoader) +
+ +
+ anyswitchThreadContextClassLoader() +
+ + +          Sometimes you will need to switch out the ThreadContextClassLoader with the classloader used by JavaLoader +
+private anythrowException(string type, string message, [string detail='']) +
+ + +          Throws an Exception +
+ + + +   + + + + + + + + +
Methods inherited from class WEB-INF.cftags.component
+ + + +
+ + +  +

+ + + + + + +

+ + + +
+Constructor Detail
+ +

+ +init

+public init([array loadPaths='[runtime expression]'], [boolean loadColdFusionClassPath='false'], [any parentClassLoader=''], [array sourceDirectories], [string compileDirectory='[runtime expression]'], [boolean trustedSource='false']) +
+
+Constructor +

+

+ +
+
Parameters:
+ +
loadPaths - An array of directories of classes, or paths to .jar files to load
+ +
loadColdFusionClassPath - Loads the ColdFusion libraries
+ +
parentClassLoader - (Expert use only) The parent java.lang.ClassLoader to set when creating the URLClassLoader
+ +
sourceDirectories - Directories that contain Java source code that are to be dynamically compiled
+ +
compileDirectory - the directory to build the .jar file for dynamic compilation in, defaults to ./tmp
+ +
trustedSource - Whether or not the source is trusted, i.e. it is going to change? Defaults to false, so changes will be recompiled and loaded
+ +
+ + +
+ + + + + + + + + + +
+Method Detail
+ +

+ calculateJarName

+ private string calculateJarName(array directoryArray) + +
+
+ returns the jar file name for a directory array +

+

+ + + +
+
Parameters:
+ +
directoryArray - array of directories to compile
+ +
+ + + +
+
+ +

+ calculateSourceLastModified

+ private date calculateSourceLastModified() + +
+
+ returns what the source last modified was +

+

+ + + + + +
+
+ +

+ compileSource

+ private void compileSource() + +
+
+ compile dynamic source +

+

+ + + + + +
+
+ +

+ create

+ public any create(string className) + +
+
+ Retrieves a reference to the java class. To create a instance, you must run init() on this object +

+

+ + + +
+
Parameters:
+ +
className - The name of the class to create
+ +
+ + + +
+
+ +

+ createJavaProxy

+ private any createJavaProxy(any class) + +
+
+ create a javaproxy, dependent on CF server settings +

+

+ + + +
+
Parameters:
+ +
class - the java class to create the proxy with
+ +
+ + + +
+
+ +

+ createJavaProxyCFC

+ private any createJavaProxyCFC(any class) + +
+
+ create a javaproxy, dependent on CF server settings +

+

+ + + +
+
Parameters:
+ +
class - the java class to create the proxy with
+ +
+ + + +
+
+ +

+ createWithSourceCheck

+ private any createWithSourceCheck(string className) + +
+
+ does the create call, but first makes a source check +

+

+ + + +
+
Parameters:
+ +
className - The name of the class to create
+ +
+ + + +
+
+ +

+ directoryCopy

+ private any directoryCopy(string source, string destination, any nameconflict='overwrite') + +
+
+ +

+

+ + + +
+
Parameters:
+ +
source
+ +
destination
+ +
nameconflict
+ +
+ + + +
+
+ +

+ ensureNetworkClassLoaderOnServerScope

+ private void ensureNetworkClassLoaderOnServerScope() + +
+
+ makes sure there is a URL class loader on the server scope that can load me up some networkClassLoader goodness +

+

+ + + + + +
+
+ +

+ getClassLoadPaths

+ public array getClassLoadPaths() + +
+
+ +

+

+ + + + + +
+
+ +

+ getCompileDirectory

+ private string getCompileDirectory() + +
+
+ +

+

+ + + + + +
+
+ +

+ getJavaCompiler

+ private JavaCompiler getJavaCompiler() + +
+
+ +

+

+ + + + + +
+
+ +

+ getParentClassLoader

+ private any getParentClassLoader() + +
+
+ +

+

+ + + + + +
+
+ +

+ getServerURLClassLoader

+ private any getServerURLClassLoader() + +
+
+ returns the server URL class loader +

+

+ + + + + +
+
+ +

+ getSourceDirectories

+ private array getSourceDirectories() + +
+
+ +

+

+ + + + + +
+
+ +

+ getSourceLastModified

+ private date getSourceLastModified() + +
+
+ +

+

+ + + + + +
+
+ +

+ getURLClassLoader

+ public any getURLClassLoader() + +
+
+ Returns the com.compoundtheory.classloader.NetworkClassLoader in case you need access to it +

+

+ + + + + +
+
+ +

+ getVersion

+ public string getVersion() + +
+
+ Retrieves the version of the loader you are using +

+

+ + + + + +
+
+ +

+ hasJavaCompiler

+ private boolean hasJavaCompiler() + +
+
+ whether this object has a javaCompiler +

+

+ + + + + +
+
+ +

+ hasSourceLastModified

+ private boolean hasSourceLastModified() + +
+
+ whether this object has a sourceLastModified +

+

+ + + + + +
+
+ +

+ initUseJavaProxyCFC

+ private string initUseJavaProxyCFC() + +
+
+ initialise whether or not to use the JavaProxy CFC instead of the coldfusion java object +

+

+ + + + + +
+
+ +

+ isTrustedSource

+ private boolean isTrustedSource() + +
+
+ +

+

+ + + + + +
+
+ +

+ loadClasses

+ private void loadClasses() + +
+
+ loads up the classes in the system +

+

+ + + + + +
+
+ +

+ queryJars

+ private array queryJars() + +
+
+ pulls a query of all the jars in the /resources/lib folder +

+

+ + + + + +
+
+ +

+ setClassLoadPaths

+ private void setClassLoadPaths(array classLoadPaths) + +
+
+ +

+

+ + + +
+
Parameters:
+ +
classLoadPaths
+ +
+ + + +
+
+ +

+ setCompileDirectory

+ private void setCompileDirectory(string compileDirectory) + +
+
+ +

+

+ + + +
+
Parameters:
+ +
compileDirectory
+ +
+ + + +
+
+ +

+ setJavaCompiler

+ private void setJavaCompiler(JavaCompiler javaCompiler) + +
+
+ +

+

+ + + +
+
Parameters:
+ +
javaCompiler
+ +
+ + + +
+
+ +

+ setParentClassLoader

+ private void setParentClassLoader(any parentClassLoader) + +
+
+ +

+

+ + + +
+
Parameters:
+ +
parentClassLoader
+ +
+ + + +
+
+ +

+ setSourceDirectories

+ private void setSourceDirectories(array sourceDirectories) + +
+
+ +

+

+ + + +
+
Parameters:
+ +
sourceDirectories
+ +
+ + + +
+
+ +

+ setSourceLastModified

+ private void setSourceLastModified(date sourceLastModified) + +
+
+ +

+

+ + + +
+
Parameters:
+ +
sourceLastModified
+ +
+ + + +
+
+ +

+ setTrustedSource

+ private void setTrustedSource(boolean isTrustedSource) + +
+
+ +

+

+ + + +
+
Parameters:
+ +
isTrustedSource
+ +
+ + + +
+
+ +

+ setURLClassLoader

+ private void setURLClassLoader(any ClassLoader) + +
+
+ +

+

+ + + +
+
Parameters:
+ +
ClassLoader
+ +
+ + + +
+
+ +

+ switchThreadContextClassLoader

+ public any switchThreadContextClassLoader() + +
+
+ Sometimes you will need to switch out the ThreadContextClassLoader with the classloader used by JavaLoader.
+ It has : + switchThreadContextClassLoader(function object, [struct function arguments], [classLoader=getURLClassLoader()]) + switchThreadContextClassLoader(function name, [struct function arguments], [classLoader=getURLClassLoader()]) + switchThreadContextClassLoader(object, function name, [struct function arguments], [classLoader=getURLClassLoader()]) + This method can be used in 3 different ways: +
    +
  1. Pass it the UDF itself
  2. +
  3. Pass it the current object and method name that you wish to have called
  4. +
  5. Inject it into your CFC/Page that you want to use, and call it from there, telling it what function to call (you will need to pass in the URLClassLoader)
  6. +
+

+

+ + + + + +
+
+ +

+ throwException

+ private any throwException(string type, string message, [string detail='']) + +
+
+ Throws an Exception +

+

+ + + +
+
Parameters:
+ +
type - The type of exception
+ +
message - The message to accompany the exception
+ +
detail - The detail message for the exception
+ +
+ + + +
+
+ + + + + + + + + + + + + + + + +
+JavaLoader - 1.1 + +
+ + + +
+ + + diff --git a/api/javaloader/javaloader/JavaProxy.html b/api/javaloader/javaloader/JavaProxy.html new file mode 100644 index 0000000..f3f1a59 --- /dev/null +++ b/api/javaloader/javaloader/JavaProxy.html @@ -0,0 +1,967 @@ + + + + + + + + +Callable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+JavaLoader - 1.1 + +
+ + + +
+ +

+ +javaloader +
+ +Class +JavaProxy

+ + + +
WEB-INF.cftags.component
+        extended by javaloader.JavaProxy
+
+ + + +
+
+
+ + + +
public class JavaProxy
+
extends WEB-INF.cftags.component
+
+
+ + + +
+ +

+ + + + + + + + + + + + + +
+ Constructor Summary
+ init() +
+ + +           create an instance of this object +
+   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+private array_buildArgumentArray(struct arguments) +
+ + +          builds an argument array out of the arguments +
+ any_findMethod(string methodName, struct methodArgs) +
+ + +          finds the method that closest matches the signature +
+private any_getArray() +
+ +
+private any_getClass() +
+ +
+private any_getClassInstance() +
+ +
+private any_getClassMethod() +
+ +
+private struct_getMethodCollection() +
+ +
+private any_getModifier() +
+ +
+private any_getObjectClass() +
+ +
+private boolean_hasClassInstance() +
+ + +          if the proxy has an instance yet +
+ JavaProxy_init(any class) +
+ + +          Constructor +
+private void_initMethodCollection() +
+ + +          creates a method collection of all the methods that are available on the class (this may be cached externally later) +
+private any_resolveMethodByParams(string methodName, array decision, struct methodArgs) +
+ + +          resolves the method to use by the parameters provided +
+private void_setArray(any Array) +
+ +
+private void_setClass(any Class) +
+ +
+private void_setClassInstance(any ClassInstance) +
+ +
+private void_setClassMethod(any ClassMethod) +
+ +
+private void_setMethodCollection(struct MethodCollection) +
+ +
+private void_setModifier(any Modifier) +
+ +
+private void_setObjectClass(any ObjectClass) +
+ +
+private void_setStaticFields() +
+ + +          loops around all the fields and sets the static one to this scope +
+ anyonMissingMethod(string missingMethodName, struct missingMethodArguments) +
+ + +          wires the coldfusion invocation to the Java Object +
+private anythrowException(string type, string message, [string detail='']) +
+ + +          Throws an Exception +
+ + + +   + + + + + + + + +
Methods inherited from class WEB-INF.cftags.component
+ + + +
+ + +  +

+ + + + + + +

+ + + +
+Constructor Detail
+ +

+ +init

+public init() +
+
+create an instance of this object +

+

+ + +
+ + + + + + + + + + +
+Method Detail
+ +

+ _buildArgumentArray

+ private array _buildArgumentArray(struct arguments) + +
+
+ builds an argument array out of the arguments +

+

+ + + +
+
Parameters:
+ +
arguments - the arguments passed through
+ +
+ + + +
+
+ +

+ _findMethod

+ public any _findMethod(string methodName, struct methodArgs) + +
+
+ finds the method that closest matches the signature +

+

+ + + +
+
Parameters:
+ +
methodName - the name of the method
+ +
methodArgs - the arguments to look for
+ +
+ + + +
+
+ +

+ _getArray

+ private any _getArray() + +
+
+ +

+

+ + + + + +
+
+ +

+ _getClass

+ private any _getClass() + +
+
+ +

+

+ + + + + +
+
+ +

+ _getClassInstance

+ private any _getClassInstance() + +
+
+ +

+

+ + + + + +
+
+ +

+ _getClassMethod

+ private any _getClassMethod() + +
+
+ +

+

+ + + + + +
+
+ +

+ _getMethodCollection

+ private struct _getMethodCollection() + +
+
+ +

+

+ + + + + +
+
+ +

+ _getModifier

+ private any _getModifier() + +
+
+ +

+

+ + + + + +
+
+ +

+ _getObjectClass

+ private any _getObjectClass() + +
+
+ +

+

+ + + + + +
+
+ +

+ _hasClassInstance

+ private boolean _hasClassInstance() + +
+
+ if the proxy has an instance yet +

+

+ + + + + +
+
+ +

+ _init

+ public JavaProxy _init(any class) + +
+
+ Constructor +

+

+ + + +
+
Parameters:
+ +
class - the java.lang.Class object this represents
+ +
+ + + +
+
+ +

+ _initMethodCollection

+ private void _initMethodCollection() + +
+
+ creates a method collection of all the methods that are available on the class (this may be cached externally later) +

+

+ + + + + +
+
+ +

+ _resolveMethodByParams

+ private any _resolveMethodByParams(string methodName, array decision, struct methodArgs) + +
+
+ resolves the method to use by the parameters provided +

+

+ + + +
+
Parameters:
+ +
methodName - the name of the method
+ +
decision - the array of methods to decide from
+ +
methodArgs - the arguments to look for
+ +
+ + + +
+
+ +

+ _setArray

+ private void _setArray(any Array) + +
+
+ +

+

+ + + +
+
Parameters:
+ +
Array
+ +
+ + + +
+
+ +

+ _setClass

+ private void _setClass(any Class) + +
+
+ +

+

+ + + +
+
Parameters:
+ +
Class
+ +
+ + + +
+
+ +

+ _setClassInstance

+ private void _setClassInstance(any ClassInstance) + +
+
+ +

+

+ + + +
+
Parameters:
+ +
ClassInstance
+ +
+ + + +
+
+ +

+ _setClassMethod

+ private void _setClassMethod(any ClassMethod) + +
+
+ +

+

+ + + +
+
Parameters:
+ +
ClassMethod
+ +
+ + + +
+
+ +

+ _setMethodCollection

+ private void _setMethodCollection(struct MethodCollection) + +
+
+ +

+

+ + + +
+
Parameters:
+ +
MethodCollection
+ +
+ + + +
+
+ +

+ _setModifier

+ private void _setModifier(any Modifier) + +
+
+ +

+

+ + + +
+
Parameters:
+ +
Modifier
+ +
+ + + +
+
+ +

+ _setObjectClass

+ private void _setObjectClass(any ObjectClass) + +
+
+ +

+

+ + + +
+
Parameters:
+ +
ObjectClass
+ +
+ + + +
+
+ +

+ _setStaticFields

+ private void _setStaticFields() + +
+
+ loops around all the fields and sets the static one to this scope +

+

+ + + + + +
+
+ +

+ onMissingMethod

+ public any onMissingMethod(string missingMethodName, struct missingMethodArguments) + +
+
+ wires the coldfusion invocation to the Java Object +

+

+ + + +
+
Parameters:
+ +
missingMethodName -
+ +
missingMethodArguments -
+ +
+ + + +
+
+ +

+ throwException

+ private any throwException(string type, string message, [string detail='']) + +
+
+ Throws an Exception +

+

+ + + +
+
Parameters:
+ +
type - The type of exception
+ +
message - The message to accompany the exception
+ +
detail - The detail message for the exception
+ +
+ + + +
+
+ + + + + + + + + + + + + + + + +
+JavaLoader - 1.1 + +
+ + + +
+ + + diff --git a/api/javaloader/javaloader/package-frame.html b/api/javaloader/javaloader/package-frame.html new file mode 100644 index 0000000..b7daa6a --- /dev/null +++ b/api/javaloader/javaloader/package-frame.html @@ -0,0 +1,46 @@ + + + + + + + +javaloader + + + + + + + + + + + +javaloader + + + + + + +
+ + Classes  + + +
+ JavaCompiler + +
+ JavaLoader + +
+ JavaProxy + +
+ + + + + diff --git a/api/javaloader/javaloader/package-summary.html b/api/javaloader/javaloader/package-summary.html new file mode 100644 index 0000000..57c48e6 --- /dev/null +++ b/api/javaloader/javaloader/package-summary.html @@ -0,0 +1,156 @@ + + + + + + + +javaloader + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+JavaLoader - 1.1 + +
+ + +
+

+Package javaloader +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Class Summary
JavaCompiler + Compiles Java source dirs to an array of +
JavaLoader + Loads External Java Classes, while providing access to ColdFusion classes +
JavaProxy + +
+

+ + + + + + + + + + + + + + + + +
+JavaLoader - 1.1 + +
+ + + +


+ + + diff --git a/api/javaloader/overview-frame.html b/api/javaloader/overview-frame.html new file mode 100644 index 0000000..9529a58 --- /dev/null +++ b/api/javaloader/overview-frame.html @@ -0,0 +1,49 @@ + + + + + + + +Overview + + + + + + + + + + + + + + + +
+JavaLoader - 1.1
+ + + + + +
All Classes +

+ +Packages +
+ + +javaloader +
+ + +
+ +

+ +

+  + + diff --git a/api/javaloader/overview-summary.html b/api/javaloader/overview-summary.html new file mode 100644 index 0000000..249b59e --- /dev/null +++ b/api/javaloader/overview-summary.html @@ -0,0 +1,141 @@ + + + + + + + +Overview + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+JavaLoader - 1.1 + +
+ + + +


+ +

+JavaLoader - 1.1 +

+ + + + + + + + + + + + + +
+Packages
javaloader
+ +


+ + + + + + + + + + + + + + + + + +
+JavaLoader - 1.1 + +
+ + + +
+ + + diff --git a/api/javaloader/resources/inherit.gif b/api/javaloader/resources/inherit.gif new file mode 100644 index 0000000..c814867 Binary files /dev/null and b/api/javaloader/resources/inherit.gif differ diff --git a/api/javaloader/stylesheet.css b/api/javaloader/stylesheet.css new file mode 100644 index 0000000..14c3737 --- /dev/null +++ b/api/javaloader/stylesheet.css @@ -0,0 +1,29 @@ +/* Javadoc style sheet */ + +/* Define colors, fonts and other style attributes here to override the defaults */ + +/* Page background color */ +body { background-color: #FFFFFF } + +/* Headings */ +h1 { font-size: 145% } + +/* Table colors */ +.TableHeadingColor { background: #CCCCFF } /* Dark mauve */ +.TableSubHeadingColor { background: #EEEEFF } /* Light mauve */ +.TableRowColor { background: #FFFFFF } /* White */ + +/* Font used in left-hand frame lists */ +.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif } +.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif } +.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif } + +/* Navigation bar fonts and colors */ +.NavBarCell1 { background-color:#EEEEFF;} /* Light mauve */ +.NavBarCell1Rev { background-color:#00008B;} /* Dark Blue */ +.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;} +.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;} + +.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} +.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} + diff --git a/api/networkclassloader/allclasses-frame.html b/api/networkclassloader/allclasses-frame.html new file mode 100644 index 0000000..911102d --- /dev/null +++ b/api/networkclassloader/allclasses-frame.html @@ -0,0 +1,33 @@ + + + + + + +All Classes + + + + + + + + + + + +All Classes +
+ + + + + +
NetworkClassLoader +
+URLResourceReader +
+
+ + + diff --git a/api/networkclassloader/allclasses-noframe.html b/api/networkclassloader/allclasses-noframe.html new file mode 100644 index 0000000..42a0c2b --- /dev/null +++ b/api/networkclassloader/allclasses-noframe.html @@ -0,0 +1,33 @@ + + + + + + +All Classes + + + + + + + + + + + +All Classes +
+ + + + + +
NetworkClassLoader +
+URLResourceReader +
+
+ + + diff --git a/api/networkclassloader/com/compoundtheory/classloader/NetworkClassLoader.html b/api/networkclassloader/com/compoundtheory/classloader/NetworkClassLoader.html new file mode 100644 index 0000000..3bc1dc4 --- /dev/null +++ b/api/networkclassloader/com/compoundtheory/classloader/NetworkClassLoader.html @@ -0,0 +1,597 @@ + + + + + + +NetworkClassLoader + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +com.compoundtheory.classloader +
+Class NetworkClassLoader

+
+java.lang.Object
+  extended by java.lang.ClassLoader
+      extended by com.compoundtheory.classloader.NetworkClassLoader
+
+
+
+
public class NetworkClassLoader
extends java.lang.ClassLoader
+ + +

+

+ The correct name for this class should be URLClassLoader. But there is + already a class by that name in JDK1.2. + + I have had quite a few problems with URLClassLoader in past, so I ended up + writing this ClassLoader. I found that the Java 2's URLClassLoader, does not + close the Jar file once opened. It is a pretty good optimization step, but if + you modify the class in the jar file, it does not pick it up. Some operating + systems may not let you modify the jar file while it is still open. IMHO, it + does make sense to close the jar file after you are done reading the class + data. But this approach may not get you the performance of the + URLClassLoader, but it works in all cases and also runs on JDK1.1. I have + enhanced this class loader to read all the zip/jar entries once & cache the + data, so that there is no overhead of opening/closing jar file to pick up + each entry. +

+ +

+ Modified and enhanced by Mark Mandel to work specifically with ColdFusion, in + specific contexts. +

+

+ +

+

+
Author:
+
Harish Prabandham
+
+
+ +

+ + + + + + + + + + + + + + +
+Constructor Summary
NetworkClassLoader() + +
+           
NetworkClassLoader(java.lang.ClassLoader parent) + +
+          Creates a new instance of the class loader.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidaddURL(java.net.URL url) + +
+          Adds the given URL to this class loader.
+ voidclear() + +
+          This method resets this ClassLoader's state.
+protected  voidfinalize() + +
+          This method resets this ClassLoader's state and resets the references for + garbage collection.
+ java.lang.ClassfindClass(java.lang.String name) + +
+          Call this to bypass the implementation of loadClass.
+protected  java.net.URLfindResource(java.lang.String name) + +
+          Overridden to search for a resource and return a "jar"-style URL or + normal "file" URL as necessary.
+protected  java.util.EnumerationfindResources(java.lang.String name) + +
+          Find all resources for a given name
+ java.io.InputStreamgetResourceAsStream(java.lang.String name) + +
+           
+ java.net.URL[]getURLs() + +
+           
+ java.lang.ClassloadClass(java.lang.String name, + boolean resolve) + +
+          Load a class for given name
+protected  byte[]loadClassData(java.lang.String classname) + +
+           
+protected  byte[]loadResource(java.lang.String resource) + +
+           
+protected  byte[]loadResource(java.net.URL url, + java.lang.String resourceName) + +
+           
+protected  voidsetParent(java.lang.ClassLoader parent) + +
+          Sets the parent/delegate class loader.
+ + + + + + + +
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+NetworkClassLoader

+
+public NetworkClassLoader()
+
+
+
+ +

+NetworkClassLoader

+
+public NetworkClassLoader(java.lang.ClassLoader parent)
+
+
Creates a new instance of the class loader. +

+

+
Parameters:
parent - the parent classloader
+
+ + + + + + + + +
+Method Detail
+ +

+setParent

+
+protected final void setParent(java.lang.ClassLoader parent)
+
+
Sets the parent/delegate class loader. +

+

+
Parameters:
parent - the parent class loader.
+
+
+
+ +

+addURL

+
+public void addURL(java.net.URL url)
+
+
Adds the given URL to this class loader. If the URL ends with "/", then + it is assumed to be a directory otherwise, it is assumed to be a zip/jar + file. If the same URL is added again, the URL is re-opened and this + zip/jar file is used for serving any future class requests. +

+

+
Parameters:
url - where to look for the classes.
+
+
+
+ +

+getURLs

+
+public java.net.URL[] getURLs()
+
+
+ +
Returns:
An enumeration of URLs where this class loader looks for classes.
+
+
+
+ +

+findClass

+
+public java.lang.Class findClass(java.lang.String name)
+                          throws java.lang.ClassNotFoundException
+
+
Call this to bypass the implementation of loadClass. +

+

+
Overrides:
findClass in class java.lang.ClassLoader
+
+
+ +
Throws: +
java.lang.ClassNotFoundException
+
+
+
+ +

+loadResource

+
+protected byte[] loadResource(java.net.URL url,
+                              java.lang.String resourceName)
+                       throws java.io.IOException
+
+
+ +
Throws: +
java.io.IOException
+
+
+
+ +

+loadResource

+
+protected byte[] loadResource(java.lang.String resource)
+
+
+
+
+
+
+ +

+loadClassData

+
+protected byte[] loadClassData(java.lang.String classname)
+
+
+
+
+
+
+ +

+findResource

+
+protected java.net.URL findResource(java.lang.String name)
+
+
Overridden to search for a resource and return a "jar"-style URL or + normal "file" URL as necessary. +

+

+
Overrides:
findResource in class java.lang.ClassLoader
+
+
+
+
+
+
+ +

+findResources

+
+protected java.util.Enumeration findResources(java.lang.String name)
+                                       throws java.io.IOException
+
+
Find all resources for a given name +

+

+
Overrides:
findResources in class java.lang.ClassLoader
+
+
+ +
Returns:
an enumeration of all the resources found. +
Throws: +
java.io.IOException
+
+
+
+ +

+getResourceAsStream

+
+public java.io.InputStream getResourceAsStream(java.lang.String name)
+
+
+
Overrides:
getResourceAsStream in class java.lang.ClassLoader
+
+
+ +
Returns:
The resource as the input stream if such a resource exists, + otherwise returns null.
+
+
+
+ +

+loadClass

+
+public java.lang.Class loadClass(java.lang.String name,
+                                 boolean resolve)
+                          throws java.lang.ClassNotFoundException
+
+
Load a class for given name +

+

+
Overrides:
loadClass in class java.lang.ClassLoader
+
+
+ +
Throws: +
java.lang.ClassNotFoundException
+
+
+
+ +

+clear

+
+public final void clear()
+
+
This method resets this ClassLoader's state. It completely removes all + the URLs and classes in this class loader cache. +

+

+
+
+
+
+ +

+finalize

+
+protected void finalize()
+                 throws java.lang.Throwable
+
+
This method resets this ClassLoader's state and resets the references for + garbage collection. +

+

+
Overrides:
finalize in class java.lang.Object
+
+
+ +
Throws: +
java.lang.Throwable
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/networkclassloader/com/compoundtheory/classloader/URLResourceReader.html b/api/networkclassloader/com/compoundtheory/classloader/URLResourceReader.html new file mode 100644 index 0000000..189e5c1 --- /dev/null +++ b/api/networkclassloader/com/compoundtheory/classloader/URLResourceReader.html @@ -0,0 +1,390 @@ + + + + + + +URLResourceReader + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +com.compoundtheory.classloader +
+Class URLResourceReader

+
+java.lang.Object
+  extended by com.compoundtheory.classloader.URLResourceReader
+
+
+
+
public class URLResourceReader
extends java.lang.Object
+ + +

+This implementation of URL Resource Reader assumes 2 types + of base urls. A base url that ends with / is considered a + resource folder, whereas a resource that does not end with + / is considered a zip/jar resource folder. + + If the resource folder happens is a zip/jar archive, the + entries are always cached. + For non-zip base urls, one could specify whether or not it should + be cached. +

+ +

+

+
Author:
+
Harish Prabandham
+
+
+ +

+ + + + + + + + + + + + + + + + + +
+Constructor Summary
URLResourceReader(java.io.InputStream is) + +
+          Creates a new URLResourceReader object with the given + input stream.
URLResourceReader(java.net.URL baseurl) + +
+          equivalent to URLResourceReader(baseurl, false)
URLResourceReader(java.net.URL baseurl, + boolean cache) + +
+          Creates a new URLResourceReader object.
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidclose() + +
+           
+ byte[]getResource(java.lang.String resource) + +
+          Returns an array of bytes read for this resource if the + resource exists.
+ java.util.EnumerationgetResourceNames() + +
+          Returns an Enumeration of all "known" resource names.
+ java.lang.StringtoString() + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+URLResourceReader

+
+public URLResourceReader(java.net.URL baseurl,
+                         boolean cache)
+                  throws java.io.IOException
+
+
Creates a new URLResourceReader object. You can either give + the URL of the zip/jar file or a base url where to + look for additional resources. If the url ends with + "/" then it is assumed to be a Base URL. +

+

+
Parameters:
The - base url to look for the resources.
If - the base url is not a zip/jar, then true indicates + that entries should be cached, false otherwise. +
Throws: +
java.io.IOException
+
+
+ +

+URLResourceReader

+
+public URLResourceReader(java.net.URL baseurl)
+                  throws java.io.IOException
+
+
equivalent to URLResourceReader(baseurl, false) +

+

+ +
Throws: +
java.io.IOException
+
+
+ +

+URLResourceReader

+
+public URLResourceReader(java.io.InputStream is)
+                  throws java.io.IOException
+
+
Creates a new URLResourceReader object with the given + input stream. The stream is assumed to be a zip/jar + stream. +

+

+ +
Throws: +
java.io.IOException
+
+ + + + + + + + +
+Method Detail
+ +

+getResourceNames

+
+public java.util.Enumeration getResourceNames()
+
+
Returns an Enumeration of all "known" resource names. +

+

+
+
+
+
+ +

+getResource

+
+public byte[] getResource(java.lang.String resource)
+
+
Returns an array of bytes read for this resource if the + resource exists. This method blocks until the resource + has been fully read. If the resource does not exist, + this method returns null. +

+

+
+
+
+
+ +

+close

+
+public void close()
+
+
+
+
+
+
+ +

+toString

+
+public java.lang.String toString()
+
+
+
Overrides:
toString in class java.lang.Object
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/networkclassloader/com/compoundtheory/classloader/package-frame.html b/api/networkclassloader/com/compoundtheory/classloader/package-frame.html new file mode 100644 index 0000000..9095b01 --- /dev/null +++ b/api/networkclassloader/com/compoundtheory/classloader/package-frame.html @@ -0,0 +1,34 @@ + + + + + + +com.compoundtheory.classloader + + + + + + + + + + + +com.compoundtheory.classloader + + + + +
+Classes  + +
+NetworkClassLoader +
+URLResourceReader
+ + + + diff --git a/api/networkclassloader/com/compoundtheory/classloader/package-summary.html b/api/networkclassloader/com/compoundtheory/classloader/package-summary.html new file mode 100644 index 0000000..9cd6319 --- /dev/null +++ b/api/networkclassloader/com/compoundtheory/classloader/package-summary.html @@ -0,0 +1,159 @@ + + + + + + +com.compoundtheory.classloader + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

+Package com.compoundtheory.classloader +

+ + + + + + + + + + + + + +
+Class Summary
NetworkClassLoader + The correct name for this class should be URLClassLoader.
URLResourceReaderThis implementation of URL Resource Reader assumes 2 types + of base urls.
+  + +

+

+
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/networkclassloader/com/compoundtheory/classloader/package-tree.html b/api/networkclassloader/com/compoundtheory/classloader/package-tree.html new file mode 100644 index 0000000..5659fc0 --- /dev/null +++ b/api/networkclassloader/com/compoundtheory/classloader/package-tree.html @@ -0,0 +1,148 @@ + + + + + + +com.compoundtheory.classloader Class Hierarchy + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Hierarchy For Package com.compoundtheory.classloader +

+
+

+Class Hierarchy +

+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/networkclassloader/constant-values.html b/api/networkclassloader/constant-values.html new file mode 100644 index 0000000..6107a41 --- /dev/null +++ b/api/networkclassloader/constant-values.html @@ -0,0 +1,142 @@ + + + + + + +Constant Field Values + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Constant Field Values

+
+
+Contents + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/networkclassloader/deprecated-list.html b/api/networkclassloader/deprecated-list.html new file mode 100644 index 0000000..2ea086e --- /dev/null +++ b/api/networkclassloader/deprecated-list.html @@ -0,0 +1,142 @@ + + + + + + +Deprecated List + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Deprecated API

+
+
+Contents + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/networkclassloader/help-doc.html b/api/networkclassloader/help-doc.html new file mode 100644 index 0000000..e66111d --- /dev/null +++ b/api/networkclassloader/help-doc.html @@ -0,0 +1,209 @@ + + + + + + +API Help + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+How This API Document Is Organized

+
+This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

+Package

+
+ +

+Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

+
+

+Class/Interface

+
+ +

+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+ +

+Annotation Type

+
+ +

+Each annotation type has its own separate page with the following sections:

+
+ +

+Enum

+
+ +

+Each enum has its own separate page with the following sections:

+
+

+Tree (Class Hierarchy)

+
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object. +
+

+Deprecated API

+
+The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+

+Index

+
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+

+Prev/Next

+These links take you to the next or previous class, interface, package, or related page.

+Frames/No Frames

+These links show and hide the HTML frames. All pages are available with or without frames. +

+

+Serialized Form

+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description. +

+

+Constant Field Values

+The Constant Field Values page lists the static final fields and their values. +

+ + +This help file applies to API documentation generated using the standard doclet. + +
+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/networkclassloader/index-files/index-1.html b/api/networkclassloader/index-files/index-1.html new file mode 100644 index 0000000..fc9e7a4 --- /dev/null +++ b/api/networkclassloader/index-files/index-1.html @@ -0,0 +1,141 @@ + + + + + + +A-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C F G L N S T U
+

+A

+
+
addURL(URL) - +Method in class com.compoundtheory.classloader.NetworkClassLoader +
Adds the given URL to this class loader. +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C F G L N S T U
+ + + diff --git a/api/networkclassloader/index-files/index-2.html b/api/networkclassloader/index-files/index-2.html new file mode 100644 index 0000000..1a45b65 --- /dev/null +++ b/api/networkclassloader/index-files/index-2.html @@ -0,0 +1,144 @@ + + + + + + +C-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C F G L N S T U
+

+C

+
+
clear() - +Method in class com.compoundtheory.classloader.NetworkClassLoader +
This method resets this ClassLoader's state. +
close() - +Method in class com.compoundtheory.classloader.URLResourceReader +
  +
com.compoundtheory.classloader - package com.compoundtheory.classloader
 
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C F G L N S T U
+ + + diff --git a/api/networkclassloader/index-files/index-3.html b/api/networkclassloader/index-files/index-3.html new file mode 100644 index 0000000..d30b792 --- /dev/null +++ b/api/networkclassloader/index-files/index-3.html @@ -0,0 +1,152 @@ + + + + + + +F-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C F G L N S T U
+

+F

+
+
finalize() - +Method in class com.compoundtheory.classloader.NetworkClassLoader +
This method resets this ClassLoader's state and resets the references for + garbage collection. +
findClass(String) - +Method in class com.compoundtheory.classloader.NetworkClassLoader +
Call this to bypass the implementation of loadClass. +
findResource(String) - +Method in class com.compoundtheory.classloader.NetworkClassLoader +
Overridden to search for a resource and return a "jar"-style URL or + normal "file" URL as necessary. +
findResources(String) - +Method in class com.compoundtheory.classloader.NetworkClassLoader +
Find all resources for a given name +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C F G L N S T U
+ + + diff --git a/api/networkclassloader/index-files/index-4.html b/api/networkclassloader/index-files/index-4.html new file mode 100644 index 0000000..25eac6d --- /dev/null +++ b/api/networkclassloader/index-files/index-4.html @@ -0,0 +1,151 @@ + + + + + + +G-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C F G L N S T U
+

+G

+
+
getResource(String) - +Method in class com.compoundtheory.classloader.URLResourceReader +
Returns an array of bytes read for this resource if the + resource exists. +
getResourceAsStream(String) - +Method in class com.compoundtheory.classloader.NetworkClassLoader +
  +
getResourceNames() - +Method in class com.compoundtheory.classloader.URLResourceReader +
Returns an Enumeration of all "known" resource names. +
getURLs() - +Method in class com.compoundtheory.classloader.NetworkClassLoader +
  +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C F G L N S T U
+ + + diff --git a/api/networkclassloader/index-files/index-5.html b/api/networkclassloader/index-files/index-5.html new file mode 100644 index 0000000..5627005 --- /dev/null +++ b/api/networkclassloader/index-files/index-5.html @@ -0,0 +1,150 @@ + + + + + + +L-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C F G L N S T U
+

+L

+
+
loadClass(String, boolean) - +Method in class com.compoundtheory.classloader.NetworkClassLoader +
Load a class for given name +
loadClassData(String) - +Method in class com.compoundtheory.classloader.NetworkClassLoader +
  +
loadResource(URL, String) - +Method in class com.compoundtheory.classloader.NetworkClassLoader +
  +
loadResource(String) - +Method in class com.compoundtheory.classloader.NetworkClassLoader +
  +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C F G L N S T U
+ + + diff --git a/api/networkclassloader/index-files/index-6.html b/api/networkclassloader/index-files/index-6.html new file mode 100644 index 0000000..49ee589 --- /dev/null +++ b/api/networkclassloader/index-files/index-6.html @@ -0,0 +1,145 @@ + + + + + + +N-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C F G L N S T U
+

+N

+
+
NetworkClassLoader - Class in com.compoundtheory.classloader
+ The correct name for this class should be URLClassLoader.
NetworkClassLoader() - +Constructor for class com.compoundtheory.classloader.NetworkClassLoader +
  +
NetworkClassLoader(ClassLoader) - +Constructor for class com.compoundtheory.classloader.NetworkClassLoader +
Creates a new instance of the class loader. +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C F G L N S T U
+ + + diff --git a/api/networkclassloader/index-files/index-7.html b/api/networkclassloader/index-files/index-7.html new file mode 100644 index 0000000..060f639 --- /dev/null +++ b/api/networkclassloader/index-files/index-7.html @@ -0,0 +1,141 @@ + + + + + + +S-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C F G L N S T U
+

+S

+
+
setParent(ClassLoader) - +Method in class com.compoundtheory.classloader.NetworkClassLoader +
Sets the parent/delegate class loader. +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C F G L N S T U
+ + + diff --git a/api/networkclassloader/index-files/index-8.html b/api/networkclassloader/index-files/index-8.html new file mode 100644 index 0000000..7c9d9f4 --- /dev/null +++ b/api/networkclassloader/index-files/index-8.html @@ -0,0 +1,141 @@ + + + + + + +T-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C F G L N S T U
+

+T

+
+
toString() - +Method in class com.compoundtheory.classloader.URLResourceReader +
  +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C F G L N S T U
+ + + diff --git a/api/networkclassloader/index-files/index-9.html b/api/networkclassloader/index-files/index-9.html new file mode 100644 index 0000000..0e76ee8 --- /dev/null +++ b/api/networkclassloader/index-files/index-9.html @@ -0,0 +1,149 @@ + + + + + + +U-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C F G L N S T U
+

+U

+
+
URLResourceReader - Class in com.compoundtheory.classloader
This implementation of URL Resource Reader assumes 2 types + of base urls.
URLResourceReader(URL, boolean) - +Constructor for class com.compoundtheory.classloader.URLResourceReader +
Creates a new URLResourceReader object. +
URLResourceReader(URL) - +Constructor for class com.compoundtheory.classloader.URLResourceReader +
equivalent to URLResourceReader(baseurl, false) +
URLResourceReader(InputStream) - +Constructor for class com.compoundtheory.classloader.URLResourceReader +
Creates a new URLResourceReader object with the given + input stream. +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C F G L N S T U
+ + + diff --git a/api/networkclassloader/index.html b/api/networkclassloader/index.html new file mode 100644 index 0000000..d16e07e --- /dev/null +++ b/api/networkclassloader/index.html @@ -0,0 +1,36 @@ + + + + + + +Generated Documentation (Untitled) + + + + + + + + +<H2> +Frame Alert</H2> + +<P> +This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. +<BR> +Link to<A HREF="com/compoundtheory/classloader/package-summary.html">Non-frame version.</A> + + + diff --git a/api/networkclassloader/overview-tree.html b/api/networkclassloader/overview-tree.html new file mode 100644 index 0000000..36431f2 --- /dev/null +++ b/api/networkclassloader/overview-tree.html @@ -0,0 +1,150 @@ + + + + + + +Class Hierarchy + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Hierarchy For All Packages

+
+
+
Package Hierarchies:
com.compoundtheory.classloader
+
+

+Class Hierarchy +

+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/networkclassloader/package-list b/api/networkclassloader/package-list new file mode 100644 index 0000000..7e21270 --- /dev/null +++ b/api/networkclassloader/package-list @@ -0,0 +1 @@ +com.compoundtheory.classloader diff --git a/api/networkclassloader/resources/inherit.gif b/api/networkclassloader/resources/inherit.gif new file mode 100644 index 0000000..c814867 Binary files /dev/null and b/api/networkclassloader/resources/inherit.gif differ diff --git a/api/networkclassloader/stylesheet.css b/api/networkclassloader/stylesheet.css new file mode 100644 index 0000000..6ea9e51 --- /dev/null +++ b/api/networkclassloader/stylesheet.css @@ -0,0 +1,29 @@ +/* Javadoc style sheet */ + +/* Define colors, fonts and other style attributes here to override the defaults */ + +/* Page background color */ +body { background-color: #FFFFFF; color:#000000 } + +/* Headings */ +h1 { font-size: 145% } + +/* Table colors */ +.TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve */ +.TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve */ +.TableRowColor { background: #FFFFFF; color:#000000 } /* White */ + +/* Font used in left-hand frame lists */ +.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 } +.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } +.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } + +/* Navigation bar fonts and colors */ +.NavBarCell1 { background-color:#EEEEFF; color:#000000} /* Light mauve */ +.NavBarCell1Rev { background-color:#00008B; color:#FFFFFF} /* Dark Blue */ +.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;} +.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;} + +.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} +.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} + diff --git a/api/spring/allclasses-frame.html b/api/spring/allclasses-frame.html new file mode 100644 index 0000000..f307c2d --- /dev/null +++ b/api/spring/allclasses-frame.html @@ -0,0 +1,35 @@ + + + + + + +All Classes + + + + + + + + + + + +All Classes +
+ + + + + +
ColdFusionBeanDefinitionParser +
+ColdFusionComponentFactory +
+ColdFusionNamespaceHandler +
+
+ + + diff --git a/api/spring/allclasses-noframe.html b/api/spring/allclasses-noframe.html new file mode 100644 index 0000000..d52cd33 --- /dev/null +++ b/api/spring/allclasses-noframe.html @@ -0,0 +1,35 @@ + + + + + + +All Classes + + + + + + + + + + + +All Classes +
+ + + + + +
ColdFusionBeanDefinitionParser +
+ColdFusionComponentFactory +
+ColdFusionNamespaceHandler +
+
+ + + diff --git a/api/spring/com/compoundtheory/coldfusion/cfc/spring/ColdFusionComponentFactory.html b/api/spring/com/compoundtheory/coldfusion/cfc/spring/ColdFusionComponentFactory.html new file mode 100644 index 0000000..39397a4 --- /dev/null +++ b/api/spring/com/compoundtheory/coldfusion/cfc/spring/ColdFusionComponentFactory.html @@ -0,0 +1,418 @@ + + + + + + +ColdFusionComponentFactory + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +com.compoundtheory.coldfusion.cfc.spring +
+Class ColdFusionComponentFactory

+
+java.lang.Object
+  extended by com.compoundtheory.coldfusion.cfc.spring.ColdFusionComponentFactory
+
+
+
All Implemented Interfaces:
org.springframework.scripting.ScriptFactory
+
+
+
+
public class ColdFusionComponentFactory
extends java.lang.Object
implements org.springframework.scripting.ScriptFactory
+ + +

+ScriptFactory for creating a CFC Dynamic Proxy to pass back to Spring + A lot of this was lifted from ScriptBeanDefinitionParser, so big + credit to that crew. +

+ +

+

+
Author:
+
Mark Mandel
+
+
+ +

+ + + + + + + + + + + +
+Constructor Summary
ColdFusionComponentFactory(java.lang.String scriptSourceLocator, + java.lang.Class<?>[] interfaces) + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ java.lang.ObjectgetScriptedObject(org.springframework.scripting.ScriptSource scriptSource, + java.lang.Class[] actualInterfaces) + +
+           
+ java.lang.Class<?>getScriptedObjectType(org.springframework.scripting.ScriptSource scriptSource) + +
+          returns null, as we are actually returning a proxy.
+ java.lang.Class<?>[]getScriptInterfaces() + +
+           
+ java.lang.StringgetScriptSourceLocator() + +
+           
+ booleanrequiresConfigInterface() + +
+          ColdFusion proxies require a config interface
+ booleanrequiresScriptedObjectRefresh(org.springframework.scripting.ScriptSource scriptSource) + +
+           
+ java.lang.StringtoString() + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+ColdFusionComponentFactory

+
+public ColdFusionComponentFactory(java.lang.String scriptSourceLocator,
+                                  java.lang.Class<?>[] interfaces)
+
+
+ + + + + + + + +
+Method Detail
+ +

+getScriptedObject

+
+public java.lang.Object getScriptedObject(org.springframework.scripting.ScriptSource scriptSource,
+                                          java.lang.Class[] actualInterfaces)
+                                   throws java.io.IOException,
+                                          org.springframework.scripting.ScriptCompilationException
+
+
+
Specified by:
getScriptedObject in interface org.springframework.scripting.ScriptFactory
+
+
+ +
Throws: +
java.io.IOException +
org.springframework.scripting.ScriptCompilationException
+
+
+
+ +

+getScriptedObjectType

+
+public java.lang.Class<?> getScriptedObjectType(org.springframework.scripting.ScriptSource scriptSource)
+                                         throws java.io.IOException,
+                                                org.springframework.scripting.ScriptCompilationException
+
+
returns null, as we are actually returning a proxy. +

+

+
Specified by:
getScriptedObjectType in interface org.springframework.scripting.ScriptFactory
+
+
+ +
Throws: +
java.io.IOException +
org.springframework.scripting.ScriptCompilationException
+
+
+
+ +

+getScriptSourceLocator

+
+public java.lang.String getScriptSourceLocator()
+
+
+
Specified by:
getScriptSourceLocator in interface org.springframework.scripting.ScriptFactory
+
+
+
+
+
+
+ +

+requiresConfigInterface

+
+public boolean requiresConfigInterface()
+
+
ColdFusion proxies require a config interface +

+

+
Specified by:
requiresConfigInterface in interface org.springframework.scripting.ScriptFactory
+
+
+
+
+
+
+ +

+requiresScriptedObjectRefresh

+
+public boolean requiresScriptedObjectRefresh(org.springframework.scripting.ScriptSource scriptSource)
+
+
+
Specified by:
requiresScriptedObjectRefresh in interface org.springframework.scripting.ScriptFactory
+
+
+
+
+
+
+ +

+getScriptInterfaces

+
+public java.lang.Class<?>[] getScriptInterfaces()
+
+
+
Specified by:
getScriptInterfaces in interface org.springframework.scripting.ScriptFactory
+
+
+
+
+
+
+ +

+toString

+
+public java.lang.String toString()
+
+
+
Overrides:
toString in class java.lang.Object
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/spring/com/compoundtheory/coldfusion/cfc/spring/class-use/ColdFusionComponentFactory.html b/api/spring/com/compoundtheory/coldfusion/cfc/spring/class-use/ColdFusionComponentFactory.html new file mode 100644 index 0000000..9c64cba --- /dev/null +++ b/api/spring/com/compoundtheory/coldfusion/cfc/spring/class-use/ColdFusionComponentFactory.html @@ -0,0 +1,144 @@ + + + + + + +Uses of Class com.compoundtheory.coldfusion.cfc.spring.ColdFusionComponentFactory + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
com.compoundtheory.coldfusion.cfc.spring.ColdFusionComponentFactory

+
+No usage of com.compoundtheory.coldfusion.cfc.spring.ColdFusionComponentFactory +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/ColdFusionBeanDefinitionParser.html b/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/ColdFusionBeanDefinitionParser.html new file mode 100644 index 0000000..5fd5df9 --- /dev/null +++ b/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/ColdFusionBeanDefinitionParser.html @@ -0,0 +1,265 @@ + + + + + + +ColdFusionBeanDefinitionParser + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +com.compoundtheory.coldfusion.cfc.spring.config +
+Class ColdFusionBeanDefinitionParser

+
+java.lang.Object
+  extended by org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
+      extended by com.compoundtheory.coldfusion.cfc.spring.config.ColdFusionBeanDefinitionParser
+
+
+
All Implemented Interfaces:
org.springframework.beans.factory.xml.BeanDefinitionParser
+
+
+
+
public class ColdFusionBeanDefinitionParser
extends org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
+ + +

+Bean definition parser for the Spring namespace +

+ +

+

+
Author:
+
Mark Mandel
+
+
+ +

+ + + + + + + +
+Field Summary
+ + + + + + + +
Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
ID_ATTRIBUTE
+  + + + + + + + + + + +
+Constructor Summary
ColdFusionBeanDefinitionParser() + +
+          Constructor
+  + + + + + + + +
+Method Summary
+ + + + + + + +
Methods inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
parse
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+ColdFusionBeanDefinitionParser

+
+public ColdFusionBeanDefinitionParser()
+
+
Constructor +

+

+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/ColdFusionNamespaceHandler.html b/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/ColdFusionNamespaceHandler.html new file mode 100644 index 0000000..a1e9200 --- /dev/null +++ b/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/ColdFusionNamespaceHandler.html @@ -0,0 +1,273 @@ + + + + + + +ColdFusionNamespaceHandler + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +com.compoundtheory.coldfusion.cfc.spring.config +
+Class ColdFusionNamespaceHandler

+
+java.lang.Object
+  extended by org.springframework.beans.factory.xml.NamespaceHandlerSupport
+      extended by com.compoundtheory.coldfusion.cfc.spring.config.ColdFusionNamespaceHandler
+
+
+
All Implemented Interfaces:
org.springframework.beans.factory.xml.NamespaceHandler
+
+
+
+
public class ColdFusionNamespaceHandler
extends org.springframework.beans.factory.xml.NamespaceHandlerSupport
+ + +

+Namespace handler for the Spring XML namespace +

+ +

+

+
Author:
+
Mark Mandel
+
+
+ +

+ + + + + + + + + + + +
+Constructor Summary
ColdFusionNamespaceHandler() + +
+           
+  + + + + + + + + + + + +
+Method Summary
+ voidinit() + +
+           
+ + + + + + + +
Methods inherited from class org.springframework.beans.factory.xml.NamespaceHandlerSupport
decorate, parse
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+ColdFusionNamespaceHandler

+
+public ColdFusionNamespaceHandler()
+
+
+ + + + + + + + +
+Method Detail
+ +

+init

+
+public void init()
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/class-use/ColdFusionBeanDefinitionParser.html b/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/class-use/ColdFusionBeanDefinitionParser.html new file mode 100644 index 0000000..8f503e2 --- /dev/null +++ b/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/class-use/ColdFusionBeanDefinitionParser.html @@ -0,0 +1,144 @@ + + + + + + +Uses of Class com.compoundtheory.coldfusion.cfc.spring.config.ColdFusionBeanDefinitionParser + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
com.compoundtheory.coldfusion.cfc.spring.config.ColdFusionBeanDefinitionParser

+
+No usage of com.compoundtheory.coldfusion.cfc.spring.config.ColdFusionBeanDefinitionParser +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/class-use/ColdFusionNamespaceHandler.html b/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/class-use/ColdFusionNamespaceHandler.html new file mode 100644 index 0000000..6f743d5 --- /dev/null +++ b/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/class-use/ColdFusionNamespaceHandler.html @@ -0,0 +1,144 @@ + + + + + + +Uses of Class com.compoundtheory.coldfusion.cfc.spring.config.ColdFusionNamespaceHandler + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
com.compoundtheory.coldfusion.cfc.spring.config.ColdFusionNamespaceHandler

+
+No usage of com.compoundtheory.coldfusion.cfc.spring.config.ColdFusionNamespaceHandler +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/package-frame.html b/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/package-frame.html new file mode 100644 index 0000000..f79169b --- /dev/null +++ b/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/package-frame.html @@ -0,0 +1,34 @@ + + + + + + +com.compoundtheory.coldfusion.cfc.spring.config + + + + + + + + + + + +com.compoundtheory.coldfusion.cfc.spring.config + + + + +
+Classes  + +
+ColdFusionBeanDefinitionParser +
+ColdFusionNamespaceHandler
+ + + + diff --git a/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/package-summary.html b/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/package-summary.html new file mode 100644 index 0000000..3beb56d --- /dev/null +++ b/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/package-summary.html @@ -0,0 +1,161 @@ + + + + + + +com.compoundtheory.coldfusion.cfc.spring.config + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

+Package com.compoundtheory.coldfusion.cfc.spring.config +

+ + + + + + + + + + + + + +
+Class Summary
ColdFusionBeanDefinitionParserBean definition parser for the Spring namespace
ColdFusionNamespaceHandlerNamespace handler for the Spring XML namespace
+  + +

+

+
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/package-tree.html b/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/package-tree.html new file mode 100644 index 0000000..8cb416c --- /dev/null +++ b/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/package-tree.html @@ -0,0 +1,159 @@ + + + + + + +com.compoundtheory.coldfusion.cfc.spring.config Class Hierarchy + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Hierarchy For Package com.compoundtheory.coldfusion.cfc.spring.config +

+
+
+
Package Hierarchies:
All Packages
+
+

+Class Hierarchy +

+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/package-use.html b/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/package-use.html new file mode 100644 index 0000000..e607660 --- /dev/null +++ b/api/spring/com/compoundtheory/coldfusion/cfc/spring/config/package-use.html @@ -0,0 +1,144 @@ + + + + + + +Uses of Package com.compoundtheory.coldfusion.cfc.spring.config + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Package
com.compoundtheory.coldfusion.cfc.spring.config

+
+No usage of com.compoundtheory.coldfusion.cfc.spring.config +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/spring/com/compoundtheory/coldfusion/cfc/spring/package-frame.html b/api/spring/com/compoundtheory/coldfusion/cfc/spring/package-frame.html new file mode 100644 index 0000000..d828f6e --- /dev/null +++ b/api/spring/com/compoundtheory/coldfusion/cfc/spring/package-frame.html @@ -0,0 +1,32 @@ + + + + + + +com.compoundtheory.coldfusion.cfc.spring + + + + + + + + + + + +com.compoundtheory.coldfusion.cfc.spring + + + + +
+Classes  + +
+ColdFusionComponentFactory
+ + + + diff --git a/api/spring/com/compoundtheory/coldfusion/cfc/spring/package-summary.html b/api/spring/com/compoundtheory/coldfusion/cfc/spring/package-summary.html new file mode 100644 index 0000000..ba8f42a --- /dev/null +++ b/api/spring/com/compoundtheory/coldfusion/cfc/spring/package-summary.html @@ -0,0 +1,159 @@ + + + + + + +com.compoundtheory.coldfusion.cfc.spring + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

+Package com.compoundtheory.coldfusion.cfc.spring +

+ + + + + + + + + +
+Class Summary
ColdFusionComponentFactoryScriptFactory for creating a CFC Dynamic Proxy to pass back to Spring + A lot of this was lifted from ScriptBeanDefinitionParser, so big + credit to that crew.
+  + +

+

+
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/spring/com/compoundtheory/coldfusion/cfc/spring/package-tree.html b/api/spring/com/compoundtheory/coldfusion/cfc/spring/package-tree.html new file mode 100644 index 0000000..04fc4df --- /dev/null +++ b/api/spring/com/compoundtheory/coldfusion/cfc/spring/package-tree.html @@ -0,0 +1,154 @@ + + + + + + +com.compoundtheory.coldfusion.cfc.spring Class Hierarchy + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Hierarchy For Package com.compoundtheory.coldfusion.cfc.spring +

+
+
+
Package Hierarchies:
All Packages
+
+

+Class Hierarchy +

+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/spring/com/compoundtheory/coldfusion/cfc/spring/package-use.html b/api/spring/com/compoundtheory/coldfusion/cfc/spring/package-use.html new file mode 100644 index 0000000..b70d473 --- /dev/null +++ b/api/spring/com/compoundtheory/coldfusion/cfc/spring/package-use.html @@ -0,0 +1,144 @@ + + + + + + +Uses of Package com.compoundtheory.coldfusion.cfc.spring + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Package
com.compoundtheory.coldfusion.cfc.spring

+
+No usage of com.compoundtheory.coldfusion.cfc.spring +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/spring/constant-values.html b/api/spring/constant-values.html new file mode 100644 index 0000000..e1c5ae0 --- /dev/null +++ b/api/spring/constant-values.html @@ -0,0 +1,146 @@ + + + + + + +Constant Field Values + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Constant Field Values

+
+
+Contents + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/spring/deprecated-list.html b/api/spring/deprecated-list.html new file mode 100644 index 0000000..011f36b --- /dev/null +++ b/api/spring/deprecated-list.html @@ -0,0 +1,146 @@ + + + + + + +Deprecated List + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Deprecated API

+
+
+Contents + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/spring/help-doc.html b/api/spring/help-doc.html new file mode 100644 index 0000000..a9d3880 --- /dev/null +++ b/api/spring/help-doc.html @@ -0,0 +1,223 @@ + + + + + + +API Help + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+How This API Document Is Organized

+
+This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

+Overview

+
+ +

+The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

+

+Package

+
+ +

+Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

+
+

+Class/Interface

+
+ +

+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+ +

+Annotation Type

+
+ +

+Each annotation type has its own separate page with the following sections:

+
+ +

+Enum

+
+ +

+Each enum has its own separate page with the following sections:

+
+

+Use

+
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
+

+Tree (Class Hierarchy)

+
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object. +
+

+Deprecated API

+
+The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+

+Index

+
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+

+Prev/Next

+These links take you to the next or previous class, interface, package, or related page.

+Frames/No Frames

+These links show and hide the HTML frames. All pages are available with or without frames. +

+

+Serialized Form

+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description. +

+

+Constant Field Values

+The Constant Field Values page lists the static final fields and their values. +

+ + +This help file applies to API documentation generated using the standard doclet. + +
+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/spring/index-files/index-1.html b/api/spring/index-files/index-1.html new file mode 100644 index 0000000..e3998b6 --- /dev/null +++ b/api/spring/index-files/index-1.html @@ -0,0 +1,153 @@ + + + + + + +C-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +C G I R T
+

+C

+
+
ColdFusionBeanDefinitionParser - Class in com.compoundtheory.coldfusion.cfc.spring.config
Bean definition parser for the Spring namespace
ColdFusionBeanDefinitionParser() - +Constructor for class com.compoundtheory.coldfusion.cfc.spring.config.ColdFusionBeanDefinitionParser +
Constructor +
ColdFusionComponentFactory - Class in com.compoundtheory.coldfusion.cfc.spring
ScriptFactory for creating a CFC Dynamic Proxy to pass back to Spring + A lot of this was lifted from ScriptBeanDefinitionParser, so big + credit to that crew.
ColdFusionComponentFactory(String, Class<?>[]) - +Constructor for class com.compoundtheory.coldfusion.cfc.spring.ColdFusionComponentFactory +
  +
ColdFusionNamespaceHandler - Class in com.compoundtheory.coldfusion.cfc.spring.config
Namespace handler for the Spring XML namespace
ColdFusionNamespaceHandler() - +Constructor for class com.compoundtheory.coldfusion.cfc.spring.config.ColdFusionNamespaceHandler +
  +
com.compoundtheory.coldfusion.cfc.spring - package com.compoundtheory.coldfusion.cfc.spring
 
com.compoundtheory.coldfusion.cfc.spring.config - package com.compoundtheory.coldfusion.cfc.spring.config
 
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +C G I R T
+ + + diff --git a/api/spring/index-files/index-2.html b/api/spring/index-files/index-2.html new file mode 100644 index 0000000..4fa9274 --- /dev/null +++ b/api/spring/index-files/index-2.html @@ -0,0 +1,154 @@ + + + + + + +G-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +C G I R T
+

+G

+
+
getScriptedObject(ScriptSource, Class[]) - +Method in class com.compoundtheory.coldfusion.cfc.spring.ColdFusionComponentFactory +
  +
getScriptedObjectType(ScriptSource) - +Method in class com.compoundtheory.coldfusion.cfc.spring.ColdFusionComponentFactory +
returns null, as we are actually returning a proxy. +
getScriptInterfaces() - +Method in class com.compoundtheory.coldfusion.cfc.spring.ColdFusionComponentFactory +
  +
getScriptSourceLocator() - +Method in class com.compoundtheory.coldfusion.cfc.spring.ColdFusionComponentFactory +
  +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +C G I R T
+ + + diff --git a/api/spring/index-files/index-3.html b/api/spring/index-files/index-3.html new file mode 100644 index 0000000..365f718 --- /dev/null +++ b/api/spring/index-files/index-3.html @@ -0,0 +1,145 @@ + + + + + + +I-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +C G I R T
+

+I

+
+
init() - +Method in class com.compoundtheory.coldfusion.cfc.spring.config.ColdFusionNamespaceHandler +
  +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +C G I R T
+ + + diff --git a/api/spring/index-files/index-4.html b/api/spring/index-files/index-4.html new file mode 100644 index 0000000..02a49bf --- /dev/null +++ b/api/spring/index-files/index-4.html @@ -0,0 +1,148 @@ + + + + + + +R-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +C G I R T
+

+R

+
+
requiresConfigInterface() - +Method in class com.compoundtheory.coldfusion.cfc.spring.ColdFusionComponentFactory +
ColdFusion proxies require a config interface +
requiresScriptedObjectRefresh(ScriptSource) - +Method in class com.compoundtheory.coldfusion.cfc.spring.ColdFusionComponentFactory +
  +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +C G I R T
+ + + diff --git a/api/spring/index-files/index-5.html b/api/spring/index-files/index-5.html new file mode 100644 index 0000000..1c6442e --- /dev/null +++ b/api/spring/index-files/index-5.html @@ -0,0 +1,145 @@ + + + + + + +T-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +C G I R T
+

+T

+
+
toString() - +Method in class com.compoundtheory.coldfusion.cfc.spring.ColdFusionComponentFactory +
  +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +C G I R T
+ + + diff --git a/api/spring/index.html b/api/spring/index.html new file mode 100644 index 0000000..ff6deab --- /dev/null +++ b/api/spring/index.html @@ -0,0 +1,39 @@ + + + + + + +Generated Documentation (Untitled) + + + + + + + + + + + +<H2> +Frame Alert</H2> + +<P> +This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. +<BR> +Link to<A HREF="overview-summary.html">Non-frame version.</A> + + + diff --git a/api/spring/overview-frame.html b/api/spring/overview-frame.html new file mode 100644 index 0000000..7bb138e --- /dev/null +++ b/api/spring/overview-frame.html @@ -0,0 +1,44 @@ + + + + + + +Overview List + + + + + + + + + + + + + + + +
+
+ + + + + +
All Classes +

+ +Packages +
+com.compoundtheory.coldfusion.cfc.spring +
+com.compoundtheory.coldfusion.cfc.spring.config +
+

+ +

+  + + diff --git a/api/spring/overview-summary.html b/api/spring/overview-summary.html new file mode 100644 index 0000000..2a1a2bb --- /dev/null +++ b/api/spring/overview-summary.html @@ -0,0 +1,160 @@ + + + + + + +Overview + + + + + + + + + + + + +


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+JavaLoader Spring Integration +

+
+ + + + + + + + + + + + + +
+Packages
com.compoundtheory.coldfusion.cfc.spring 
com.compoundtheory.coldfusion.cfc.spring.config 
+ +


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/spring/overview-tree.html b/api/spring/overview-tree.html new file mode 100644 index 0000000..4257369 --- /dev/null +++ b/api/spring/overview-tree.html @@ -0,0 +1,159 @@ + + + + + + +Class Hierarchy + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Hierarchy For All Packages

+
+
+
Package Hierarchies:
com.compoundtheory.coldfusion.cfc.spring, com.compoundtheory.coldfusion.cfc.spring.config
+
+

+Class Hierarchy +

+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/api/spring/package-list b/api/spring/package-list new file mode 100644 index 0000000..6db6f65 --- /dev/null +++ b/api/spring/package-list @@ -0,0 +1,2 @@ +com.compoundtheory.coldfusion.cfc.spring +com.compoundtheory.coldfusion.cfc.spring.config diff --git a/api/spring/resources/inherit.gif b/api/spring/resources/inherit.gif new file mode 100644 index 0000000..c814867 Binary files /dev/null and b/api/spring/resources/inherit.gif differ diff --git a/api/spring/stylesheet.css b/api/spring/stylesheet.css new file mode 100644 index 0000000..6ea9e51 --- /dev/null +++ b/api/spring/stylesheet.css @@ -0,0 +1,29 @@ +/* Javadoc style sheet */ + +/* Define colors, fonts and other style attributes here to override the defaults */ + +/* Page background color */ +body { background-color: #FFFFFF; color:#000000 } + +/* Headings */ +h1 { font-size: 145% } + +/* Table colors */ +.TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve */ +.TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve */ +.TableRowColor { background: #FFFFFF; color:#000000 } /* White */ + +/* Font used in left-hand frame lists */ +.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 } +.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } +.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } + +/* Navigation bar fonts and colors */ +.NavBarCell1 { background-color:#EEEEFF; color:#000000} /* Light mauve */ +.NavBarCell1Rev { background-color:#00008B; color:#FFFFFF} /* Dark Blue */ +.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;} +.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;} + +.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} +.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} + diff --git a/docs/gen/index.cfm b/docs/gen/index.cfm deleted file mode 100644 index 1607571..0000000 --- a/docs/gen/index.cfm +++ /dev/null @@ -1,21 +0,0 @@ - - - - - base = expandPath("/javaloader"); - path = expandPath("../api/javaloader"); - - colddoc = createObject("component", "colddoc.ColdDoc").init(); - strategy = createObject("component", "colddoc.strategy.api.HTMLAPIStrategy").init(path, "JavaLoader - 1.1"); - colddoc.setStrategy(strategy); - - colddoc.generate(base, "javaloader"); - - -

Done!

- -

-#now()# -

- -Documentation diff --git a/example/compileHelloWorld/index.cfm b/example/compileHelloWorld/index.cfm deleted file mode 100644 index f4f67b6..0000000 --- a/example/compileHelloWorld/index.cfm +++ /dev/null @@ -1,44 +0,0 @@ - - JavaLoader Compilation Example - - -

- Example of creating a 'HelloWorld' Java object, by compiling the Java source dynamically. -

-

- The source for the HelloWord class can be found in /src. -

- - - /* - An array of source paths to be dynamically compiled by JavaLoader. - In this case we are just loading the ./src directory - */ - sourcePaths = [expandPath("./src")]; - - /* - While we can combine .jar loading and compilation, we are just going to compile and load our - HelloWorld example from its source. - */ - loader = createObject("component", "javaloader.JavaLoader").init(sourceDirectories=sourcePaths); - - //create an instance of hello world - hello = loader.create("HelloWorld").init(); - - -

I say: Hello Java!
- Java says: - - #hello.hello()# -

- -

- HelloWorld.java -

- - \ No newline at end of file diff --git a/example/compileHelloWorld/src/HelloWorld.java b/example/compileHelloWorld/src/HelloWorld.java deleted file mode 100644 index 2fbabc7..0000000 --- a/example/compileHelloWorld/src/HelloWorld.java +++ /dev/null @@ -1,12 +0,0 @@ -public class HelloWorld -{ - public HelloWorld() - { - //do nothing - } - - public String hello() - { - return "Hello World"; - } -} \ No newline at end of file diff --git a/example/dynamicProxy/StringLenComparator.cfc b/example/dynamicProxy/StringLenComparator.cfc deleted file mode 100644 index 418486e..0000000 --- a/example/dynamicProxy/StringLenComparator.cfc +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - var len1 = Len(arguments.obj1); - var len2 = Len(arguments.obj2); - var result = 0; - - if(len1 lt len2) - { - result = -1; - } - else if(len1 gt len2) - { - result = 1; - } - - //have to java cast to make sure it corresponds to the interface - return JavaCast("int", result); - - - - - - - return false; - - - - - - - - \ No newline at end of file diff --git a/example/dynamicProxy/index.cfm b/example/dynamicProxy/index.cfm deleted file mode 100644 index ffe1877..0000000 --- a/example/dynamicProxy/index.cfm +++ /dev/null @@ -1,62 +0,0 @@ - - JavaLoader Dynamic Proxy Example - - -

- This is an example of how we can use the ColdFusion Component Dynamic Proxy to pass a CFC to a Java Object - and have the Java Object think that it is simply an instance of a Java Interface. -

-

- In this example, we will take an array of Strings, and sort them by the number of letters in each String. -

-

- We will use the dynamic proxy so we can use a ColdFusion Component as a Comparator - in a Collections.sort() call, thus - demonstrating how we can achieve seamlesss communication from Java Objects to ColdFusion Components -

- - //this is our array to sort - stringArray = ["Hello", "GoodBye", "Yes", "No", "Wait a second!", "Do something"]; - - //keep a copy to show - originalStringArray = duplicate(stringArray); - - //add the javaloader dynamic proxy library to javaloader - libpaths = []; - ArrayAppend(libpaths, expandPath("/javaloader/support/cfcdynamicproxy/lib/cfcdynamicproxy.jar")); - - //we HAVE to load the ColdFusion class path to use the dynamic proxy, as it uses ColdFusion's classes - loader = createObject("component", "javaloader.JavaLoader").init(loadPaths=libpaths, loadColdFusionClassPath=true); - - //grab us Collections - Collections = createObject("java", "java.util.Collections"); - - //get a reference to the dynamic proxy class - CFCDynamicProxy = loader.create("com.compoundtheory.coldfusion.cfc.CFCDynamicProxy"); - - //grab us our CFC that will act as a comparator - comparator = createObject("component", "StringLenComparator"); - - //we can pass in an array of strings which name all the interfaces we want out dynamic proxy to implement - interfaces = ["java.util.Comparator"]; - - //create the proxy we will pass to the Collections object - comparatorProxy = CFCDynamicProxy.createInstance(comparator, interfaces); - - Collections.sort(stringArray, comparatorProxy); - -

- The original string array: - -

-

- The sorted String array, by string length - -

- - \ No newline at end of file diff --git a/example/loadHelloWorld/helloworld.jar b/example/loadHelloWorld/helloworld.jar deleted file mode 100644 index a12f2d1..0000000 Binary files a/example/loadHelloWorld/helloworld.jar and /dev/null differ diff --git a/example/loadHelloWorld/index.cfm b/example/loadHelloWorld/index.cfm deleted file mode 100644 index 690a76a..0000000 --- a/example/loadHelloWorld/index.cfm +++ /dev/null @@ -1,63 +0,0 @@ - - JavaLoader JAR Load Example - - -

- Example of creating a 'HelloWorld' Java object, by pulling in an external JAR file. -

- -

- The Jar file only contains a single class, 'HelloWorld', which is outlined below: -

- - - paths = arrayNew(1); - - /* - This points to the jar we want to load. - Could also load a directory of .class files - */ - paths[1] = expandPath("helloworld.jar"); - - //create the loader - loader = createObject("component", "javaloader.JavaLoader").init(paths); - - //at this stage we only have access to the class, but we don't have an instance - HelloWorld = loader.create("HelloWorld"); - - /* - Create the instance, just like me would in createObject("java", "HelloWorld").init() - This also could have been done in one line - loader.create("HelloWorld").init(); - */ - hello = HelloWorld.init(); - - -

I say: Hello Java!
- Java says: - - #hello.hello()# -

- -HelloWorld.java -
-public class HelloWorld
-{
-	public HelloWorld()
-	{
-		//do nothing
-	}
-
-	public String hello()
-	{
-		return "Hello World";
-	}
-}
-
- - - diff --git a/example/spring/Message.cfc b/example/spring/Message.cfc deleted file mode 100644 index b55320e..0000000 --- a/example/spring/Message.cfc +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - setMessage("Hello from Spring!"); - - return this; - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/example/spring/index.cfm b/example/spring/index.cfm deleted file mode 100644 index 4037595..0000000 --- a/example/spring/index.cfm +++ /dev/null @@ -1,70 +0,0 @@ - - JavaLoader Spring Example - - -

- In this example we will be using the Spring integration that enables us to use ColdFusion components inside Spring. -

-

- Some bootstrap code will be neccessary to make Spring work in this environment. -

-

- We will also being using the dynamic compilation power of JavaLoader to provide the Java objects that Spring is going to utilise -

-

- We will create a Java Object called MessageReciever, which will take a CFC named 'Message', - which has a method called 'getMessage()', which the Java object will call. -

- - - libpaths = []; - - //MUST have Spring in our classpath - ArrayAppend(libpaths, expandPath("./lib/spring.jar")); - //MUST have the cglib library for run time proxying in Spring - ArrayAppend(libpaths, expandPath("./lib/cglib-nodep-2.1_3.jar")); - - //MUST have the JavaLoader's ColdFusion Dynamic Proxy - ArrayAppend(libpaths, expandPath("/javaloader/support/cfcdynamicproxy/lib/cfcdynamicproxy.jar")); - //MUST include the JavaLoader's Spring Integration library - ArrayAppend(libpaths, expandPath("/javaloader/support/spring/lib/spring-coldfusion.jar")); - - //this is the directory that stores all our Java source - srcpaths = [ expandPath("./src") ]; - - //We have to load the ColdFusion classpath as the ColdFusion dynamic proxy requires it. - loader = createObject("component", "javaloader.JavaLoader").init(loadPaths=libpaths, loadColdFusionClassPath=true, sourceDirectories=srcpaths); - - //this is the path to our XML file. Note the 'file://' prefix, this is important to Spring - path = "file://" & expandPath("./spring.xml"); - //Some windows users need to use this: path = "file:/" & expandPath("./spring.xml"); - - //The FileSystemXMLApplicationContext I find is the easiest way to load up Spring - spring = loader.create("org.springframework.context.support.FileSystemXmlApplicationContext").init(); - - /* - we HAVE to set the classloader from JavaLoader as the Spring ClassLoader, so Spring knows where - to create Java Object from. - */ - spring.setClassLoader(loader.getURLClassLoader()); - - spring.setConfigLocation(path); - - spring.refresh(); - - //finally, after all that, let's grab our MessageReciever Java Object! - messageReceiver = spring.getBean("messageReceiver"); - -

- Spring Says: - - #messageReceiver.getMessage().getMessage()# - -

- - \ No newline at end of file diff --git a/example/spring/lib/cglib-nodep-2.1_3.jar b/example/spring/lib/cglib-nodep-2.1_3.jar deleted file mode 100644 index e9b17eb..0000000 Binary files a/example/spring/lib/cglib-nodep-2.1_3.jar and /dev/null differ diff --git a/example/spring/lib/spring.jar b/example/spring/lib/spring.jar deleted file mode 100644 index d0b3ce6..0000000 Binary files a/example/spring/lib/spring.jar and /dev/null differ diff --git a/example/spring/spring.xml b/example/spring/spring.xml deleted file mode 100644 index 29eeaaf..0000000 --- a/example/spring/spring.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - diff --git a/example/spring/src/com/IMessage.java b/example/spring/src/com/IMessage.java deleted file mode 100644 index 26a5b9c..0000000 --- a/example/spring/src/com/IMessage.java +++ /dev/null @@ -1,18 +0,0 @@ -package com; - -/** - * A simple interface for storing a message - * @author Mark Mandel - */ -public interface IMessage -{ - /** - * Initialisation - */ - public void init(); - - /** - * Returns the message held by this object - */ - public String getMessage(); -} \ No newline at end of file diff --git a/example/spring/src/com/MessageReceiver.java b/example/spring/src/com/MessageReceiver.java deleted file mode 100644 index 0ed8c31..0000000 --- a/example/spring/src/com/MessageReceiver.java +++ /dev/null @@ -1,27 +0,0 @@ -package com; - -/** - * A class that should recieve a message - * @author Mark Mandel - * - */ -public class MessageReceiver -{ - private IMessage message; - - public MessageReceiver() - { - //we don't do much here - } - - //get/set methods for Spring to fill - public IMessage getMessage() - { - return message; - } - - public void setMessage(IMessage message) - { - this.message = message; - } -} \ No newline at end of file diff --git a/java/cfcdynamicproxy/build.xml b/java/cfcdynamicproxy/build.xml deleted file mode 100644 index f03c24c..0000000 --- a/java/cfcdynamicproxy/build.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/java/cfcdynamicproxy/licence.txt b/java/cfcdynamicproxy/licence.txt deleted file mode 100644 index c9990a7..0000000 --- a/java/cfcdynamicproxy/licence.txt +++ /dev/null @@ -1,213 +0,0 @@ -Common Public License Version 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC -LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM -CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - - a) in the case of the initial Contributor, the initial code and -documentation distributed under this Agreement, and - - b) in the case of each subsequent Contributor: - - i) changes to the Program, and - - ii) additions to the Program; - - where such changes and/or additions to the Program originate from and are -distributed by that particular Contributor. A Contribution 'originates' from a -Contributor if it was added to the Program by such Contributor itself or anyone -acting on such Contributor's behalf. Contributions do not include additions to -the Program which: (i) are separate modules of software distributed in -conjunction with the Program under their own license agreement, and (ii) are not -derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents " mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, -including all Contributors. - -2. GRANT OF RIGHTS - - a) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free copyright license to -reproduce, prepare derivative works of, publicly display, publicly perform, -distribute and sublicense the Contribution of such Contributor, if any, and such -derivative works, in source code and object code form. - - b) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed -Patents to make, use, sell, offer to sell, import and otherwise transfer the -Contribution of such Contributor, if any, in source code and object code form. -This patent license shall apply to the combination of the Contribution and the -Program if, at the time the Contribution is added by the Contributor, such -addition of the Contribution causes such combination to be covered by the -Licensed Patents. The patent license shall not apply to any other combinations -which include the Contribution. No hardware per se is licensed hereunder. - - c) Recipient understands that although each Contributor grants the licenses -to its Contributions set forth herein, no assurances are provided by any -Contributor that the Program does not infringe the patent or other intellectual -property rights of any other entity. Each Contributor disclaims any liability to -Recipient for claims brought by any other entity based on infringement of -intellectual property rights or otherwise. As a condition to exercising the -rights and licenses granted hereunder, each Recipient hereby assumes sole -responsibility to secure any other intellectual property rights needed, if any. -For example, if a third party patent license is required to allow Recipient to -distribute the Program, it is Recipient's responsibility to acquire that license -before distributing the Program. - - d) Each Contributor represents that to its knowledge it has sufficient -copyright rights in its Contribution, if any, to grant the copyright license set -forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its -own license agreement, provided that: - - a) it complies with the terms and conditions of this Agreement; and - - b) its license agreement: - - i) effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title and -non-infringement, and implied warranties or conditions of merchantability and -fitness for a particular purpose; - - ii) effectively excludes on behalf of all Contributors all liability for -damages, including direct, indirect, special, incidental and consequential -damages, such as lost profits; - - iii) states that any provisions which differ from this Agreement are offered -by that Contributor alone and not by any other party; and - - iv) states that source code for the Program is available from such -Contributor, and informs licensees how to obtain it in a reasonable manner on or -through a medium customarily used for software exchange. - -When the Program is made available in source code form: - - a) it must be made available under this Agreement; and - - b) a copy of this Agreement must be included with each copy of the Program. - -Contributors may not remove or alter any copyright notices contained within the -Program. - -Each Contributor must identify itself as the originator of its Contribution, if -any, in a manner that reasonably allows subsequent Recipients to identify the -originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this license is -intended to facilitate the commercial use of the Program, the Contributor who -includes the Program in a commercial product offering should do so in a manner -which does not create potential liability for other Contributors. Therefore, if -a Contributor includes the Program in a commercial product offering, such -Contributor ("Commercial Contributor") hereby agrees to defend and indemnify -every other Contributor ("Indemnified Contributor") against any losses, damages -and costs (collectively "Losses") arising from claims, lawsuits and other legal -actions brought by a third party against the Indemnified Contributor to the -extent caused by the acts or omissions of such Commercial Contributor in -connection with its distribution of the Program in a commercial product -offering. The obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In order -to qualify, an Indemnified Contributor must: a) promptly notify the Commercial -Contributor in writing of such claim, and b) allow the Commercial Contributor to -control, and cooperate with the Commercial Contributor in, the defense and any -related settlement negotiations. The Indemnified Contributor may participate in -any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product -offering, Product X. That Contributor is then a Commercial Contributor. If that -Commercial Contributor then makes performance claims, or offers warranties -related to Product X, those performance claims and warranties are such -Commercial Contributor's responsibility alone. Under this section, the -Commercial Contributor would have to defend claims against the other -Contributors related to those performance claims and warranties, and if a court -requires any other Contributor to pay any damages as a result, the Commercial -Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR -IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each -Recipient is solely responsible for determining the appropriateness of using and -distributing the Program and assumes all risks associated with its exercise of -rights under this Agreement, including but not limited to the risks and costs of -program errors, compliance with applicable laws, damage to or loss of data, -programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY -CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST -PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS -GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of the -terms of this Agreement, and without further action by the parties hereto, such -provision shall be reformed to the minimum extent necessary to make such -provision valid and enforceable. - -If Recipient institutes patent litigation against a Contributor with respect to -a patent applicable to software (including a cross-claim or counterclaim in a -lawsuit), then any patent licenses granted by that Contributor to such Recipient -under this Agreement shall terminate as of the date such litigation is filed. In -addition, if Recipient institutes patent litigation against any entity -(including a cross-claim or counterclaim in a lawsuit) alleging that the Program -itself (excluding combinations of the Program with other software or hardware) -infringes such Recipient's patent(s), then such Recipient's rights granted under -Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to -comply with any of the material terms or conditions of this Agreement and does -not cure such failure in a reasonable period of time after becoming aware of -such noncompliance. If all Recipient's rights under this Agreement terminate, -Recipient agrees to cease use and distribution of the Program as soon as -reasonably practicable. However, Recipient's obligations under this Agreement -and any licenses granted by Recipient relating to the Program shall continue and -survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in -order to avoid inconsistency the Agreement is copyrighted and may only be -modified in the following manner. The Agreement Steward reserves the right to -publish new versions (including revisions) of this Agreement from time to time. -No one other than the Agreement Steward has the right to modify this Agreement. -IBM is the initial Agreement Steward. IBM may assign the responsibility to serve -as the Agreement Steward to a suitable separate entity. Each new version of the -Agreement will be given a distinguishing version number. The Program (including -Contributions) may always be distributed subject to the version of the Agreement -under which it was received. In addition, after a new version of the Agreement -is published, Contributor may elect to distribute the Program (including its -Contributions) under the new version. Except as expressly stated in Sections -2(a) and 2(b) above, Recipient receives no rights or licenses to the -intellectual property of any Contributor under this Agreement, whether -expressly, by implication, estoppel or otherwise. All rights in the Program not -expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the -intellectual property laws of the United States of America. No party to this -Agreement will bring a legal action under this Agreement more than one year -after the cause of action arose. Each party waives its rights to a jury trial in -any resulting litigation. diff --git a/java/cfcdynamicproxy/src/com/compoundtheory/coldfusion/cfc/CFCDynamicProxy.java b/java/cfcdynamicproxy/src/com/compoundtheory/coldfusion/cfc/CFCDynamicProxy.java deleted file mode 100644 index 9ab9b3e..0000000 --- a/java/cfcdynamicproxy/src/com/compoundtheory/coldfusion/cfc/CFCDynamicProxy.java +++ /dev/null @@ -1,372 +0,0 @@ -/** - * - */ -package com.compoundtheory.coldfusion.cfc; - -import java.io.File; -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.Method; -import java.lang.reflect.Proxy; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.jsp.PageContext; - -import coldfusion.cfc.DummyHttpServletRequest; -import coldfusion.cfc.DummyHttpServletResponse; -import coldfusion.filter.FusionContext; -import coldfusion.runtime.NeoPageContext; -import coldfusion.runtime.TemplateProxy; -import coldfusion.runtime.TemplateProxyFactory; -import coldfusion.xml.rpc.CFCServlet; - -/** - * This is a dynamic proxy for ColdFusion components, for complete - * interoperability between CFCs and Java objects,. - * - * Creation of the Proxy is done through one of the several createInstance() methods. - * - * @author Mark Mandel - * - */ -public class CFCDynamicProxy implements InvocationHandler -{ - private TemplateProxy cfc; - private FusionContext backupFusionContext; - - private static enum ObjectMethod { - - HASHCODE("hashCode"); - - public final String name; - private ObjectMethod(String name) - { - this.name = name; - } - } - - private static final Map METHOD_MAP = new HashMap(); - static { - for(ObjectMethod method : ObjectMethod.values()) - { - METHOD_MAP.put(method.name, method); - } - } - - /** - * Private constructor - * @param cfc the CFC that this Proxy wraps - */ - private CFCDynamicProxy(TemplateProxy cfc) - { - configure(cfc); - } - - /** - * Private constructor - * @param path the path to the CFC that this proxy wraps. - * @throws Throwable - */ - private CFCDynamicProxy(String path) throws Throwable - { - TemplateProxy cfc = TemplateProxyFactory.resolveFile(FusionContext.getCurrent().pageContext, new File(path), null); - - configure(cfc); - } - - /** - * Private constructor - * @param file A file that points to the CFC this proxy will wrap. - * @throws Throwable - */ - private CFCDynamicProxy(File file) throws Throwable - { - TemplateProxy cfc = TemplateProxyFactory.resolveFile(FusionContext.getCurrent().pageContext, file, null); - - configure(cfc); - } - - private void configure(TemplateProxy cfc) - { - setCFC(cfc); - - //we will make the assumption that when creating the proxy, we are on a CF Context - - FusionContext currentContext = FusionContext.getCurrent(); - - FusionContext backupContext = new FusionContext(); - - backupContext.setSecureCredentials(currentContext.getSecureUsername(), currentContext.getSecurePassword()); - backupContext.setUseMappings(currentContext.getUseMappings()); - - ServletRequest request = new DummyHttpServletRequest(backupContext.getPagePath()); - ServletResponse response = new DummyHttpServletResponse(System.out); - - backupContext.setServletObjects(CFCServlet.getCFCServlet(), request, response); - - backupContext.setPagePath(currentContext.getPagePath()); - - backupContext.setApplicationName(currentContext.getApplicationName()); - - try - { - backupContext.SymTab_initForRequest(true); - } - catch (Throwable e) - { - e.printStackTrace(); - } - - setBackupFusionContext(backupContext); - } - - /** - * Create a proxy instance - * @param path The File that points to the CFC - * @param interfaces the proxy will implement - * @return the proxy that implements the interfaces given - * @throws Throwable if there is an error in the CFC - */ - public static Object createInstance(File path, Class[] interfaces) throws Throwable - { - CFCDynamicProxy proxy = new CFCDynamicProxy(path); - - return createInstance(proxy, interfaces); - } - - /** - * Create a proxy instance - * @param path Absolute path to the CFC we want to proxy - * @param interfaces the proxy will implement - * @return the proxy that implements the interfaces given - * @throws Throwable if there is an error in the CFC - */ - public static Object createInstance(String path, Class[] interfaces) throws Throwable - { - CFCDynamicProxy proxy = new CFCDynamicProxy(path); - - return createInstance(proxy, interfaces); - } - - /** - * Create a proxy instance - * @param path The File that points to the CFC - * @param interfaces An array of the names of the classes that this proxy will implement. - * @return the proxy that implements the interfaces given - * @throws Throwable if there is an error in the CFC - */ - public static Object createInstance(File path, String[] interfaces) throws Throwable - { - Class[] resolvedInterfaces = resolveInterfaces(interfaces); - - CFCDynamicProxy proxy = new CFCDynamicProxy(path); - - return createInstance(proxy, resolvedInterfaces); - } - - /** - * Create a proxy instance - * @param path Absolute path to the CFC we want to proxy - * @param interfaces An array of the names of the classes that this proxy will implement. - * @return the proxy that implements the interfaces given - * @throws Throwable if there is an error in the CFC - */ - public static Object createInstance(String path, String[] interfaces) throws Throwable - { - Class[] resolvedInterfaces = resolveInterfaces(interfaces); - - CFCDynamicProxy proxy = new CFCDynamicProxy(path); - - return createInstance(proxy, resolvedInterfaces); - } - - /** - * Create a proxy instance - * @param path Absolute path to the CFC we want to proxy - * @param interfaces A List of the names of the classes that this proxy will implement. - * @return the proxy that implements the interfaces given - * @throws Throwable if there is an error in the CFC - */ - public static Object createInstance(String path, List interfaces) throws Throwable - { - Class[] resolvedInterfaces = resolveInterfaces(interfaces.toArray(new String[0])); - - CFCDynamicProxy proxy = new CFCDynamicProxy(path); - - return createInstance(proxy, resolvedInterfaces); - } - - /** - * Create a proxy instance - * @param cfc An actual CFC to pass in to the proxy. - * @param interfaces the proxy will implement - * @return the proxy that implements the interfaces given - */ - public static Object createInstance(TemplateProxy cfc, Class[] interfaces) - { - CFCDynamicProxy proxy = new CFCDynamicProxy(cfc); - - return createInstance(proxy, interfaces); - } - - /** - * Create a proxy instance - * @param cfc An actual CFC to pass in to the proxy. - * @param interfaces An array of the names of the classes that this proxy will implement. - * @return the proxy that implements the interfaces given - * @throws Throwable if there is an error in the CFC - */ - public static Object createInstance(TemplateProxy cfc, String[] interfaces) throws Throwable - { - Class[] resolvedInterfaces = resolveInterfaces(interfaces); - - CFCDynamicProxy proxy = new CFCDynamicProxy(cfc); - - return createInstance(proxy, resolvedInterfaces); - } - - /** - * Create a proxy instance - * @param cfc An actual CFC to pass in to the proxy. - * @param interfaces A List of the names of the classes that this proxy will implement. - * @return the proxy that implements the interfaces given - * @throws Throwable if there is an error in the CFC - */ - public static Object createInstance(TemplateProxy cfc, List interfaces) throws Throwable - { - Class[] resolvedInterfaces = resolveInterfaces(interfaces.toArray(new String[0])); - - CFCDynamicProxy proxy = new CFCDynamicProxy(cfc); - - return createInstance(proxy, resolvedInterfaces); - } - - - /** - * utility method to create the actual dynamic proxy instance - * @param proxy An instance of this class to use as the InvocationHandler - * @param interfaces class array for the dynamic proxy - * @return - */ - private static Object createInstance(CFCDynamicProxy proxy, Class[] interfaces) - { - return Proxy.newProxyInstance(proxy.getClass().getClassLoader(), interfaces, proxy); - } - - /** - * Turns an array of string class names into an array of classes. - * @param interfaces the array of class names - * @return an actual class array - * @throws ClassNotFoundException if the Class cannot be found - */ - private static Class[] resolveInterfaces(String[] interfaces) throws ClassNotFoundException - { - Class[] resolvedInterfaces = new Class[interfaces.length]; - - ClassLoader classLoader = CFCDynamicProxy.class.getClassLoader(); - - for(int counter = 0; counter < interfaces.length; counter++) - { - resolvedInterfaces[counter] = classLoader.loadClass(interfaces[counter]); - } - - return resolvedInterfaces; - } - - /* (non-Javadoc) - * @see java.lang.reflect.InvocationHandler#invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) - */ - @Override - public Object invoke(Object proxy, Method method, Object[] args) throws Throwable - { - if(args == null) - { - args = new Object[0]; - } - - try - { - return getCFC().invoke(method.getName(), args, getCurrentFusionContext()); - } - catch(TemplateProxy.InvalidMethodNameException exc) - { - /** - * This is here because when reporting exceptions, CF will ask for the - * hashCode of the object, so we will have a backup for certain methods - * if need be. - */ - String name = method.getName(); - if(METHOD_MAP.containsKey(name)) - { - ObjectMethod objectMethod = METHOD_MAP.get(name); - - switch(objectMethod) - { - case HASHCODE: - return getCFC().hashCode(); - - } - } - - throw exc; - } - } - - /** - * Returns the current FusionContext for the given Thread. - * If there isn't one, clone's the backup context and uses that instead. - * @throws Throwable - * @throws CloneNotSupportedException - */ - private PageContext getCurrentFusionContext() throws Throwable - { - FusionContext currentContext = FusionContext.getCurrent(); - - if(currentContext == null) - { - try - { - currentContext = (FusionContext)getBackupFusionContext().clone(); - currentContext.SymTab_initForRequest(true); - - FusionContext.setCurrent(currentContext); - } - catch (CloneNotSupportedException e) - { - System.out.println("Really?"); - e.printStackTrace(); - } - } - - //System.out.println("Returning page context (5): "); - //System.out.println(currentContext.pageContext == null ? "false" : "true"); - - return currentContext.pageContext; - } - - - private TemplateProxy getCFC() - { - return cfc; - } - - private void setCFC(TemplateProxy cfc) - { - this.cfc = cfc; - } - - private FusionContext getBackupFusionContext() - { - return backupFusionContext; - } - - private void setBackupFusionContext(FusionContext backupFusionContext) - { - this.backupFusionContext = backupFusionContext; - } - - -} diff --git a/java/javaloader-spring/build.xml b/java/javaloader-spring/build.xml deleted file mode 100644 index f9cfecb..0000000 --- a/java/javaloader-spring/build.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/java/javaloader-spring/licence.txt b/java/javaloader-spring/licence.txt deleted file mode 100644 index c9990a7..0000000 --- a/java/javaloader-spring/licence.txt +++ /dev/null @@ -1,213 +0,0 @@ -Common Public License Version 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC -LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM -CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - - a) in the case of the initial Contributor, the initial code and -documentation distributed under this Agreement, and - - b) in the case of each subsequent Contributor: - - i) changes to the Program, and - - ii) additions to the Program; - - where such changes and/or additions to the Program originate from and are -distributed by that particular Contributor. A Contribution 'originates' from a -Contributor if it was added to the Program by such Contributor itself or anyone -acting on such Contributor's behalf. Contributions do not include additions to -the Program which: (i) are separate modules of software distributed in -conjunction with the Program under their own license agreement, and (ii) are not -derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents " mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, -including all Contributors. - -2. GRANT OF RIGHTS - - a) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free copyright license to -reproduce, prepare derivative works of, publicly display, publicly perform, -distribute and sublicense the Contribution of such Contributor, if any, and such -derivative works, in source code and object code form. - - b) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed -Patents to make, use, sell, offer to sell, import and otherwise transfer the -Contribution of such Contributor, if any, in source code and object code form. -This patent license shall apply to the combination of the Contribution and the -Program if, at the time the Contribution is added by the Contributor, such -addition of the Contribution causes such combination to be covered by the -Licensed Patents. The patent license shall not apply to any other combinations -which include the Contribution. No hardware per se is licensed hereunder. - - c) Recipient understands that although each Contributor grants the licenses -to its Contributions set forth herein, no assurances are provided by any -Contributor that the Program does not infringe the patent or other intellectual -property rights of any other entity. Each Contributor disclaims any liability to -Recipient for claims brought by any other entity based on infringement of -intellectual property rights or otherwise. As a condition to exercising the -rights and licenses granted hereunder, each Recipient hereby assumes sole -responsibility to secure any other intellectual property rights needed, if any. -For example, if a third party patent license is required to allow Recipient to -distribute the Program, it is Recipient's responsibility to acquire that license -before distributing the Program. - - d) Each Contributor represents that to its knowledge it has sufficient -copyright rights in its Contribution, if any, to grant the copyright license set -forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its -own license agreement, provided that: - - a) it complies with the terms and conditions of this Agreement; and - - b) its license agreement: - - i) effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title and -non-infringement, and implied warranties or conditions of merchantability and -fitness for a particular purpose; - - ii) effectively excludes on behalf of all Contributors all liability for -damages, including direct, indirect, special, incidental and consequential -damages, such as lost profits; - - iii) states that any provisions which differ from this Agreement are offered -by that Contributor alone and not by any other party; and - - iv) states that source code for the Program is available from such -Contributor, and informs licensees how to obtain it in a reasonable manner on or -through a medium customarily used for software exchange. - -When the Program is made available in source code form: - - a) it must be made available under this Agreement; and - - b) a copy of this Agreement must be included with each copy of the Program. - -Contributors may not remove or alter any copyright notices contained within the -Program. - -Each Contributor must identify itself as the originator of its Contribution, if -any, in a manner that reasonably allows subsequent Recipients to identify the -originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this license is -intended to facilitate the commercial use of the Program, the Contributor who -includes the Program in a commercial product offering should do so in a manner -which does not create potential liability for other Contributors. Therefore, if -a Contributor includes the Program in a commercial product offering, such -Contributor ("Commercial Contributor") hereby agrees to defend and indemnify -every other Contributor ("Indemnified Contributor") against any losses, damages -and costs (collectively "Losses") arising from claims, lawsuits and other legal -actions brought by a third party against the Indemnified Contributor to the -extent caused by the acts or omissions of such Commercial Contributor in -connection with its distribution of the Program in a commercial product -offering. The obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In order -to qualify, an Indemnified Contributor must: a) promptly notify the Commercial -Contributor in writing of such claim, and b) allow the Commercial Contributor to -control, and cooperate with the Commercial Contributor in, the defense and any -related settlement negotiations. The Indemnified Contributor may participate in -any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product -offering, Product X. That Contributor is then a Commercial Contributor. If that -Commercial Contributor then makes performance claims, or offers warranties -related to Product X, those performance claims and warranties are such -Commercial Contributor's responsibility alone. Under this section, the -Commercial Contributor would have to defend claims against the other -Contributors related to those performance claims and warranties, and if a court -requires any other Contributor to pay any damages as a result, the Commercial -Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR -IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each -Recipient is solely responsible for determining the appropriateness of using and -distributing the Program and assumes all risks associated with its exercise of -rights under this Agreement, including but not limited to the risks and costs of -program errors, compliance with applicable laws, damage to or loss of data, -programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY -CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST -PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS -GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of the -terms of this Agreement, and without further action by the parties hereto, such -provision shall be reformed to the minimum extent necessary to make such -provision valid and enforceable. - -If Recipient institutes patent litigation against a Contributor with respect to -a patent applicable to software (including a cross-claim or counterclaim in a -lawsuit), then any patent licenses granted by that Contributor to such Recipient -under this Agreement shall terminate as of the date such litigation is filed. In -addition, if Recipient institutes patent litigation against any entity -(including a cross-claim or counterclaim in a lawsuit) alleging that the Program -itself (excluding combinations of the Program with other software or hardware) -infringes such Recipient's patent(s), then such Recipient's rights granted under -Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to -comply with any of the material terms or conditions of this Agreement and does -not cure such failure in a reasonable period of time after becoming aware of -such noncompliance. If all Recipient's rights under this Agreement terminate, -Recipient agrees to cease use and distribution of the Program as soon as -reasonably practicable. However, Recipient's obligations under this Agreement -and any licenses granted by Recipient relating to the Program shall continue and -survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in -order to avoid inconsistency the Agreement is copyrighted and may only be -modified in the following manner. The Agreement Steward reserves the right to -publish new versions (including revisions) of this Agreement from time to time. -No one other than the Agreement Steward has the right to modify this Agreement. -IBM is the initial Agreement Steward. IBM may assign the responsibility to serve -as the Agreement Steward to a suitable separate entity. Each new version of the -Agreement will be given a distinguishing version number. The Program (including -Contributions) may always be distributed subject to the version of the Agreement -under which it was received. In addition, after a new version of the Agreement -is published, Contributor may elect to distribute the Program (including its -Contributions) under the new version. Except as expressly stated in Sections -2(a) and 2(b) above, Recipient receives no rights or licenses to the -intellectual property of any Contributor under this Agreement, whether -expressly, by implication, estoppel or otherwise. All rights in the Program not -expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the -intellectual property laws of the United States of America. No party to this -Agreement will bring a legal action under this Agreement more than one year -after the cause of action arose. Each party waives its rights to a jury trial in -any resulting litigation. diff --git a/java/javaloader-spring/src/META-INF/spring.handlers b/java/javaloader-spring/src/META-INF/spring.handlers deleted file mode 100644 index fc657e0..0000000 --- a/java/javaloader-spring/src/META-INF/spring.handlers +++ /dev/null @@ -1,2 +0,0 @@ -http\://www.compoundtheory.com/javaloader/schema/coldfusion=com.compoundtheory.coldfusion.cfc.spring.config.ColdFusionNamespaceHandler - diff --git a/java/javaloader-spring/src/META-INF/spring.schemas b/java/javaloader-spring/src/META-INF/spring.schemas deleted file mode 100644 index 376fd79..0000000 --- a/java/javaloader-spring/src/META-INF/spring.schemas +++ /dev/null @@ -1 +0,0 @@ -http\://www.compoundtheory.com/javaloader/schema/spring-coldfusion.xsd=com/compoundtheory/coldfusion/cfc/spring/config/spring-coldfusion.xsd \ No newline at end of file diff --git a/java/javaloader-spring/src/com/compoundtheory/coldfusion/cfc/spring/ColdFusionComponentFactory.java b/java/javaloader-spring/src/com/compoundtheory/coldfusion/cfc/spring/ColdFusionComponentFactory.java deleted file mode 100644 index b6d6aab..0000000 --- a/java/javaloader-spring/src/com/compoundtheory/coldfusion/cfc/spring/ColdFusionComponentFactory.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * - */ -package com.compoundtheory.coldfusion.cfc.spring; - -import java.io.File; -import java.io.IOException; - -import org.springframework.scripting.ScriptCompilationException; -import org.springframework.scripting.ScriptFactory; -import org.springframework.scripting.ScriptSource; -import org.springframework.util.Assert; -import org.springframework.util.ResourceUtils; - -import com.compoundtheory.coldfusion.cfc.CFCDynamicProxy; - -/** - * ScriptFactory for creating a CFC Dynamic Proxy to pass back to Spring - * A lot of this was lifted from {@link org.springframework.scripting.config.ScriptBeanDefinitionParser}, so big - * credit to that crew. - * - * @author Mark Mandel - * - */ -public class ColdFusionComponentFactory implements ScriptFactory -{ - private Class[] interfaces; - private String scriptSourceLocator; - - public ColdFusionComponentFactory(String scriptSourceLocator, Class[] interfaces) - { - Assert.hasText(scriptSourceLocator, "'scriptSourceLocator' must not be empty"); - Assert.notEmpty(interfaces, "'scriptInterfaces' must not be empty"); - - setScriptInterfaces(interfaces); - setScriptSourceLocator(scriptSourceLocator); - } - - /* (non-Javadoc) - * @see org.springframework.scripting.ScriptFactory#getScriptedObject(org.springframework.scripting.ScriptSource, java.lang.Class[]) - */ - @SuppressWarnings("unchecked") - @Override - public Object getScriptedObject(ScriptSource scriptSource, Class[] actualInterfaces) throws IOException, ScriptCompilationException - { - try - { - File file = ResourceUtils.getFile(getScriptSourceLocator()); - - return CFCDynamicProxy.createInstance(file, actualInterfaces); - } - catch (Throwable e) - { - ScriptCompilationException sce = new ScriptCompilationException(scriptSource, e); - - throw sce; - } - } - - /** - * returns null, as we are actually returning a proxy. - */ - @Override - public Class getScriptedObjectType(ScriptSource scriptSource) throws IOException, ScriptCompilationException - { - return null; - } - - /* (non-Javadoc) - * @see org.springframework.scripting.ScriptFactory#getScriptSourceLocator() - */ - @Override - public String getScriptSourceLocator() - { - return this.scriptSourceLocator; - } - - /** - * @param scriptSourceLocator the scriptSourceLocator to set - */ - private void setScriptSourceLocator(String scriptSourceLocator) - { - this.scriptSourceLocator = scriptSourceLocator; - } - - /** - * ColdFusion proxies require a config interface - */ - @Override - public boolean requiresConfigInterface() - { - return true; - } - - /* (non-Javadoc) - * @see org.springframework.scripting.ScriptFactory#requiresScriptedObjectRefresh(org.springframework.scripting.ScriptSource) - */ - @Override - public boolean requiresScriptedObjectRefresh(ScriptSource scriptSource) - { - return scriptSource.isModified(); - } - - /* (non-Javadoc) - * @see org.springframework.scripting.ScriptFactory#getScriptInterfaces() - */ - @Override - public Class[] getScriptInterfaces() - { - return this.interfaces; - } - - /** - * @param interfaces the interfaces to set - */ - private void setScriptInterfaces(Class[] interfaces) - { - this.interfaces = interfaces; - } - - public String toString() - { - return "ColdFusionComponentFactory: script source locator [" + this.scriptSourceLocator + "]"; - } -} diff --git a/java/javaloader-spring/src/com/compoundtheory/coldfusion/cfc/spring/config/ColdFusionBeanDefinitionParser.java b/java/javaloader-spring/src/com/compoundtheory/coldfusion/cfc/spring/config/ColdFusionBeanDefinitionParser.java deleted file mode 100644 index 59053fa..0000000 --- a/java/javaloader-spring/src/com/compoundtheory/coldfusion/cfc/spring/config/ColdFusionBeanDefinitionParser.java +++ /dev/null @@ -1,139 +0,0 @@ -/** - * - */ -package com.compoundtheory.coldfusion.cfc.spring.config; - -import org.springframework.beans.factory.config.ConstructorArgumentValues; -import org.springframework.beans.factory.support.AbstractBeanDefinition; -import org.springframework.beans.factory.support.BeanDefinitionDefaults; -import org.springframework.beans.factory.support.GenericBeanDefinition; -import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser; -import org.springframework.beans.factory.xml.ParserContext; -import org.springframework.scripting.config.LangNamespaceUtils; -import org.springframework.util.StringUtils; -import org.w3c.dom.Element; - -import coldfusion.filter.FusionContext; -import coldfusion.util.Utils; - -import com.compoundtheory.coldfusion.cfc.spring.ColdFusionComponentFactory; - -/** - * Bean definition parser for the Spring namespace - * - * @author Mark Mandel - * - */ -public class ColdFusionBeanDefinitionParser extends AbstractBeanDefinitionParser -{ - - private static final String SCRIPT_SOURCE_ATTRIBUTE = "script-source"; - private static final String SCRIPT_SOURCE_RELATIVE_ATTRIBUTE = "script-source-relative"; - private static final String SCRIPT_INTERFACES_ATTRIBUTE = "script-interfaces"; - private static final String SCOPE_ATTRIBUTE = "scope"; - private static final String AUTOWIRE_ATTRIBUTE = "autowire"; - private static final String DEPENDENCY_CHECK_ATTRIBUTE = "dependency-check"; - private static final String INIT_METHOD_ATTRIBUTE = "init-method"; - private static final String DESTROY_METHOD_ATTRIBUTE = "destroy-method"; - - /** - * Constructor - */ - public ColdFusionBeanDefinitionParser() - { - super(); - } - - /* (non-Javadoc) - * @see org.springframework.beans.factory.xml.AbstractBeanDefinitionParser#parseInternal(org.w3c.dom.Element, org.springframework.beans.factory.xml.ParserContext) - */ - @Override - protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) - { - //leverage the Scripting post processor - LangNamespaceUtils.registerScriptFactoryPostProcessorIfNecessary(parserContext.getRegistry()); - - //do a bean definition - GenericBeanDefinition beanDef = new GenericBeanDefinition(); - - beanDef.setSource(parserContext.extractSource(element)); - beanDef.setBeanClass(ColdFusionComponentFactory.class); - - // Determine bean scope. - String scope = element.getAttribute(SCOPE_ATTRIBUTE); - if (StringUtils.hasLength(scope)) - { - beanDef.setScope(scope); - } - - // Determine autowire mode. - String autowire = element.getAttribute(AUTOWIRE_ATTRIBUTE); - - int autowireMode = parserContext.getDelegate().getAutowireMode(autowire); - // Only "byType" and "byName" supported, but maybe other default - // inherited... - - if (autowireMode == GenericBeanDefinition.AUTOWIRE_AUTODETECT) - { - autowireMode = GenericBeanDefinition.AUTOWIRE_BY_TYPE; - } - else if (autowireMode == GenericBeanDefinition.AUTOWIRE_CONSTRUCTOR) - { - autowireMode = GenericBeanDefinition.AUTOWIRE_NO; - } - beanDef.setAutowireMode(autowireMode); - - // Determine dependency check setting. - String dependencyCheck = element.getAttribute(DEPENDENCY_CHECK_ATTRIBUTE); - beanDef.setDependencyCheck(parserContext.getDelegate().getDependencyCheck(dependencyCheck)); - - // Retrieve the defaults for bean definitions within this parser context - BeanDefinitionDefaults beanDefinitionDefaults = parserContext.getDelegate().getBeanDefinitionDefaults(); - - // Determine init method and destroy method. - String initMethod = element.getAttribute(INIT_METHOD_ATTRIBUTE); - if (StringUtils.hasLength(initMethod)) - { - beanDef.setInitMethodName(initMethod); - } - else if (beanDefinitionDefaults.getInitMethodName() != null) - { - beanDef.setInitMethodName(beanDefinitionDefaults.getInitMethodName()); - } - - String destroyMethod = element.getAttribute(DESTROY_METHOD_ATTRIBUTE); - if (StringUtils.hasLength(destroyMethod)) - { - beanDef.setDestroyMethodName(destroyMethod); - } - else if (beanDefinitionDefaults.getDestroyMethodName() != null) - { - beanDef.setDestroyMethodName(beanDefinitionDefaults.getDestroyMethodName()); - } - - ConstructorArgumentValues constructorArgs = beanDef.getConstructorArgumentValues(); - - String scriptSource = element.getAttribute(SCRIPT_SOURCE_ATTRIBUTE); - - //have to do this here, as otherwise the Script post processor will take over - if(!element.hasAttribute(SCRIPT_SOURCE_RELATIVE_ATTRIBUTE) || element.getAttribute(SCRIPT_SOURCE_RELATIVE_ATTRIBUTE).equals("true")) - { - //strip off the file:// - scriptSource = scriptSource.substring(7); - - scriptSource = Utils.expandPath(scriptSource, FusionContext.getCurrent().pageContext); - - scriptSource = "file://" + scriptSource; - } - - String[] interfaces = element.getAttribute(SCRIPT_INTERFACES_ATTRIBUTE).split(","); - - constructorArgs.addIndexedArgumentValue(0, scriptSource); - constructorArgs.addIndexedArgumentValue(1, interfaces); - - // Add any property definitions that need adding. - parserContext.getDelegate().parsePropertyElements(element, beanDef); - - return beanDef; - } -} diff --git a/java/javaloader-spring/src/com/compoundtheory/coldfusion/cfc/spring/config/ColdFusionNamespaceHandler.java b/java/javaloader-spring/src/com/compoundtheory/coldfusion/cfc/spring/config/ColdFusionNamespaceHandler.java deleted file mode 100644 index 76eb8fa..0000000 --- a/java/javaloader-spring/src/com/compoundtheory/coldfusion/cfc/spring/config/ColdFusionNamespaceHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.compoundtheory.coldfusion.cfc.spring.config; - -import org.springframework.beans.factory.xml.NamespaceHandlerSupport; - -/** - * Namespace handler for the Spring XML namespace - * - * @author Mark Mandel - * - */ -public class ColdFusionNamespaceHandler extends NamespaceHandlerSupport -{ - - /* (non-Javadoc) - * @see org.springframework.beans.factory.xml.NamespaceHandler#init() - */ - @Override - public void init() - { - registerBeanDefinitionParser("cfc", new ColdFusionBeanDefinitionParser()); - } -} \ No newline at end of file diff --git a/java/javaloader-spring/src/com/compoundtheory/coldfusion/cfc/spring/config/spring-coldfusion.xsd b/java/javaloader-spring/src/com/compoundtheory/coldfusion/cfc/spring/config/spring-coldfusion.xsd deleted file mode 100644 index 6823661..0000000 --- a/java/javaloader-spring/src/com/compoundtheory/coldfusion/cfc/spring/config/spring-coldfusion.xsd +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Whether or not the script source path is an absolute path (false), or a path that is - relative to the ColdFusion web root (true). Defaults to true. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/java/networkClassLoader/NetworkClassLoader.iml b/java/networkClassLoader/NetworkClassLoader.iml deleted file mode 100644 index d5c0743..0000000 --- a/java/networkClassLoader/NetworkClassLoader.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/java/networkClassLoader/build.xml b/java/networkClassLoader/build.xml deleted file mode 100644 index 8b03211..0000000 --- a/java/networkClassLoader/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/java/networkClassLoader/src/com/compoundtheory/classloader/NetworkClassLoader.java b/java/networkClassLoader/src/com/compoundtheory/classloader/NetworkClassLoader.java deleted file mode 100644 index c2b38c8..0000000 --- a/java/networkClassLoader/src/com/compoundtheory/classloader/NetworkClassLoader.java +++ /dev/null @@ -1,550 +0,0 @@ -/* - * ==================================================================== - * - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1999 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - */ - -package com.compoundtheory.classloader; - -import java.net.*; -import java.util.*; -import java.io.*; - -/** - *

- * The correct name for this class should be URLClassLoader. But there is - * already a class by that name in JDK1.2. - * - * I have had quite a few problems with URLClassLoader in past, so I ended up - * writing this ClassLoader. I found that the Java 2's URLClassLoader, does not - * close the Jar file once opened. It is a pretty good optimization step, but if - * you modify the class in the jar file, it does not pick it up. Some operating - * systems may not let you modify the jar file while it is still open. IMHO, it - * does make sense to close the jar file after you are done reading the class - * data. But this approach may not get you the performance of the - * URLClassLoader, but it works in all cases and also runs on JDK1.1. I have - * enhanced this class loader to read all the zip/jar entries once & cache the - * data, so that there is no overhead of opening/closing jar file to pick up - * each entry. - *

- * - *

- * Modified and enhanced by Mark Mandel to work specifically with ColdFusion, in - * specific contexts. - *

- * - * @author Harish Prabandham - */ -public class NetworkClassLoader extends ClassLoader -{ - private ClassLoader parent = null; // parent classloader - private Map classCache = new Hashtable(); - private Hashtable urlset = new Hashtable(); - private Set unfoundResources = new HashSet(); - - public NetworkClassLoader() - { - super(null); - // debug("creating network class loader..."); - } - - /** - * Creates a new instance of the class loader. - * - * @param parent the parent classloader - */ - public NetworkClassLoader(ClassLoader parent) - { - super(parent); - // debug("creating network class loader... with a parent"); - setParent(parent); - } - - /** - * Sets the parent/delegate class loader. - * - * @param parent the parent class loader. - */ - protected final void setParent(ClassLoader parent) - { - this.parent = parent; - } - - /** - * Adds the given URL to this class loader. If the URL ends with "/", then - * it is assumed to be a directory otherwise, it is assumed to be a zip/jar - * file. If the same URL is added again, the URL is re-opened and this - * zip/jar file is used for serving any future class requests. - * - * @param url where to look for the classes. - */ - public synchronized void addURL(URL url) - { - // System.out.println("Adding url: " + url); - if (!urlset.containsKey(url)) - { - try - { - urlset.put(url, new URLResourceReader(url)); - } - catch (IOException ioe) - { - // Probably a bad url... - } - } - else - { - // remove the old one & add a new one... - try - { - URLResourceReader newu = new URLResourceReader(url); - URLResourceReader oldu = (URLResourceReader) urlset.get(url); - oldu.close(); - urlset.remove(url); - urlset.put(url, newu); - } - catch (IOException ioe) - { - } - } - /* - * May get new resources from new URL so have to forget what has not - * been found - */ - unfoundResources.clear(); - } - - /** - * @return An enumeration of URLs where this class loader looks for classes. - */ - public URL[] getURLs() - { - - Object[] keys = urlset.keySet().toArray(); - URL[] urls = new URL[keys.length]; - - System.arraycopy(keys, 0, urls, 0, keys.length); - return urls; - } - - /** - * Call this to bypass the implementation of loadClass. - */ - public Class findClass(String name) throws ClassNotFoundException - { - byte[] b = loadClassData(name); - if (b != null) - { - // debug("findClass found " + name); - return defineClass(name, b, 0, b.length); - } - else - { - // debug("findClass didn't find " + name); - throw new ClassNotFoundException(name); - } - } - - protected byte[] loadResource(URL url, String resourceName) throws IOException - { - URLResourceReader urr = (URLResourceReader) urlset.get(url); - // debug("Loading from " + urr + " " + resourceName); - if (urr != null) - { - return urr.getResource(resourceName); - } - - return null; - } - - protected byte[] loadResource(String resource) - { - byte[] barray = null; - - // Don't bother searching if we know it's not there - if (unfoundResources.contains(resource)) - { - return null; - } - - for (Enumeration e = urlset.keys(); e.hasMoreElements();) - { - URL url = (URL) e.nextElement(); - - try - { - barray = loadResource(url, resource); - } - catch (Exception ex) - { - } - finally - { - if (barray != null) - break; - } - } - - // Remember resources we couldn't find - if (barray == null) - { - unfoundResources.add(resource); - } - - return barray; - } - - protected byte[] loadClassData(String classname) - { - String resourceName = classname.replace('.', '/') + ".class"; - byte[] resource = loadResource(resourceName); - - if(resource != null) - { - //nick'ed from the URLClassLoader - int i = classname.lastIndexOf('.'); - if (i != -1) - { - String packageName = classname.substring(0, i); - - //check it doesn't exist - if(getPackage(packageName) == null) - { - definePackage(packageName, null, null, null, null, null, null, null); - } - } - } - - return resource; - } - - /** - * Overridden to search for a resource and return a "jar"-style URL or - * normal "file" URL as necessary. - */ - protected URL findResource(String name) - { // System.out.println( "findResource: " + name ); - URL url; - byte[] barray = null; - - // Don't bother searching if we know it's not there - if (unfoundResources.contains(name)) - { - return null; - } - - for (Enumeration e = urlset.keys(); e.hasMoreElements();) - { - url = (URL) e.nextElement(); - try - { - barray = loadResource(url, name); // loads fully: wasteful - } - catch (Exception ex) - { - // do nothing - } - if (barray != null) - { - try - { - String ref = url.toString(); - if (ref.endsWith(".jar")) - { - // System.out.println( "jar:" + ref + "!/" + name ); - return new URL("jar:" + ref + "!/" + name); - } - else - { - // System.out.println( new URL( url, name ).toString() - // ); - return new URL(url, name); - } - } - catch (Throwable t) - { - t.printStackTrace(); - } - } - } - - // Remember resources we couldn't find - unfoundResources.add(name); - return null; - } - - /** - * Find all resources for a given name - * - * @return an enumeration of all the resources found. - */ - protected Enumeration findResources(String name) throws IOException - { - - // Don't bother searching if we know it's not there - if (unfoundResources.contains(name)) - { - return new Enumeration() - { - public Object nextElement() - { - return null; - } - - public boolean hasMoreElements() - { - return false; - } - }; - } - - ArrayList urls = new ArrayList(); - - URL url; - byte[] barray = null; - - for (Enumeration e = urlset.keys(); e.hasMoreElements();) - { - url = (URL) e.nextElement(); - try - { - barray = loadResource(url, name); // loads fully: wasteful - } - catch (Exception ex) - { - // do nothing - } - if (barray != null) - { - try - { - String ref = url.toString(); - if (ref.endsWith(".jar")) - { - URL resource = new URL("jar:" + ref + "!/" + name); - urls.add(resource); - - } - else - { - URL resource = new URL(url, name); - urls.add(resource); - } - } - catch (Throwable t) - { - t.printStackTrace(); - } - } - } - - // Remember resources we couldn't find - if (urls.isEmpty()) - { - unfoundResources.add(name); - } - - Enumeration enumerator = new EnumerationIteratorWrapper(urls.iterator()); - - return enumerator; - } - - /** - * @return The resource as the input stream if such a resource exists, - * otherwise returns null. - */ - public InputStream getResourceAsStream(String name) - { - // System.out.println( "getResourceAsStream: " + name ); - InputStream istream = null; - - // Algorithm: - // - // 1. first attempt to get the resource from the url set. - // 2. next check the delegate/parent class loader for the resource - // 3. then check the system path for the resource - // - - // Lets load it ourselves. - byte[] data = loadResource(name); - if (data != null) - { - return new ByteArrayInputStream(data); - } - - // Lets check the parent/delegate class loader for the resource. - if (parent != null) - { - istream = parent.getResourceAsStream(name); - if (istream != null) - return istream; - } - - // Lets check the system path for the resource. - return getSystemResourceAsStream(name); - } - - /** - * Load a class for given name - */ - public synchronized Class loadClass(String name, boolean resolve) throws ClassNotFoundException - { - Class c = null; - - // Algorithm: (Please do not change the order; unless you - // have a good reason to do so). - // - // 1. check the class cache - // 2. next then attempt to load classes from the URL set. - // 3. next check the delegate/parent class loader. - // 4. next check the system class loader. - // - - // Lets see if the class is in the cache.. - - // debug("load class:: " + name + " resolve: " + resolve); - - // debug(classCache.toString()); - - c = (Class) classCache.get(name); - - if (c == null) - { - // Lets see if we find the class all by ourselves. - byte[] data = loadClassData(name); - - if (data != null) - { - // found class data so define it and place in cache - // debug("found data, attempting to define " + name); - c = defineClass(name, data, 0, data.length); - // debug("placing " + name + " in cache"); - classCache.put(name, c); - } - } - - // Lets see if the class is in parent class loader if there is one - // or the system class loader if there isn't. - if (c == null) - { - if (parent != null) - { - // debug("check parent class loader for " + name); - c = parent.loadClass(name); - } - else - { - // debug("check system class loader for " + name); - /* - * no matter what, we always at least end up here, - * so we don't need to throw a ClassNotFoundException - * as this will do it for us. - */ - c = findSystemClass(name); - } - } - - // debug("found class " + name); - if (resolve) - { - resolveClass(c); - } - - return c; - } - - /** - * This method resets this ClassLoader's state. It completely removes all - * the URLs and classes in this class loader cache. - */ - public final void clear() - { - urlset.clear(); - classCache.clear(); - unfoundResources.clear(); - } - - /** - * This method resets this ClassLoader's state and resets the references for - * garbage collection. - */ - protected void finalize() throws Throwable - { - // Cleanup real well. Otherwise, this can be - // a major source of memory leaks... - - // remove all the urls & class entries. - clear(); - - parent = null; - urlset = null; - classCache = null; - unfoundResources = null; - } - - private class EnumerationIteratorWrapper implements Enumeration - { - private Iterator iterator; - - public EnumerationIteratorWrapper(Iterator iterator) - { - this.iterator = iterator; - } - - public boolean hasMoreElements() - { - return iterator.hasNext(); - } - - public Object nextElement() - { - return iterator.next(); - } - - } -} \ No newline at end of file diff --git a/java/networkClassLoader/src/com/compoundtheory/classloader/URLResourceReader.java b/java/networkClassLoader/src/com/compoundtheory/classloader/URLResourceReader.java deleted file mode 100644 index 1680def..0000000 --- a/java/networkClassLoader/src/com/compoundtheory/classloader/URLResourceReader.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * ==================================================================== - * - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1999 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - */ - -package com.compoundtheory.classloader; - -import java.util.zip.*; -import java.net.*; -import java.util.*; -import java.io.*; - -/** - * This implementation of URL Resource Reader assumes 2 types - * of base urls. A base url that ends with / is considered a - * resource folder, whereas a resource that does not end with - * / is considered a zip/jar resource folder. - * - * If the resource folder happens is a zip/jar archive, the - * entries are always cached. - * For non-zip base urls, one could specify whether or not it should - * be cached. - * - * @author Harish Prabandham - */ -public class URLResourceReader { - private Hashtable resourceCache = new Hashtable(); - private boolean iszip = true; - private URL url = null; - private boolean cache = true; - - /** - * Creates a new URLResourceReader object. You can either give - * the URL of the zip/jar file or a base url where to - * look for additional resources. If the url ends with - * "/" then it is assumed to be a Base URL. - * @param The base url to look for the resources. - * @param If the base url is not a zip/jar, then true indicates - * that entries should be cached, false otherwise. - */ - public URLResourceReader(URL baseurl, boolean cache) throws IOException { - this.url = baseurl; - this.cache = cache; - this.iszip = !url.getFile().endsWith("/"); - if(this.iszip) - this.cache = true; - initialize(); - } - - /** - * equivalent to URLResourceReader(baseurl, false) - */ - public URLResourceReader(URL baseurl) throws IOException { - this(baseurl, false); - } - - /** - * Creates a new URLResourceReader object with the given - * input stream. The stream is assumed to be a zip/jar - * stream. - */ - public URLResourceReader(InputStream is) throws IOException { - init(is); - } - - private void initialize() throws IOException { - if(iszip) { - InputStream is = url.openStream(); - init(is); - is.close(); - } - } - - private byte[] readFully(InputStream is) throws IOException { - byte[] buf = new byte[1024]; - int num = 0; - ByteArrayOutputStream bout = new ByteArrayOutputStream(); - - while( (num = is.read(buf)) != -1) { - bout.write(buf, 0, num); - } - - return bout.toByteArray(); - } - - private void init(InputStream is) throws IOException { - ZipInputStream zstream = new ZipInputStream(is); - ZipEntry entry; - - while( (entry = zstream.getNextEntry()) != null) { - byte[] entryData = readFully(zstream); - if(cache) - resourceCache.put(entry.getName(), entryData); - zstream.closeEntry(); - } - - zstream.close(); - } - - /** - * Returns an Enumeration of all "known" resource names. - */ - public Enumeration getResourceNames() { - return resourceCache.keys(); - } - - /** - * Returns an array of bytes read for this resource if the - * resource exists. This method blocks until the resource - * has been fully read. If the resource does not exist, - * this method returns null. - */ - public byte[] getResource(String resource) { - // lookup the data in the cache... - byte[] data = (byte[]) resourceCache.get(resource); - if(data != null) { - return data; - } - - // if the data was to come from a zip file that we - // already read fully & cached , then it is probably - // not there. - if(iszip) { - return null; - } - - // Now the only choice left is to make a url connection. - try { - URL realURL = new URL(url.getProtocol(), url.getHost(), - url.getFile() + resource); - data = readFully(realURL.openStream()); - // add it to cache if needed... - if(cache) - resourceCache.put(resource, data); - return data; - } catch(Exception e) { - return null; - } - } - - public void close() { - resourceCache.clear(); - resourceCache = null; - } - - public String toString() { - return url.toString(); - } -} \ No newline at end of file diff --git a/javaloader.iml b/javaloader.iml deleted file mode 100644 index 2b782fc..0000000 --- a/javaloader.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/javaloader/JavaCompiler.cfc b/javaloader/JavaCompiler.cfc deleted file mode 100644 index 9f4f172..0000000 --- a/javaloader/JavaCompiler.cfc +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - var data = {}; - var defaultCompiler = "com.sun.tools.javac.api.JavacTool"; - - //we have to manually go looking for the compiler - - try - { - data.compiler = getPageContext().getClass().getClassLoader().loadClass(defaultCompiler).newInstance(); - } - catch(any exc) - { - println("Error loading compiler:"); - println(exc.toString()); - } - - /* - If not by THIS point do we have a compiler, then throw an exception - */ - if(NOT StructKeyExists(data, "compiler")) - { - throwException("javaCompiler.NoCompilerAvailableException", - "No Java Compiler is available", - "There is no Java Compiler available. Make sure tools.jar is in your classpath and you are running Java 1.6+"); - } - - setCompiler(data.compiler); - setJarDirectory(arguments.jarDirectory); - - return this; - - - - - - - - - //setup file manager with default exception handler, default locale, and default character set - var fileManager = getCompiler().getStandardFileManager(JavaCast("null", ""), JavaCast("null", ""), JavaCast("null", "")); - var qFiles = 0; - var fileArray = []; - var directoryToCompile = 0; - var fileObjects = 0; - var osw = createObject("java", "java.io.StringWriter").init(); - var options = []; - var compilePass = 0; - var jarPath = getJarDirectory() & "/" & arguments.jarName; - - - - - - - - ArrayAppend(fileArray, qFiles.directory & "/" & qFiles.name); - - - - - if(structKeyExists(arguments, "classLoader")) - { - options = addClassLoaderFiles(options, arguments.classLoader, arguments.directoryArray); - } - - fileObjects = fileManager.getJavaFileObjectsFromStrings(fileArray); - - - - - //does the compilation - compilePass = getCompiler().getTask(osw, fileManager, JavaCast("null", ""), options, JavaCast("null", ""), fileObjects).call(); - - if(NOT compilePass) - { - throwException("javacompiler.SourceCompilationException", "There was an error compiling your source code", osw.toString()); - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - var urls = 0; - var uri = 0; - var classPaths = createObject("java", "java.lang.StringBuilder").init(); - var File = createObject("java", "java.io.File"); - var path = 0; - - - - - - - - classPaths.append(uri.getFile()).append(File.pathSeparator); - - - - - - - - - - - - ArrayAppend(arguments.options, "-classpath"); - ArrayAppend(arguments.options, classPaths.toString()); - - return arguments.options; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - createObject("Java", "java.lang.System").out.println(arguments.str); - - - - \ No newline at end of file diff --git a/javaloader/JavaLoader.cfc b/javaloader/JavaLoader.cfc deleted file mode 100644 index d2b8764..0000000 --- a/javaloader/JavaLoader.cfc +++ /dev/null @@ -1,608 +0,0 @@ - - - - - instance = StructNew(); - instance.static.uuid = "A0608BEC-0AEB-B46A-0E1E1EC5F3CE7C9C"; - - - - - - - - - - - - - - - initUseJavaProxyCFC(); - - if(arguments.loadColdFusionClassPath) - { - //arguments.parentClassLoader = createObject("java", "java.lang.Thread").currentThread().getContextClassLoader(); - //can't use above, as doesn't work in some... things - - arguments.parentClassLoader = getPageContext().getClass().getClassLoader(); - - //arguments.parentClassLoader = createObject("java", "java.lang.ClassLoader").getSystemClassLoader(); - //can't use the above, it doesn't have the CF stuff in it. - } - - setClassLoadPaths(arguments.loadPaths); - setParentClassLoader(arguments.parentClassLoader); - - ensureNetworkClassLoaderOnServerScope(); - - loadClasses(); - - if(structKeyExists(arguments, "sourceDirectories") AND ArrayLen(arguments.sourceDirectories)) - { - setJavaCompiler(createObject("component", "JavaCompiler").init(arguments.compileDirectory)); - setSourceDirectories(arguments.sourceDirectories); - setCompileDirectory(arguments.compileDirectory); - - setTrustedSource(arguments.trustedSource); - - compileSource(); - - setSourceLastModified(calculateSourceLastModified()); - - //do the method switching for non-trusted source - if(NOT arguments.trustedSource) - { - variables.createWithoutCheck = variables.create; - - StructDelete(this, "create"); - StructDelete(variables, "create"); - - this.create = variables.createWithSourceCheck; - } - } - - return this; - - - - - - - try - { - //do this in one line just for speed. - return createJavaProxy(getURLClassLoader().loadClass(arguments.className)); - } - catch(java.lang.ClassNotFoundException exc) - { - throwException("javaloader.ClassNotFoundException", "The requested class could not be found.", "The requested class '#arguments.className#' could not be found in the loaded jars/directories."); - } - - - - - - - - - - - - - - - var local = {}; - var func = 0; //need this as cf8 doesn't like the structure with functions. - var System = createObject("java", "java.lang.System"); - var Thread = createObject("java", "java.lang.Thread"); - var currentClassloader = Thread.currentThread().getContextClassLoader(); - var classLoader = ""; - - if (structCount(arguments) == 4) - { - // the last 2 arguments are the function arguments and class loader - classLoader = arguments[4]; - local.funcArgs = arguments[3]; - } - else if (structCount(arguments) == 3) - { - // 2nd argument could be classloader or function arguments - if (isInstanceOf(arguments[2],"java.lang.ClassLoader")) - { - classLoader = arguments[2]; - } - else if (isStruct(arguments[2])) - { - local.funcArgs = arguments[2]; - } - - // 3rd argument could be classloader or function arguments - if (isInstanceOf(arguments[3],"java.lang.ClassLoader")) - { - classLoader = arguments[3]; - } - else if (isStruct(arguments[3])) - { - local.funcArgs = arguments[3]; - } - } - else if (structCount(arguments) == 2) - { - // the 2nd argument could be a class loader or function arguments - if (isInstanceOf(arguments[2],"java.lang.ClassLoader")) - { - classLoader = arguments[2]; - } - else if (isStruct(arguments[2])) - { - local.funcArgs = arguments[2]; - } - } - - if (!structKeyExists(local,"funcArgs")) - { - local.funcArgs = {}; - } - - if (isSimpleValue(classLoader)) - { - classLoader = getURLClassLoader(); - } - - - - - Thread.currentThread().setContextClassLoader(classloader); - - - - - - - func = arguments[1]; - local.return = func(argumentCollection = local.funcArgs); - - - - - - - - - - Thread.currentThread().setContextClassLoader(currentClassloader); - - - - - - - //need to do this twice, as cf8 has no finally. - Thread.currentThread().setContextClassLoader(currentClassloader); - - if(structKeyExists(local, "return")) - { - return local.return; - } - - - - - - - - - - - - - - - var dateLastModified = calculateSourceLastModified(); - - /* - If the source has changed in any way, recompile and load - */ - if(dateCompare(dateLastModified, getSourceLastModified()) eq 1) - { - loadClasses(); - compileSource(); - } - - //if all the comilation goes according to plan, set the date last modified - setSourceLastModified(dateLastModified); - - return createWithoutCheck(argumentCollection=arguments); - - - - - - var iterator = getClassLoadPaths().iterator(); - var file = 0; - var classLoader = 0; - var networkClassLoaderClass = 0; - var networkClassLoaderProxy = 0; - - networkClassLoaderClass = getServerURLClassLoader().loadClass("com.compoundtheory.classloader.NetworkClassLoader"); - - networkClassLoaderProxy = createJavaProxy(networkClassLoaderClass); - - if(isObject(getParentClassLoader())) - { - classLoader = networkClassLoaderProxy.init(getParentClassLoader()); - } - else - { - classLoader = networkClassLoaderProxy.init(); - } - - while(iterator.hasNext()) - { - file = createObject("java", "java.io.File").init(iterator.next()); - if(NOT file.exists()) - { - throwException("javaloader.PathNotFoundException", "The path you have specified could not be found", file.getAbsolutePath() & " does not exist"); - } - - classLoader.addUrl(file.toURL()); - } - - setURLClassLoader(classLoader); - - - - - - var dir = 0; - var path = 0; - - var paths = 0; - var file = 0; - var counter = 1; - var len = 0; - var directories = 0; - - //do check to see if the compiled jar is already there - var jarName = calculateJarName(getSourceDirectories()); - var jar = getCompileDirectory() & "/" & jarName; - - - - - - - - - - - - - - - - - - - - //first we copy the source to our tmp dir - directories = getSourceDirectories(); - len = arraylen(directories); - for(; counter lte len; counter = counter + 1) - { - dir = directories[counter]; - $directoryCopy(dir, path); - } - - //then we compile it, and grab that jar - - paths = ArrayNew(1); //have to write it this way so CF7 compiles - ArrayAppend(paths, path); - - jar = getJavaCompiler().compile(paths, getURLClassLoader(), jarName); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - var file = hash(arrayToList(arguments.directoryArray)) & ".jar"; - - return file; - - - - - - var lastModified = createDate(1900, 1, 1); - var dir = 0; - var qLastModified = 0; - var directories = getSourceDirectories(); - var len = arraylen(directories); - var counter = 0; - - - - - - - //it's possible there are no source files. - if(qLastModified.recordCount) - { - //get the latest date modified - if(dateCompare(lastModified, qlastModified.dateLastModified) eq -1) - { - /* - This is here, because cfdirectory only ever gives you minute accurate modified - date, which is not good enough. - */ - lastModified = createObject("java", "java.util.Date").init(createObject("java", "java.io.File").init(qLastModified.directory & "/" & qLastModified.name).lastModified()); - } - } - else - { - lastModified = Now(); - } - - - - - - - - - var Class = createObject("java", "java.lang.Class"); - var Array = createObject("java", "java.lang.reflect.Array"); - var jars = queryJars(); - var iterator = jars.iterator(); - var file = 0; - var urls = Array.newInstance(Class.forName("java.net.URL"), ArrayLen(jars)); - var counter = 0; - var urlClassLoader = 0; - var key = instance.static.uuid & "." & getVersion(); - - - - - - if(NOT StructKeyExists(server, key)) - { - while(iterator.hasNext()) - { - Array.set(urls, counter, createObject("java", "java.io.File").init(iterator.next()).toURL()); - counter = counter + 1; - } - - urlClassLoader = createObject("java", "java.net.URLClassLoader").init(urls); - - //put it on the server scope - server[key] = urlClassLoader; - } - - - - - - - - - return createObject("java", "coldfusion.runtime.java.JavaProxy").init(arguments.class); - - - - - - - return createObject("component", "JavaProxy")._init(arguments.class); - - - - - - try - { - createObject("java", "coldfusion.runtime.java.JavaProxy"); - } - catch(Object exc) - { - //do method replacement, as it will be much faster long term - variables.createJavaProxy = variables.createJavaProxyCFC; - } - - - - - - var qJars = 0; - //the path to my jar library - var path = getDirectoryFromPath(getMetaData(this).path) & "lib/"; - var jarList = ""; - var aJars = ArrayNew(1); - var libName = 0; - - - - - - libName = ListGetAt(qJars.name, 1, "-"); - //let's not use the lib's that have the same name, but a lower datestamp - if(NOT ListFind(jarList, libName)) - { - ArrayAppend(aJars, path & "/" & qJars.name); - jarList = ListAppend(jarList, libName); - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/javaloader/JavaProxy.cfc b/javaloader/JavaProxy.cfc deleted file mode 100644 index 8da0d2d..0000000 --- a/javaloader/JavaProxy.cfc +++ /dev/null @@ -1,354 +0,0 @@ - - - - - - - - - - var classLoader = createObject("java", "java.lang.ClassLoader").getSystemClassLoader(); - var objectClass = classLoader.loadClass("java.lang.Object"); - - _setArray(createObject("java", "java.lang.reflect.Array")); - - _setClassMethod(objectClass.getMethod("getClass", JavaCast("null", 0))); - - _setObjectClass(objectClass); - - _setClass(arguments.class); - - _setModifier(createObject("java", "java.lang.reflect.Modifier")); - - _setStaticFields(); - - _initMethodCollection(); - - return this; - - - - - - var constructor = 0; - var instance = 0; - - //make sure we only ever have one instance - if(_hasClassInstance()) - { - return _getClassInstance(); - } - - constructor = _resolveMethodByParams("Constructor", _getClass().getConstructors(), arguments); - - instance = constructor.newInstance(_buildArgumentArray(arguments)); - - _setClassInstance(instance); - - return _getClassInstance(); - - - - - - - - - var method = _findMethod(arguments.missingMethodName, arguments.missingMethodArguments); - - if(_getModifier().isStatic(method.getModifiers())) - { - return method.invoke(JavaCast("null", 0), _buildArgumentArray(arguments.missingMethodArguments)); - } - else - { - if(NOT _hasClassInstance()) - { - //run the default constructor, just like in normal CF, if there is no instance - init(); - } - - return method.invoke(_getClassInstance(), _buildArgumentArray(arguments.missingMethodArguments)); - } - - - - - - - - - - - - var fields = _getClass().getFields(); - var counter = 1; - var len = ArrayLen(fields); - var field = 0; - - for(; counter <= len; counter++) - { - field = fields[counter]; - if(_getModifier().isStatic(field.getModifiers())) - { - this[field.getName()] = field.get(JavaCast("null", 0)); - } - } - - - - - - - var len = StructCount(args); - var objArray = _getArray().newInstance(_getObjectClass(), len); - var counter = 1; - var obj = 0; - - for(; counter <= len; counter++) - { - obj = args[counter]; - _getArray().set(objArray, counter - 1, obj); - } - - return objArray; - - - - - - - - var decision = 0; - - if(StructKeyExists(_getMethodCollection(), arguments.methodName)) - { - decision = StructFind(_getMethodCollection(), arguments.methodName); - - //if there is only one option, try it, it's only going to throw a runtime exception if it doesn't work. - if(ArrayLen(decision) == 1) - { - return decision[1]; - } - else - { - return _resolveMethodByParams(arguments.methodName, decision, arguments.methodArgs); - } - } - - throwException("JavaProxy.MethodNotFoundException", "Could not find the designated method", "Could not find the method '#arguments.methodName#' in the class #_getClass().getName()#"); - - - - - - - - - var decisionLen = ArrayLen(arguments.decision); - var method = 0; - var counter = 1; - var argLen = ArrayLen(arguments.methodArgs); - var parameters = 0; - var paramLen = 0; - var pCounter = 0; - var param = 0; - var class = 0; - var found = true; - - for(; counter <= decisionLen; counter++) - { - method = arguments.decision[counter]; - parameters = method.getParameterTypes(); - paramLen = ArrayLen(parameters); - - found = true; - - if(argLen eq paramLen) - { - for(pCounter = 1; pCounter <= paramLen AND found; pCounter++) - { - param = parameters[pCounter]; - class = _getClassMethod().invoke(arguments.methodArgs[pCounter], JavaCast("null", 0)); - - if(param.isAssignableFrom(class)) - { - found = true; - } - else if(param.isPrimitive()) //if it's a primitive, it can be mapped to object primtive classes - { - if(param.getName() eq "boolean" AND class.getName() eq "java.lang.Boolean") - { - found = true; - } - else if(param.getName() eq "int" AND class.getName() eq "java.lang.Integer") - { - found = true; - } - else if(param.getName() eq "long" AND class.getName() eq "java.lang.Long") - { - found = true; - } - else if(param.getName() eq "float" AND class.getName() eq "java.lang.Float") - { - found = true; - } - else if(param.getName() eq "double" AND class.getName() eq "java.lang.Double") - { - found = true; - } - else if(param.getName() eq "char" AND class.getName() eq "java.lang.Character") - { - found = true; - } - else if(param.getName() eq "byte" AND class.getName() eq "java.lang.Byte") - { - found = true; - } - else if(param.getName() eq "short" AND class.getName() eq "java.lang.Short") - { - found = true; - } - else - { - found = false; - } - } - else - { - found = false; - } - } - - if(found) - { - return method; - } - } - } - - throwException("JavaProxy.MethodNotFoundException", "Could not find the designated method", "Could not find the method '#arguments.methodName#' in the class #_getClass().getName()#"); - - - - - - var methods = _getClass().getMethods(); - var len = ArrayLen(methods); - var counter = 1; - var method = 0; - - _setMethodCollection(StructNew()); - - for(; counter <= len; counter++) - { - method = methods[counter]; - - if(NOT StructKeyExists(_getMethodCollection(), method.getName())) - { - StructInsert(_getMethodCollection(), method.getName(), ArrayNew(1)); - } - - ArrayAppend(StructFind(_getMethodCollection(), method.getName()), method); - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/javaloader/lib/classloader-20120103162851.jar b/javaloader/lib/classloader-20120103162851.jar deleted file mode 100644 index ea07000..0000000 Binary files a/javaloader/lib/classloader-20120103162851.jar and /dev/null differ diff --git a/javaloader/lib/classloader-src.zip b/javaloader/lib/classloader-src.zip deleted file mode 100644 index e86f27e..0000000 Binary files a/javaloader/lib/classloader-src.zip and /dev/null differ diff --git a/javaloader/licence.txt b/javaloader/licence.txt deleted file mode 100644 index 5723258..0000000 --- a/javaloader/licence.txt +++ /dev/null @@ -1,213 +0,0 @@ -Common Public License Version 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC -LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM -CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - - a) in the case of the initial Contributor, the initial code and -documentation distributed under this Agreement, and - - b) in the case of each subsequent Contributor: - - i) changes to the Program, and - - ii) additions to the Program; - - where such changes and/or additions to the Program originate from and are -distributed by that particular Contributor. A Contribution 'originates' from a -Contributor if it was added to the Program by such Contributor itself or anyone -acting on such Contributor's behalf. Contributions do not include additions to -the Program which: (i) are separate modules of software distributed in -conjunction with the Program under their own license agreement, and (ii) are not -derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents " mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, -including all Contributors. - -2. GRANT OF RIGHTS - - a) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free copyright license to -reproduce, prepare derivative works of, publicly display, publicly perform, -distribute and sublicense the Contribution of such Contributor, if any, and such -derivative works, in source code and object code form. - - b) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed -Patents to make, use, sell, offer to sell, import and otherwise transfer the -Contribution of such Contributor, if any, in source code and object code form. -This patent license shall apply to the combination of the Contribution and the -Program if, at the time the Contribution is added by the Contributor, such -addition of the Contribution causes such combination to be covered by the -Licensed Patents. The patent license shall not apply to any other combinations -which include the Contribution. No hardware per se is licensed hereunder. - - c) Recipient understands that although each Contributor grants the licenses -to its Contributions set forth herein, no assurances are provided by any -Contributor that the Program does not infringe the patent or other intellectual -property rights of any other entity. Each Contributor disclaims any liability to -Recipient for claims brought by any other entity based on infringement of -intellectual property rights or otherwise. As a condition to exercising the -rights and licenses granted hereunder, each Recipient hereby assumes sole -responsibility to secure any other intellectual property rights needed, if any. -For example, if a third party patent license is required to allow Recipient to -distribute the Program, it is Recipient's responsibility to acquire that license -before distributing the Program. - - d) Each Contributor represents that to its knowledge it has sufficient -copyright rights in its Contribution, if any, to grant the copyright license set -forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its -own license agreement, provided that: - - a) it complies with the terms and conditions of this Agreement; and - - b) its license agreement: - - i) effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title and -non-infringement, and implied warranties or conditions of merchantability and -fitness for a particular purpose; - - ii) effectively excludes on behalf of all Contributors all liability for -damages, including direct, indirect, special, incidental and consequential -damages, such as lost profits; - - iii) states that any provisions which differ from this Agreement are offered -by that Contributor alone and not by any other party; and - - iv) states that source code for the Program is available from such -Contributor, and informs licensees how to obtain it in a reasonable manner on or -through a medium customarily used for software exchange. - -When the Program is made available in source code form: - - a) it must be made available under this Agreement; and - - b) a copy of this Agreement must be included with each copy of the Program. - -Contributors may not remove or alter any copyright notices contained within the -Program. - -Each Contributor must identify itself as the originator of its Contribution, if -any, in a manner that reasonably allows subsequent Recipients to identify the -originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this license is -intended to facilitate the commercial use of the Program, the Contributor who -includes the Program in a commercial product offering should do so in a manner -which does not create potential liability for other Contributors. Therefore, if -a Contributor includes the Program in a commercial product offering, such -Contributor ("Commercial Contributor") hereby agrees to defend and indemnify -every other Contributor ("Indemnified Contributor") against any losses, damages -and costs (collectively "Losses") arising from claims, lawsuits and other legal -actions brought by a third party against the Indemnified Contributor to the -extent caused by the acts or omissions of such Commercial Contributor in -connection with its distribution of the Program in a commercial product -offering. The obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In order -to qualify, an Indemnified Contributor must: a) promptly notify the Commercial -Contributor in writing of such claim, and b) allow the Commercial Contributor to -control, and cooperate with the Commercial Contributor in, the defense and any -related settlement negotiations. The Indemnified Contributor may participate in -any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product -offering, Product X. That Contributor is then a Commercial Contributor. If that -Commercial Contributor then makes performance claims, or offers warranties -related to Product X, those performance claims and warranties are such -Commercial Contributor's responsibility alone. Under this section, the -Commercial Contributor would have to defend claims against the other -Contributors related to those performance claims and warranties, and if a court -requires any other Contributor to pay any damages as a result, the Commercial -Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR -IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each -Recipient is solely responsible for determining the appropriateness of using and -distributing the Program and assumes all risks associated with its exercise of -rights under this Agreement, including but not limited to the risks and costs of -program errors, compliance with applicable laws, damage to or loss of data, -programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY -CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST -PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS -GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of the -terms of this Agreement, and without further action by the parties hereto, such -provision shall be reformed to the minimum extent necessary to make such -provision valid and enforceable. - -If Recipient institutes patent litigation against a Contributor with respect to -a patent applicable to software (including a cross-claim or counterclaim in a -lawsuit), then any patent licenses granted by that Contributor to such Recipient -under this Agreement shall terminate as of the date such litigation is filed. In -addition, if Recipient institutes patent litigation against any entity -(including a cross-claim or counterclaim in a lawsuit) alleging that the Program -itself (excluding combinations of the Program with other software or hardware) -infringes such Recipient's patent(s), then such Recipient's rights granted under -Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to -comply with any of the material terms or conditions of this Agreement and does -not cure such failure in a reasonable period of time after becoming aware of -such noncompliance. If all Recipient's rights under this Agreement terminate, -Recipient agrees to cease use and distribution of the Program as soon as -reasonably practicable. However, Recipient's obligations under this Agreement -and any licenses granted by Recipient relating to the Program shall continue and -survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in -order to avoid inconsistency the Agreement is copyrighted and may only be -modified in the following manner. The Agreement Steward reserves the right to -publish new versions (including revisions) of this Agreement from time to time. -No one other than the Agreement Steward has the right to modify this Agreement. -IBM is the initial Agreement Steward. IBM may assign the responsibility to serve -as the Agreement Steward to a suitable separate entity. Each new version of the -Agreement will be given a distinguishing version number. The Program (including -Contributions) may always be distributed subject to the version of the Agreement -under which it was received. In addition, after a new version of the Agreement -is published, Contributor may elect to distribute the Program (including its -Contributions) under the new version. Except as expressly stated in Sections -2(a) and 2(b) above, Recipient receives no rights or licenses to the -intellectual property of any Contributor under this Agreement, whether -expressly, by implication, estoppel or otherwise. All rights in the Program not -expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the -intellectual property laws of the United States of America. No party to this -Agreement will bring a legal action under this Agreement more than one year -after the cause of action arose. Each party waives its rights to a jury trial in -any resulting litigation. diff --git a/javaloader/readme.txt b/javaloader/readme.txt deleted file mode 100644 index 271c208..0000000 --- a/javaloader/readme.txt +++ /dev/null @@ -1,6 +0,0 @@ -JavaLoader v1.2 -Author: Mark Mandel -Date: 22 March 2017 - -Documentation can now be found at: -https://github.com/markmandel/JavaLoader/wiki diff --git a/javaloader/support/cfcdynamicproxy/lib/cfcdynamicproxy-src.zip b/javaloader/support/cfcdynamicproxy/lib/cfcdynamicproxy-src.zip deleted file mode 100644 index f3b9d83..0000000 Binary files a/javaloader/support/cfcdynamicproxy/lib/cfcdynamicproxy-src.zip and /dev/null differ diff --git a/javaloader/support/cfcdynamicproxy/lib/cfcdynamicproxy.jar b/javaloader/support/cfcdynamicproxy/lib/cfcdynamicproxy.jar deleted file mode 100644 index 4c4afc2..0000000 Binary files a/javaloader/support/cfcdynamicproxy/lib/cfcdynamicproxy.jar and /dev/null differ diff --git a/javaloader/support/spring/lib/spring-coldfusion-src.zip b/javaloader/support/spring/lib/spring-coldfusion-src.zip deleted file mode 100644 index d308f05..0000000 Binary files a/javaloader/support/spring/lib/spring-coldfusion-src.zip and /dev/null differ diff --git a/javaloader/support/spring/lib/spring-coldfusion.jar b/javaloader/support/spring/lib/spring-coldfusion.jar deleted file mode 100644 index daa64a1..0000000 Binary files a/javaloader/support/spring/lib/spring-coldfusion.jar and /dev/null differ diff --git a/unittests/AbstractTestCase.cfc b/unittests/AbstractTestCase.cfc deleted file mode 100644 index 3bbbe12..0000000 --- a/unittests/AbstractTestCase.cfc +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - instance.libPath = expandPath("/unittests/lib"); - instance.srcPath = expandPath("/unittests/src"); - - - - - - - - - - - - - - - var local = {}; - - - - - - - - - - - - - - - - - - - createObject("Java", "java.lang.System").out.println(arguments.str); - - - - - \ No newline at end of file diff --git a/unittests/Application.cfc b/unittests/Application.cfc deleted file mode 100644 index 5301a27..0000000 --- a/unittests/Application.cfc +++ /dev/null @@ -1,10 +0,0 @@ - - - - this.name = "JavaLoader Unit Tests"; - this.sessionmanagement = true; - - structClear(server); - - - \ No newline at end of file diff --git a/unittests/RemoteFacade.cfc b/unittests/RemoteFacade.cfc deleted file mode 100644 index 717a95b..0000000 --- a/unittests/RemoteFacade.cfc +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/unittests/classloader/PackageTest.cfc b/unittests/classloader/PackageTest.cfc deleted file mode 100644 index 8a15a23..0000000 --- a/unittests/classloader/PackageTest.cfc +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - var local = {}; - super.setup(); - clean(); - - local.libpaths = []; - ArrayAppend(local.libpaths, expandPath("/javaloader/support/cfcdynamicproxy/lib/cfcdynamicproxy.jar")); - - local.srcparths = [instance.srcPath & "/dynamicproxy"]; - - jl = createObject("component", "javaloader.JavaLoader").init(loadPaths = local.libpaths, loadColdFusionClassPath = true, sourceDirectories = local.srcparths); - - - - - - - var local = {}; - - local.string = jl.create("java.lang.String"); - local.class = local.string.getClass(); - - assertEquals("java.lang.String", local.class.getName()); - - local.package = local.class.getPackage(); - - assertEquals("java.lang", local.package.getName()); - - - - - - var local = {}; - - local.dp = jl.create("com.compoundtheory.coldfusion.cfc.CFCDynamicProxy"); - local.class = local.dp.getClass(); - - assertEquals("com.compoundtheory.coldfusion.cfc.CFCDynamicProxy", local.class.getName()); - - local.package = local.class.getPackage(); - - assertEquals("com.compoundtheory.coldfusion.cfc", local.package.getName()); - - - - - - - - \ No newline at end of file diff --git a/unittests/compile/CompileTest.cfc b/unittests/compile/CompileTest.cfc deleted file mode 100644 index cfe723e..0000000 --- a/unittests/compile/CompileTest.cfc +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - - super.setup(); - clean(); - - - - - - super.teardown(); - clean(); - - - - - - var local = StructNew(); - - local.compiler = createObject("component", "javaloader.JavaCompiler").init(); - - local.paths = [instance.srcPath & "/helloworld"]; - - local.jar = local.compiler.compile(local.paths); - - local.paths = [local.jar]; - - local.loader = createObject("component", "javaloader.JavaLoader").init(local.paths); - - local.helloWorld = local.loader.create("ut1.HelloWorld").init(); - - assertEquals(local.helloWorld.hello(), "Hello World"); - - - - - - var local = {}; - - local.paths = [instance.srcPath & "/helloworld"]; - - local.loader = createObject("component", "javaloader.JavaLoader").init(sourceDirectories=local.paths); - - local.helloWorld = local.loader.create("ut1.HelloWorld").init(); - - assertEquals(local.helloWorld.hello(), "Hello World"); - - - - - - var local = {}; - - local.check = false; - - fileMove(instance.srcPath & "/helloworld/ut1/HelloWorldBroken.java.bad", instance.srcPath & "/helloworld/ut1/HelloWorldBroken.java"); - - local.compiler = createObject("component", "javaloader.JavaCompiler").init(); - - local.paths = [instance.srcPath & "/helloworld"]; - - try - { - local.jar = local.compiler.compile(local.paths); - } - catch(javacompiler.SourceCompilationException exc) - { - debug(exc); - local.check = true; - } - catch(Any exc) - { - fileMove(instance.srcPath & "/helloworld/ut1/HelloWorldBroken.java", instance.srcPath & "/helloworld/ut1/HelloWorldBroken.java.bad"); - } - - AssertTrue(local.check, "An error should have been thrown on the compilation"); - - //reset it - fileMove(instance.srcPath & "/helloworld/ut1/HelloWorldBroken.java", instance.srcPath & "/helloworld/ut1/HelloWorldBroken.java.bad"); - - - - - - var local = {}; - - local.paths = [instance.srcPath & "/helloworld"]; - - local.loader = createObject("component", "javaloader.JavaLoader").init(sourceDirectories=local.paths); - - local.helloWorld = local.loader.create("ut1.HelloWorld").init(); - - assertEquals(local.helloWorld.hello(), "Hello World"); - - sleep(100); - - fileMove(instance.srcPath & "/helloworld/ut1/HelloWorld.java", instance.srcPath & "/helloworld/ut1/HelloWorld.java.bak"); - - local.content = fileRead(instance.srcPath & "/helloworld/ut1/HelloWorld.java.bak"); - - local.content = replace(local.content, '"Hello World"', '"This has now been changed"'); - - fileWrite(instance.srcPath & "/helloworld/ut1/HelloWorld.java", local.content); - - local.helloWorld = local.loader.create("ut1.HelloWorld").init(); - - assertEquals("This has now been changed", local.helloWorld.hello()); - - fileMove(instance.srcPath & "/helloworld/ut1/HelloWorld.java.bak", instance.srcPath & "/helloworld/ut1/HelloWorld.java"); - - - - - - var local = {}; - - local.paths = [instance.srcPath & "/helloworld"]; - - local.loader = createObject("component", "javaloader.JavaLoader").init(sourceDirectories=local.paths, trustedSource=true); - - local.helloWorld = local.loader.create("ut1.HelloWorld").init(); - - assertEquals(local.helloWorld.hello(), "Hello World"); - - fileMove(instance.srcPath & "/helloworld/ut1/HelloWorld.java", instance.srcPath & "/helloworld/ut1/HelloWorld.java.bak"); - - local.content = fileRead(instance.srcPath & "/helloworld/ut1/HelloWorld.java.bak"); - - local.content = replace(local.content, '"Hello World"', '"This has now been changed"'); - - fileWrite(instance.srcPath & "/helloworld/ut1/HelloWorld.java", local.content); - - local.helloWorld = local.loader.create("ut1.HelloWorld").init(); - - assertEquals("Hello World", local.helloWorld.hello()); - - fileMove(instance.srcPath & "/helloworld/ut1/HelloWorld.java.bak", instance.srcPath & "/helloworld/ut1/HelloWorld.java"); - - //now we run it again, to make sure it still works from the stored .jar file - - local.loader = createObject("component", "javaloader.JavaLoader").init(sourceDirectories=local.paths, trustedSource=true); - - local.helloWorld = local.loader.create("ut1.HelloWorld").init(); - - assertEquals(local.helloWorld.hello(), "Hello World"); - - - - - - - - \ No newline at end of file diff --git a/unittests/dynamicproxy/DynamicProxyTest.cfc b/unittests/dynamicproxy/DynamicProxyTest.cfc deleted file mode 100644 index ccc71c6..0000000 --- a/unittests/dynamicproxy/DynamicProxyTest.cfc +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - - var local = {}; - super.setup(); - clean(); - - local.libpaths = []; - ArrayAppend(local.libpaths, expandPath("/javaloader/support/cfcdynamicproxy/lib/cfcdynamicproxy.jar")); - - local.srcparths = [instance.srcPath & "/dynamicproxy"]; - - instance.loader = createObject("component", "javaloader.JavaLoader").init(loadPaths=local.libpaths, loadColdFusionClassPath=true, sourceDirectories=local.srcparths); - - - - - - var local = {}; - - - local.cfcProxyTest = instance.loader.create("ut2.CFCProxyTest").init(); - - local.bar = createObject("component", "cfc.SimpleBean"); - - local.proxy = local.cfcProxyTest.getDynamicProxy(local.bar); - - assertEquals("Hello!", local.proxy.foo("Hello!")); - - assertEquals("I could not find my method: doesNotExist", local.proxy.doesNotExist()); - - local.catch = false; - - try - { - local.proxy.thisMethodReallyDoesNotExist(); - } - catch(Object exc) - { - local.catch = true; - } - - AssertTrue(local.catch, "Exception should be thrown"); - - debug(local.proxy); - - local.interfaces = local.proxy.getClass().getInterfaces(); - for(local.i = 1; local.i lte arraylen(local.interfaces); local.i++) - { - local.class = local.interfaces[local.i]; - debug(local.class.toString()); - - assertEquals(local.class.getName(), "ut2.IFoo"); - } - - AssertEquals(local.cfcProxyTest.runDynamicProxyFoo(local.bar), "Hello from dyanmic proxy"); - - - - - - var local = {}; - - local.cfcProxyTest = instance.loader.create("ut2.CFCProxyTest").init(); - - local.path = expandPath("/unittests/dynamicproxy/cfc/SimpleBean.cfc"); - - local.proxy = local.cfcProxyTest.getDynamicProxy(local.path); - - assertEquals("Hello!", local.proxy.foo("Hello!")); - - assertEquals("I could not find my method: doesNotExist", local.proxy.doesNotExist()); - - local.catch = false; - - try - { - local.proxy.thisMethodReallyDoesNotExist(); - } - catch(Object exc) - { - local.catch = true; - } - - AssertTrue(local.catch, "Exception should be thrown"); - - AssertEquals(local.cfcProxyTest.runDynamicProxyFoo(local.path), "Hello from dyanmic proxy"); - - - - - - local.bar = createObject("component", "cfc.RequestBean"); - - local.cfcProxyTest = instance.loader.create("ut2.CFCProxyTest").init(); - - local.proxy = local.cfcProxyTest.getDynamicProxy(local.bar); - - request.foo = "yadda"; - - AssertEquals("yadda :: Hello", local.proxy.foo("Hello")); - - local.path = expandPath("/unittests/dynamicproxy/cfc/RequestBean.cfc"); - - local.proxy = local.cfcProxyTest.getDynamicProxy(local.path); - - request.foo = "yadda"; - - AssertEquals("yadda :: Hello", local.proxy.foo("Hello")); - - - - - - local.bar = createObject("component", "cfc.ApplicationBean"); - - local.cfcProxyTest = instance.loader.create("ut2.CFCProxyTest").init(); - - local.proxy = local.cfcProxyTest.getDynamicProxy(local.bar); - - application.foo = "yadda"; - - AssertEquals("yadda :: Hello", local.proxy.foo("Hello")); - - local.path = expandPath("/unittests/dynamicproxy/cfc/ApplicationBean.cfc"); - - local.proxy = local.cfcProxyTest.getDynamicProxy(local.path); - - request.foo = "yadda"; - - AssertEquals("yadda :: Hello", local.proxy.foo("Hello")); - - - - - - local.bar = createObject("component", "cfc.SessionBean"); - - local.cfcProxyTest = instance.loader.create("ut2.CFCProxyTest").init(); - - local.proxy = local.cfcProxyTest.getDynamicProxy(local.bar); - - session.foo = "yadda"; - - AssertEquals("yadda :: Hello", local.proxy.foo("Hello")); - - local.path = expandPath("/unittests/dynamicproxy/cfc/SessionBean.cfc"); - - local.proxy = local.cfcProxyTest.getDynamicProxy(local.path); - - session.foo = "yadda"; - - AssertEquals("yadda :: Hello", local.proxy.foo("Hello")); - - - - - - local.bar = createObject("component", "cfc.SessionBean"); - - local.cfcProxyTest = instance.loader.create("ut2.CFCProxyTest").init(); - - local.proxy = local.cfcProxyTest.getDynamicProxy(local.bar); - - StructClear(session); - - local.check = false; - - try - { - AssertEquals("yadda :: Hello", local.proxy.foo("Hello")); - } - catch(Expression exc) - { - AssertEquals("Element FOO is undefined in SESSION.", exc.message); - local.check = true; - } - - AssertTrue(local.check, "Exception should have fired"); - - - - - - var local = {}; - local.CFCDynamicProxy = instance.loader.create("com.compoundtheory.coldfusion.cfc.CFCDynamicProxy"); - - local.runnable = createObject("component", "cfc.Runnable").init(); - local.interfaces = ["java.lang.Runnable"]; - local.proxy = local.CFCDynamicProxy.createInstance(local.runnable, local.interfaces); - - assertEquals("Foo", local.runnable.getValue()); - - local.thread = createObject("java", "java.lang.Thread").init(local.proxy); - - local.thread.start(); - - local.thread.join(); - - assertEquals("Bar", local.runnable.getValue()); - - - - - - var local = {}; - - local.completionQueue = createObject("java", "java.util.concurrent.LinkedBlockingQueue").init(1000000); - local.executor = createObject("java", "java.util.concurrent.Executors").newFixedThreadPool(4); - local.completionService = createObject("java", "java.util.concurrent.ExecutorCompletionService").init(local.executor, local.completionQueue); - local.timeUnit = createObject("java", "java.util.concurrent.TimeUnit"); - local.CFCDynamicProxy = instance.loader.create("com.compoundtheory.coldfusion.cfc.CFCDynamicProxy"); - - - //guard... ensure the object works correctly when called directly - local.sanity = createObject("component", "cfc.ThingieDoer").init(1, "normal old thingiedoer"); - local.result = local.sanity.call(); - assertTrue( local.result.success ); - assertFalse( structKeyExists(local.result, "error") ); - - //now move on to the real test - local.interfaces = ["java.util.concurrent.Callable"]; - local.thingieDoer = createObject("component", "cfc.ThingieDoer").init(1 , "name 1" ); - local.thingieProxy = local.CFCDynamicProxy.createInstance(local.thingieDoer, local.interfaces); - - //submit the proxy. This should cause the completionService to run it immediately; - local.completionService.submit( local.thingieProxy ); //this doesn't error, but the call() method never gets run - - //ensure what we've submitted gets run, then shut down the service - local.executor.awaitTermination( javacast("int",1), local.timeUnit.SECONDS ); - - //get the "future" object, which is the result of completionService running the proxy's call() method - local.futureResult = local.completionService.poll(); - - //boom - local.callResult = local.futureResult.get(); - assertTrue( local.callResult.success ); - assertFalse( structKeyExists( local.callResult, "error" ) ); - - - - - - - - - \ No newline at end of file diff --git a/unittests/dynamicproxy/SpringSchemaTest.cfc b/unittests/dynamicproxy/SpringSchemaTest.cfc deleted file mode 100644 index 6789d74..0000000 --- a/unittests/dynamicproxy/SpringSchemaTest.cfc +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - var local = {}; - super.setup(); - clean(); - - local.libpaths = []; - ArrayAppend(local.libpaths, expandPath("/javaloader/support/cfcdynamicproxy/lib/cfcdynamicproxy.jar")); - ArrayAppend(local.libpaths, expandPath("/javaloader/support/spring/lib/spring-coldfusion.jar")); - - - - - - - - - - local.srcparths = [instance.srcPath & "/spring", instance.srcPath & "/dynamicproxy"]; - - instance.loader = createObject("component", "javaloader.JavaLoader").init(loadPaths=local.libpaths, loadColdFusionClassPath=true, sourceDirectories=local.srcparths); - - - - - - - - local = {}; - - try - { - local.spring = loadSpring(); - } - catch(Any e) - { - debug(e.stacktrace); - fail("Error occured: #e.stacktrace#"); - } - - local.foo = local.spring.getBean("foo"); - - debug(local.foo); - - assertEquals("Hello!", local.foo.foo("Hello!")); - - assertEquals("I could not find my method: doesNotExist", local.foo.doesNotExist()); - - local.interfaces = local.foo.getClass().getInterfaces(); - for(local.i = 1; local.i lte arraylen(local.interfaces); local.i++) - { - local.class = local.interfaces[local.i]; - debug(local.class.toString()); - - assertEquals(local.class.getName(), "ut2.IFoo"); - } - - - - - - local = {}; - - try - { - local.spring = loadSpring(); - } - catch(Any e) - { - debug(e.stacktrace); - fail("Error occured: #e.stacktrace#"); - } - - local.foo = local.spring.getBean("relativeBean"); - - debug(local.foo); - - assertEquals("Hello!", local.foo.foo("Hello!")); - - assertEquals("I could not find my method: doesNotExist", local.foo.doesNotExist()); - - local.interfaces = local.foo.getClass().getInterfaces(); - for(local.i = 1; local.i lte arraylen(local.interfaces); local.i++) - { - local.class = local.interfaces[local.i]; - debug(local.class.toString()); - - assertEquals(local.class.getName(), "ut2.IFoo"); - } - - - - - - var local = {}; - - try - { - local.spring = loadSpring(); - - local.dibean = local.spring.getBean("dibean"); - - local.dibean2 = local.spring.getBean("dibean"); - } - catch(Any e) - { - debug(e); - fail(e.stacktrace); - } - - assertEquals("I've been init", local.dibean.getInitValue()); - assertEquals("I've been init", local.dibean2.getInitValue()); - - assertEquals("This is my String!", local.dibean.getStringValue()); - assertEquals("This is my String!", local.dibean2.getStringValue()); - - assertNotSame(local.dibean, local.dibean2); - - - - - - var local = {}; - - try - { - local.spring = loadSpring(); - - local.dibean = local.spring.getBean("dibeanSingle"); - - local.dibean2 = local.spring.getBean("dibeanSingle"); - } - catch(Any e) - { - debug(e); - fail(e.stacktrace); - } - - local.interfaces = local.dibean.getClass().getMethods(); - for(local.i = 1; local.i lte arraylen(local.interfaces); local.i++) - { - local.class = local.interfaces[local.i]; - debug(local.class.toString()); - } - - assertEquals("I've been init", local.dibean.getInitValue()); - assertEquals("I've been init", local.dibean2.getInitValue()); - - assertEquals("Foo!", local.dibean.getBar().getValue()); - - assertSame(local.dibean, local.dibean2); - - - - - - - - - local = {}; - - local.path = "file://" & getDirectoryFromPath(getMetaData(this).path) & "/xml/spring.xml"; - - //create our properties file - local.properties = createObject("java", "java.util.Properties").init(); - local.properties.put("rootPath", expandPath("/")); - - local.fo = createObject("java", "java.io.FileOutputStream").init(instance.srcPath & "/spring/ut3/default.properties"); - - local.properties.store(local.fo, "Default Properties"); - - local.spring = instance.loader.create("org.springframework.context.support.FileSystemXmlApplicationContext").init(); - - local.spring.setClassLoader(instance.loader.getURLClassLoader()); - - local.spring.setConfigLocation(local.path); - - local.spring.refresh(); - - return local.spring; - - - - \ No newline at end of file diff --git a/unittests/dynamicproxy/cfc/ApplicationBean.cfc b/unittests/dynamicproxy/cfc/ApplicationBean.cfc deleted file mode 100644 index de751b9..0000000 --- a/unittests/dynamicproxy/cfc/ApplicationBean.cfc +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/unittests/dynamicproxy/cfc/DIBean.cfc b/unittests/dynamicproxy/cfc/DIBean.cfc deleted file mode 100644 index f9a3a61..0000000 --- a/unittests/dynamicproxy/cfc/DIBean.cfc +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - setInitValue("I've been init"); - - return this; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/unittests/dynamicproxy/cfc/RequestBean.cfc b/unittests/dynamicproxy/cfc/RequestBean.cfc deleted file mode 100644 index fabd5fb..0000000 --- a/unittests/dynamicproxy/cfc/RequestBean.cfc +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/unittests/dynamicproxy/cfc/Runnable.cfc b/unittests/dynamicproxy/cfc/Runnable.cfc deleted file mode 100644 index 1b4254b..0000000 --- a/unittests/dynamicproxy/cfc/Runnable.cfc +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - setValue("Foo"); - - return this; - - - - - - setValue("Bar"); - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/unittests/dynamicproxy/cfc/SessionBean.cfc b/unittests/dynamicproxy/cfc/SessionBean.cfc deleted file mode 100644 index bb5883a..0000000 --- a/unittests/dynamicproxy/cfc/SessionBean.cfc +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/unittests/dynamicproxy/cfc/SimpleBean.cfc b/unittests/dynamicproxy/cfc/SimpleBean.cfc deleted file mode 100644 index 3562b50..0000000 --- a/unittests/dynamicproxy/cfc/SimpleBean.cfc +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/unittests/dynamicproxy/cfc/ThingieDoer.cfc b/unittests/dynamicproxy/cfc/ThingieDoer.cfc deleted file mode 100644 index db01b9a..0000000 --- a/unittests/dynamicproxy/cfc/ThingieDoer.cfc +++ /dev/null @@ -1,47 +0,0 @@ - - - - variables.id = 0; - variables.name = ""; - status = "pending"; - result = { status = status, createts = now() }; - - - - - - < - structAppend(variables, arguments); - return this; - - - - - - try - { - //writeLog("inside call for id #id#"); - result.status ="complete"; - result.success = true; - } - catch( any ex ) - { - result.status ="error"; - result.error = ex; - //writeLog("Call errored!"); - } - - result.completets = now(); - - return result; - - - - - - - - - - - \ No newline at end of file diff --git a/unittests/dynamicproxy/xml/spring.xml b/unittests/dynamicproxy/xml/spring.xml deleted file mode 100644 index 65e4727..0000000 --- a/unittests/dynamicproxy/xml/spring.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/unittests/index.cfm b/unittests/index.cfm deleted file mode 100644 index ee9246d..0000000 --- a/unittests/index.cfm +++ /dev/null @@ -1,14 +0,0 @@ - - - StructClear(server); - - - - - #results.getResultsOutput('extjs')# \ No newline at end of file diff --git a/unittests/lib/helloworld.jar b/unittests/lib/helloworld.jar deleted file mode 100644 index a12f2d1..0000000 Binary files a/unittests/lib/helloworld.jar and /dev/null differ diff --git a/unittests/lib/spring/cglib-nodep-2.1_3.jar b/unittests/lib/spring/cglib-nodep-2.1_3.jar deleted file mode 100644 index e9b17eb..0000000 Binary files a/unittests/lib/spring/cglib-nodep-2.1_3.jar and /dev/null differ diff --git a/unittests/lib/spring/spring.jar b/unittests/lib/spring/spring.jar deleted file mode 100644 index d0b3ce6..0000000 Binary files a/unittests/lib/spring/spring.jar and /dev/null differ diff --git a/unittests/load/LoadTest.cfc b/unittests/load/LoadTest.cfc deleted file mode 100644 index a03d879..0000000 --- a/unittests/load/LoadTest.cfc +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - var local = StructNew(); - - local.paths = ArrayNew(1); - - local.paths[1] = instance.libPath & "/helloworld.jar"; - - local.loader = createObject("component", "javaloader.JavaLoader").init(local.paths); - - local.helloWorld = local.loader.create("HelloWorld").init(); - - assertEquals(local.helloWorld.hello(), "Hello World"); - - - - - - var local = StructNew(); - - local.paths = []; - - local.paths[1] = instance.libPath & "/helloworld.jar"; - - local.loader = createObject("component", "javaloader.JavaLoader").init(local.paths); - - local.helloWorld = local.loader.create("HelloWorldDoesNotExist").init(); - - - - - - - - \ No newline at end of file diff --git a/unittests/load/SwitchThreadContextTest.cfc b/unittests/load/SwitchThreadContextTest.cfc deleted file mode 100644 index 14a5ba3..0000000 --- a/unittests/load/SwitchThreadContextTest.cfc +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - super.setup(); - paths = ArrayNew(1); - paths[1] = instance.libPath & "/helloworld.jar"; - - javaloader = createObject("component", "javaloader.JavaLoader").init(paths); - - - - - - var mixin = javaloader.switchThreadContextClassLoader; - - var classLoader = mixin("returnCurrentClassLoader", javaloader.getURLClassLoader()); - - assertSame(javaloader.getURLClassLoader(), classLoader); - - - - - - var classLoader = javaloader.switchThreadContextClassLoader(returnCurrentClassLoader); - assertSame(javaloader.getURLClassLoader(), classLoader); - - - - - - var urlClassLoader = createObject("java", "java.net.URLClassLoader").init(ArrayNew(1)); - - var classLoader = javaloader.switchThreadContextClassLoader(returnCurrentClassLoader, urlClassLoader); - assertSame(urlClassLoader, classLoader); - - - - - - var local = {}; - local.class = getMetadata(this).name; - local.object = createObject("component", local.class); - - makePublic(local.object, "returnCurrentClassLoader"); - - local.classLoader = javaloader.switchThreadContextClassLoader(local.object, "returnCurrentClassLoader"); - - assertSame(javaloader.getURLClassLoader(), local.classLoader); - - - - - - var local = {}; - local.class = getMetadata(this).name; - local.object = createObject("component", local.class); - local.urlClassLoader = createObject("java", "java.net.URLClassLoader").init(ArrayNew(1)); - - makePublic(local.object, "returnCurrentClassLoader"); - - local.classLoader = javaloader.switchThreadContextClassLoader(local.object, "returnCurrentClassLoader"); - - assertSame(javaloader.getURLClassLoader(), local.classLoader); - - - - - - var mixin = javaloader.switchThreadContextClassLoader; - var args = { arg1 = 1, arg2 = 2}; - var result = mixin("returnCurrentClassLoaderAndArguments", args, javaloader.getURLClassLoader()); - assertSame(javaloader.getURLClassLoader(), result.classLoader); - assertStructEquals(args, result.args); - - - - - - var args = { arg1 = 1, arg2 = 2}; - var result = javaloader.switchThreadContextClassLoader(returnCurrentClassLoaderAndArguments, args); - assertSame(javaloader.getURLClassLoader(), result.classLoader); - assertStructEquals(args, result.args); - - - - - - var urlClassLoader = createObject("java", "java.net.URLClassLoader").init(ArrayNew(1)); - var args = { arg1 = 1, arg2 = 2}; - var result = javaloader.switchThreadContextClassLoader(returnCurrentClassLoaderAndArguments, args, urlClassLoader); - assertSame(urlClassLoader, result.classLoader); - assertStructEquals(args, result.args); - - - - - - var local = {}; - local.class = getMetadata(this).name; - local.object = createObject("component", local.class); - local.args = { arg1 = 1, arg2 = 2}; - - makePublic(local.object, "returnCurrentClassLoaderAndArguments"); - - local.result = javaloader.switchThreadContextClassLoader(local.object, "returnCurrentClassLoaderAndArguments", local.args); - assertSame(javaloader.getURLClassLoader(), local.result.classLoader); - assertStructEquals(local.args, local.result.args); - - - - - - var local = {}; - local.class = getMetadata(this).name; - local.object = createObject("component", local.class); - local.urlClassLoader = createObject("java", "java.net.URLClassLoader").init(ArrayNew(1)); - local.args = { arg1 = 1, arg2 = 2}; - - makePublic(local.object, "returnCurrentClassLoaderAndArguments"); - - local.result = javaloader.switchThreadContextClassLoader(local.object, "returnCurrentClassLoaderAndArguments", local.args, local.urlClassLoader); - assertSame(local.urlClassLoader, local.result.classLoader); - assertStructEquals(local.args, local.result.args); - - - - - - - - - - var Thread = createObject("java", "java.lang.Thread"); - return Thread.currentThread().getContextClassLoader(); - - - - - - var Thread = createObject("java", "java.lang.Thread"); - var result = { classLoader = Thread.currentThread().getContextClassLoader(), args = arguments }; - return result; - - - - \ No newline at end of file diff --git a/unittests/src/dynamicproxy/ut2/CFCProxyTest.java b/unittests/src/dynamicproxy/ut2/CFCProxyTest.java deleted file mode 100644 index c77101f..0000000 --- a/unittests/src/dynamicproxy/ut2/CFCProxyTest.java +++ /dev/null @@ -1,49 +0,0 @@ -package ut2; - -import coldfusion.runtime.TemplateProxy; - -import com.compoundtheory.coldfusion.cfc.CFCDynamicProxy; - -/** - * Test cfc proxy - * @author Mark Mandel - * - */ -public class CFCProxyTest -{ - public CFCProxyTest() - { - } - - public IFoo getDynamicProxy(TemplateProxy cfc) - { - Class[] interfaces = { IFoo.class }; - - IFoo foo = (IFoo)CFCDynamicProxy.createInstance(cfc, interfaces); - - return foo; - } - - public IFoo getDynamicProxy(String cfc) throws Throwable - { - Class[] interfaces = { IFoo.class }; - - IFoo foo = (IFoo)CFCDynamicProxy.createInstance(cfc, interfaces); - - return foo; - } - - public Object runDynamicProxyFoo(TemplateProxy cfc) - { - IFoo foo = getDynamicProxy(cfc); - - return foo.foo("Hello from dyanmic proxy"); - } - - public Object runDynamicProxyFoo(String path) throws Throwable - { - IFoo foo = getDynamicProxy(path); - - return foo.foo("Hello from dyanmic proxy"); - } -} diff --git a/unittests/src/dynamicproxy/ut2/IFoo.java b/unittests/src/dynamicproxy/ut2/IFoo.java deleted file mode 100644 index 86df414..0000000 --- a/unittests/src/dynamicproxy/ut2/IFoo.java +++ /dev/null @@ -1,8 +0,0 @@ -package ut2; - -public interface IFoo -{ - public Object foo(String arg); - - public Object doesNotExist(); -} diff --git a/unittests/src/helloworld/ut1/Dependency.java b/unittests/src/helloworld/ut1/Dependency.java deleted file mode 100644 index cd31267..0000000 --- a/unittests/src/helloworld/ut1/Dependency.java +++ /dev/null @@ -1,8 +0,0 @@ -package ut1; - -public class Dependency -{ - public Dependency() - { - } -} diff --git a/unittests/src/helloworld/ut1/HelloWorld.java b/unittests/src/helloworld/ut1/HelloWorld.java deleted file mode 100644 index 039ab5b..0000000 --- a/unittests/src/helloworld/ut1/HelloWorld.java +++ /dev/null @@ -1,22 +0,0 @@ -package ut1; - -public class HelloWorld -{ - private String msg = "Hello World"; - - public HelloWorld() - { - //this is just here to see if dependent objects get added - new Dependency(); - } - - public HelloWorld(String msg) - { - this.msg = msg; - } - - public String hello() - { - return msg; - } -} diff --git a/unittests/src/helloworld/ut1/HelloWorldBroken.java.bad b/unittests/src/helloworld/ut1/HelloWorldBroken.java.bad deleted file mode 100644 index 40098fe..0000000 --- a/unittests/src/helloworld/ut1/HelloWorldBroken.java.bad +++ /dev/null @@ -1,19 +0,0 @@ -package com; - -public class HelloWorldBroken -{ - private String msg = "Hello World"; - - public HelloWorld() - { - } - - public HelloWorld(String msg) - { - this.msg = msg; - - public String hello() - { - return msg; - } -} diff --git a/unittests/src/spring/ut3/Bar.java b/unittests/src/spring/ut3/Bar.java deleted file mode 100644 index 85e6041..0000000 --- a/unittests/src/spring/ut3/Bar.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * - */ -package ut3; - -/** - * A bean for some Foo goodness - * - * @author Mark Mandel - * - */ -public class Bar implements IBar -{ - public Bar() - { - System.out.println("Creating Bar! v2?"); - } - - /* (non-Javadoc) - * @see ut3.IBar#getValue() - */ - public String getValue() - { - return "Foo!"; - } -} \ No newline at end of file diff --git a/unittests/src/spring/ut3/IBar.java b/unittests/src/spring/ut3/IBar.java deleted file mode 100644 index 6c178ff..0000000 --- a/unittests/src/spring/ut3/IBar.java +++ /dev/null @@ -1,8 +0,0 @@ -package ut3; - -public interface IBar -{ - - public String getValue(); - -} \ No newline at end of file diff --git a/unittests/src/spring/ut3/IDIBean.java b/unittests/src/spring/ut3/IDIBean.java deleted file mode 100644 index 3056f22..0000000 --- a/unittests/src/spring/ut3/IDIBean.java +++ /dev/null @@ -1,19 +0,0 @@ -package ut3; - -import ut2.IFoo; - -/** - * Interface for DI testing - * @author Mark Mandel - * - */ -public interface IDIBean -{ - public void init(); - public String getInitValue(); - public String getStringValue(); - public void setStringValue(String value); - - public IBar getBar(); - public void setBar(IBar bar); -} \ No newline at end of file diff --git a/unittests/src/spring/ut3/default.properties b/unittests/src/spring/ut3/default.properties deleted file mode 100644 index 959e14e..0000000 --- a/unittests/src/spring/ut3/default.properties +++ /dev/null @@ -1,3 +0,0 @@ -#Default Properties -#Fri Mar 09 22:38:00 EST 2012 -rootPath=/mnt/hgfs/wwwroot/javaloader/