Skip to content

Commit ecb687a

Browse files
committed
first commit
0 parents  commit ecb687a

37 files changed

+2143
-0
lines changed

.gitattributes

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
*.sln merge=union
7+
*.csproj merge=union
8+
*.vbproj merge=union
9+
*.fsproj merge=union
10+
*.dbproj merge=union
11+
12+
# Standard to msysgit
13+
*.doc diff=astextplain
14+
*.DOC diff=astextplain
15+
*.docx diff=astextplain
16+
*.DOCX diff=astextplain
17+
*.dot diff=astextplain
18+
*.DOT diff=astextplain
19+
*.pdf diff=astextplain
20+
*.PDF diff=astextplain
21+
*.rtf diff=astextplain
22+
*.RTF diff=astextplain

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.settings
2+
logs/*.log
3+
settings.xml
4+
.netbeans
5+
test/results/*.properties
6+
test/results/*.html
7+
test/results/*.log

Application.cfc

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<!-----------------------------------------------------------------------
2+
********************************************************************************
3+
Copyright 2005-2007 ColdBox Framework by Luis Majano and Ortus Solutions, Corp
4+
www.coldbox.org | www.luismajano.com | www.ortussolutions.com
5+
********************************************************************************
6+
7+
Author : Luis Majano
8+
Date : 10/16/2007
9+
Description :
10+
This is the Application.cfc for usage withing the ColdBox Framework.
11+
Make sure that it extends the coldbox object:
12+
coldbox.system.Coldbox
13+
14+
So if you have refactored your framework, make sure it extends coldbox.
15+
----------------------------------------------------------------------->
16+
<cfcomponent output="false">
17+
<cfsetting enablecfoutputonly="yes">
18+
19+
<!--- APPLICATION CFC PROPERTIES --->
20+
<cfset this.name = hash( getCurrentTemplatePath() )>
21+
<cfset this.sessionManagement = true>
22+
<cfset this.sessionTimeout = createTimeSpan(0,0,30,0)>
23+
<cfset this.setClientCookies = true>
24+
25+
<!--- COLDBOX STATIC PROPERTY, DO NOT CHANGE UNLESS THIS IS NOT THE ROOT OF YOUR COLDBOX APP --->
26+
<cfset COLDBOX_APP_ROOT_PATH = getDirectoryFromPath(getCurrentTemplatePath())>
27+
<!--- The web server mapping to this application. Used for remote purposes or static purposes --->
28+
<cfset COLDBOX_APP_MAPPING = "">
29+
<!--- COLDBOX PROPERTIES --->
30+
<cfset COLDBOX_CONFIG_FILE = "">
31+
<!--- COLDBOX APPLICATION KEY OVERRIDE --->
32+
<cfset COLDBOX_APP_KEY = "">
33+
34+
<!--- on Application Start --->
35+
<cffunction name="onApplicationStart" returnType="boolean" output="false">
36+
<cfscript>
37+
//Load ColdBox Bootstrap
38+
application.cbBootstrap = new coldbox.system.Coldbox( COLDBOX_CONFIG_FILE, COLDBOX_APP_ROOT_PATH, COLDBOX_APP_KEY, COLDBOX_APP_MAPPING );
39+
application.cbBootstrap.loadColdbox();
40+
return true;
41+
</cfscript>
42+
</cffunction>
43+
44+
<!--- on Request Start --->
45+
<cffunction name="onRequestStart" returnType="boolean" output="true">
46+
<!--- ************************************************************* --->
47+
<cfargument name="targetPage" type="string" required="true" />
48+
<!--- ************************************************************* --->
49+
<!--- BootStrap Reinit Check --->
50+
<cfif not structKeyExists( application, "cbBootstrap" ) or application.cbBootStrap.isfwReinit()>
51+
<cflock name="coldbox.bootstrap_#hash( getCurrentTemplatePath() )#" type="exclusive" timeout="5" throwontimeout="true">
52+
<cfset structDelete( application, "cbBootStrap" )>
53+
<cfset onApplicationStart()>
54+
</cflock>
55+
</cfif>
56+
<!--- On Request Start via ColdBox --->
57+
<cfset application.cbBootstrap.onRequestStart( arguments.targetPage )>
58+
59+
<cfreturn true>
60+
</cffunction>
61+
62+
<!--- on Application End --->
63+
<cffunction name="onApplicationEnd" returnType="void" output="false">
64+
<!--- ************************************************************* --->
65+
<cfargument name="appScope" type="struct" required="true">
66+
<!--- ************************************************************* --->
67+
<cfset arguments.appScope.cbBootstrap.onApplicationEnd( argumentCollection=arguments )>
68+
</cffunction>
69+
70+
<!--- on Session Start --->
71+
<cffunction name="onSessionStart" returnType="void" output="false">
72+
<cfset application.cbBootstrap.onSessionStart()>
73+
</cffunction>
74+
75+
<!--- on Session End --->
76+
<cffunction name="onSessionEnd" returnType="void" output="false">
77+
<!--- ************************************************************* --->
78+
<cfargument name="sessionScope" type="struct" required="true">
79+
<cfargument name="appScope" type="struct" required="false">
80+
<!--- ************************************************************* --->
81+
<cfset appScope.cbBootstrap.onSessionEnd( argumentCollection=arguments )>
82+
</cffunction>
83+
84+
<!--- OnMissing Template --->
85+
<cffunction name="onMissingTemplate" access="public" returntype="boolean" output="true" hint="I execute when a non-existing CFM page was requested.">
86+
<cfargument name="template" type="string" required="true" hint="I am the template that the user requested."/>
87+
<cfreturn application.cbBootstrap.onMissingTemplate( argumentCollection=arguments )>
88+
</cffunction>
89+
90+
</cfcomponent>

box.json

Whitespace-only changes.

build.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0"?>
2+
<project name="build" basedir="." default="build">
3+
4+
<!-- dynamic values for build -->
5+
<tstamp prefix="start"/>
6+
<property name="project.name" value="cbox-javaloader" />
7+
<property name="build.label" value="${project.name}-${start.DSTAMP}${start.TSTAMP}"/>
8+
9+
<target name="clean">
10+
11+
</target>
12+
13+
<target name="build" depends="clean">
14+
<!-- Copy Readme -->
15+
<copy todir="./filebrowser">
16+
<fileset file="../README.txt" />
17+
<fileset file="../license.txt" />
18+
<fileset file="../APACHE_LICENSE.TXT" />
19+
</copy>
20+
<zip destfile="${build.label}.zip">
21+
<fileset dir=".">
22+
<exclude name="build.xml"/>
23+
<exclude name="java/**"/>
24+
</fileset>
25+
</zip>
26+
<delete file="./filebrowser/README.txt" />
27+
<delete file="./filebrowser/license.txt" />
28+
<delete file="./filebrowser/APACHE_LICENSE.TXT" />
29+
</target>
30+
31+
</project>

changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
********************************************************************************
2+
CHANGELOG
3+
********************************************************************************

config/.htaccess

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#apache access file to protect the config.xml.cfm file. Delete this if you do not use apache.
2+
authtype Basic
3+
deny from all
4+
Options -Indexes

config/Application.cfm

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!-----------------------------------------------------------------------
2+
Template : Application.cfm
3+
Author : Luis Majano
4+
Date : January 22, 2006
5+
Description :
6+
This is a protection Application cfm for the config file. You do not
7+
need to modify this file
8+
----------------------------------------------------------------------->
9+
<cfabort>

config/Coldbox.cfc

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<cfcomponent output="false" hint="My App Configuration">
2+
<cfscript>
3+
// Configure ColdBox Application
4+
function configure(){
5+
6+
// coldbox directives
7+
coldbox = {
8+
//Application Setup
9+
appName = "JavaLoader Shell",
10+
11+
//Development Settings
12+
reinitPassword = "",
13+
handlersIndexAutoReload = true,
14+
15+
//Implicit Events
16+
defaultEvent = "main.index",
17+
requestStartHandler = "",
18+
requestEndHandler = "",
19+
applicationStartHandler = "",
20+
applicationEndHandler = "",
21+
sessionStartHandler = "",
22+
sessionEndHandler = "",
23+
missingTemplateHandler = "",
24+
25+
//Extension Points
26+
UDFLibraryFile = "",
27+
coldboxExtensionsLocation = "",
28+
modulesExternalLocation = [],
29+
pluginsExternalLocation = "",
30+
viewsExternalLocation = "",
31+
layoutsExternalLocation = "",
32+
handlersExternalLocation = "",
33+
requestContextDecorator = "",
34+
35+
//Error/Exception Handling
36+
exceptionHandler = "",
37+
onInvalidEvent = "",
38+
customErrorTemplate = "",
39+
40+
//Application Aspects
41+
handlerCaching = false,
42+
eventCaching = false,
43+
proxyReturnCollection = false
44+
};
45+
46+
// custom settings
47+
settings = {
48+
};
49+
50+
// Activate WireBox
51+
wirebox = { enabled = true, singletonReload=true };
52+
53+
// Module Directives
54+
modules = {
55+
//Turn to false in production, on for dev
56+
autoReload = false
57+
};
58+
59+
//LogBox DSL
60+
logBox = {
61+
// Define Appenders
62+
appenders = {
63+
files={class="coldbox.system.logging.appenders.RollingFileAppender",
64+
properties = {
65+
filename = "javaloader", filePath="/#appMapping#/logs"
66+
}
67+
}
68+
},
69+
// Root Logger
70+
root = { levelmax="DEBUG", appenders="*" },
71+
// Implicit Level Categories
72+
info = [ "coldbox.system" ]
73+
};
74+
75+
//Register interceptors as an array, we need order
76+
interceptors = [
77+
//SES
78+
{class="coldbox.system.interceptors.SES",
79+
properties={}
80+
}
81+
];
82+
83+
}
84+
</cfscript>
85+
</cfcomponent>

config/Routes.cfm

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<cfscript>
2+
// Allow unique URL or combination (false)
3+
setUniqueURLS(false);
4+
// Auto reload configuration, true in dev makes sense
5+
//setAutoReload(false);
6+
// Sets automatic route extension detection and places the extension in the rc.format
7+
// setExtensionDetection(true)
8+
// setValidExtensions('xml,json,jsont,rss,html,htm');
9+
10+
// Base URL
11+
if( len(getSetting('AppMapping') ) lte 1){
12+
setBaseURL("http://#cgi.HTTP_HOST#/index.cfm");
13+
}
14+
else{
15+
setBaseURL("http://#cgi.HTTP_HOST#/#getSetting('AppMapping')#/index.cfm");
16+
}
17+
18+
// Your Application Routes
19+
addRoute(pattern=":handler/:action?");
20+
</cfscript>

0 commit comments

Comments
 (0)