-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate 3.5.0 release from develop to master
- Loading branch information
Showing
86 changed files
with
2,033 additions
and
292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,61 @@ | ||
component extends="framework.one" { | ||
|
||
// Either put the framework folder in your webroot or create a mapping for it! | ||
|
||
// FW/1 - configuration for introduction application: | ||
// controllers/layouts/services/views are in this folder (allowing for non-empty context root): | ||
variables.framework = { | ||
base = getDirectoryFromPath( CGI.SCRIPT_NAME ).replaceFirst( getContextRoot(), '' ) & 'introduction' | ||
}; | ||
component { | ||
// copy this to your application root to use as your Application.cfc | ||
// or incorporate the logic below into your existing Application.cfc | ||
|
||
// you can provide a specific application name if you want: | ||
this.name = hash( getBaseTemplatePath() ); | ||
|
||
// any other application settings: | ||
this.sessionManagement = true; | ||
|
||
// set up per-application mappings as needed: | ||
this.mappings[ '/framework' ] = getDirectoryFromPath( getBaseTemplatePath() ) & 'framework'; | ||
// this.mappings[ '/app' ] expandPath( '../path/to/app' ); | ||
|
||
function _get_framework_one() { | ||
if ( !structKeyExists( request, '_framework_one' ) ) { | ||
|
||
// create your FW/1 application: | ||
request._framework_one = new framework.one( { | ||
trace = true, | ||
base = getDirectoryFromPath( CGI.SCRIPT_NAME ) | ||
.replaceFirst( getContextRoot(), '' ) & 'introduction' | ||
} ); | ||
|
||
// you can specify FW/1 configuration as an argument: | ||
// request._framework_one = new framework.one({ | ||
// base : '/app', | ||
// trace : true | ||
// }); | ||
|
||
// if you need to override extension points, use | ||
// MyApplication.cfc for those and then do: | ||
// request._framework_one = new MyApplication({ | ||
// base : '/app', | ||
// trace : true | ||
// }); | ||
|
||
} | ||
return request._framework_one; | ||
} | ||
|
||
// delegation of lifecycle methods to FW/1: | ||
function onApplicationStart() { | ||
return _get_framework_one().onApplicationStart(); | ||
} | ||
function onError( exception, event ) { | ||
return _get_framework_one().onError( exception, event ); | ||
} | ||
function onRequest( targetPath ) { | ||
return _get_framework_one().onRequest( targetPath ); | ||
} | ||
function onRequestEnd() { | ||
return _get_framework_one().onRequestEnd(); | ||
} | ||
function onRequestStart( targetPath ) { | ||
return _get_framework_one().onRequestStart( targetPath ); | ||
} | ||
function onSessionStart() { | ||
return _get_framework_one().onSessionStart(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,67 @@ | ||
component extends="framework.one" { | ||
// Either put the framework folder in your webroot or create a mapping for it! | ||
|
||
this.name = 'fw1-examples'; | ||
this.sessionManagement = true; | ||
// FW/1 - configuration: | ||
variables.framework = { | ||
usingSubsystems = true, | ||
SESOmitIndex = true, | ||
diLocations = "model, controllers, beans, services", // to account for the variety of D/I locations in our examples | ||
// that allows all our subsystems to automatically have their own bean factory with the base factory as parent | ||
trace = true | ||
}; | ||
|
||
component { | ||
// copy this to your application root to use as your Application.cfc | ||
// or incorporate the logic below into your existing Application.cfc | ||
|
||
// you can provide a specific application name if you want: | ||
this.name = 'fw1-examples'; | ||
|
||
// any other application settings: | ||
this.sessionManagement = true; | ||
|
||
// set up per-application mappings as needed: | ||
this.mappings[ '/framework' ] = expandPath( '../framework' ); | ||
// this.mappings[ '/app' ] expandPath( '../path/to/app' ); | ||
|
||
function _get_framework_one() { | ||
if ( !structKeyExists( request, '_framework_one' ) ) { | ||
|
||
// create your FW/1 application: | ||
request._framework_one = new framework.one( { | ||
SESOmitIndex = true, | ||
diComponent = "framework.ioclj", | ||
diLocations = [ | ||
// must provide path to project.clj in Clojure example: | ||
getDirectoryFromPath( CGI.SCRIPT_NAME ) & "/subsystems/6helloclojure", | ||
"model", "controllers", "beans", "services" // to account for the variety of D/I locations in our examples | ||
// that allows all our subsystems to automatically have their own bean factory with the base factory as parent | ||
], | ||
trace = true | ||
} ); | ||
|
||
// you can specify FW/1 configuration as an argument: | ||
// request._framework_one = new framework.one({ | ||
// base : '/app', | ||
// trace : true | ||
// }); | ||
|
||
// if you need to override extension points, use | ||
// MyApplication.cfc for those and then do: | ||
// request._framework_one = new MyApplication({ | ||
// base : '/app', | ||
// trace : true | ||
// }); | ||
|
||
} | ||
return request._framework_one; | ||
} | ||
|
||
// delegation of lifecycle methods to FW/1: | ||
function onApplicationStart() { | ||
return _get_framework_one().onApplicationStart(); | ||
} | ||
function onError( exception, event ) { | ||
return _get_framework_one().onError( exception, event ); | ||
} | ||
function onRequest( targetPath ) { | ||
return _get_framework_one().onRequest( targetPath ); | ||
} | ||
function onRequestEnd() { | ||
return _get_framework_one().onRequestEnd(); | ||
} | ||
function onRequestStart( targetPath ) { | ||
return _get_framework_one().onRequestStart( targetPath ); | ||
} | ||
function onSessionStart() { | ||
return _get_framework_one().onSessionStart(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
component extends=framework.one { | ||
variables.framework = { | ||
trace : true, | ||
controllersFolder : "handlers", | ||
layoutsFolder : "wrappers", | ||
subsystemsFolder : "plugins", | ||
viewsFolder : "pages" | ||
}; | ||
function setupView( rc ) { | ||
rc.message = "Rendered by FW/1 version " & variables.framework.version; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
component accessors=true { | ||
property framework; | ||
function default( rc ) { | ||
rc.handlerSays = "This message brought to you by " & | ||
framework.getConfig().controllersFolder & "/main.cfc!"; | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<cfoutput> | ||
<p>I am the main page!</p> | ||
<p>#rc.handlerSays#</p> | ||
<p>Go to <a href="#buildURL('suba:')#">suba:main.default</a></p> | ||
</cfoutput> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<cfoutput> | ||
<p>I am subsystem A!</p> | ||
<p>Go <a href="#buildURL( ':' )#">back home</a>!</p> | ||
</cfoutput> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h2>Subsystem A Default Wrapper</h2> | ||
<cfoutput>#body#</cfoutput> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<cfoutput> | ||
<h1>Default Wrapper</h1> | ||
<div> | ||
#body# | ||
</div> | ||
<p>#rc.message#</p> | ||
</cfoutput> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/target | ||
/classes | ||
/checkouts | ||
pom.xml | ||
pom.xml.asc | ||
*.jar | ||
*.class | ||
/.lein-* | ||
/.nrepl-port | ||
.hgignore | ||
.hg/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
component { | ||
// copy this to your application root to use as your Application.cfc | ||
// or incorporate the logic below into your existing Application.cfc | ||
|
||
// you can provide a specific application name if you want: | ||
this.name = hash( getBaseTemplatePath() ); | ||
|
||
// any other application settings: | ||
this.sessionManagement = true; | ||
|
||
// set up per-application mappings as needed: | ||
this.mappings[ '/framework' ] = expandPath( '../../../framework' ); | ||
// this.mappings[ '/app' ] expandPath( '../path/to/app' ); | ||
|
||
function _get_framework_one() { | ||
if ( !structKeyExists( request, '_framework_one' ) ) { | ||
|
||
// create your FW/1 application: | ||
request._framework_one = new MyApplication({ | ||
trace : true, | ||
diComponent : "framework.ioclj", | ||
diLocations : getDirectoryFromPath( CGI.SCRIPT_NAME ) | ||
}); | ||
|
||
// you can specify FW/1 configuration as an argument: | ||
// request._framework_one = new framework.one({ | ||
// base : '/app', | ||
// trace : true | ||
// }); | ||
|
||
// if you need to override extension points, use | ||
// MyApplication.cfc for those and then do: | ||
// request._framework_one = new MyApplication({ | ||
// base : '/app', | ||
// trace : true | ||
// }); | ||
|
||
} | ||
return request._framework_one; | ||
} | ||
|
||
// delegation of lifecycle methods to FW/1: | ||
function onApplicationStart() { | ||
return _get_framework_one().onApplicationStart(); | ||
} | ||
function onError( exception, event ) { | ||
return _get_framework_one().onError( exception, event ); | ||
} | ||
function onRequest( targetPath ) { | ||
return _get_framework_one().onRequest( targetPath ); | ||
} | ||
function onRequestEnd() { | ||
return _get_framework_one().onRequestEnd(); | ||
} | ||
function onRequestStart( targetPath ) { | ||
return _get_framework_one().onRequestStart( targetPath ); | ||
} | ||
function onSessionStart() { | ||
return _get_framework_one().onSessionStart(); | ||
} | ||
} |
Oops, something went wrong.