Skip to content

Commit

Permalink
first import
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Apr 22, 2014
0 parents commit 5c21df6
Show file tree
Hide file tree
Showing 89 changed files with 8,901 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .gitattributes
@@ -0,0 +1,22 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
7 changes: 7 additions & 0 deletions .gitignore
@@ -0,0 +1,7 @@
.settings
logs/*.log
settings.xml
.netbeans
test/results/*.properties
test/results/*.html
test/results/*.log
90 changes: 90 additions & 0 deletions Application.cfc
@@ -0,0 +1,90 @@
<!-----------------------------------------------------------------------
********************************************************************************
Copyright 2005-2007 ColdBox Framework by Luis Majano and Ortus Solutions, Corp
www.coldbox.org | www.luismajano.com | www.ortussolutions.com
********************************************************************************
Author : Luis Majano
Date : 10/16/2007
Description :
This is the Application.cfc for usage withing the ColdBox Framework.
Make sure that it extends the coldbox object:
coldbox.system.Coldbox
So if you have refactored your framework, make sure it extends coldbox.
----------------------------------------------------------------------->
<cfcomponent output="false">
<cfsetting enablecfoutputonly="yes">

<!--- APPLICATION CFC PROPERTIES --->
<cfset this.name = hash( getCurrentTemplatePath() )>
<cfset this.sessionManagement = true>
<cfset this.sessionTimeout = createTimeSpan(0,0,30,0)>
<cfset this.setClientCookies = true>

<!--- COLDBOX STATIC PROPERTY, DO NOT CHANGE UNLESS THIS IS NOT THE ROOT OF YOUR COLDBOX APP --->
<cfset COLDBOX_APP_ROOT_PATH = getDirectoryFromPath(getCurrentTemplatePath())>
<!--- The web server mapping to this application. Used for remote purposes or static purposes --->
<cfset COLDBOX_APP_MAPPING = "">
<!--- COLDBOX PROPERTIES --->
<cfset COLDBOX_CONFIG_FILE = "">
<!--- COLDBOX APPLICATION KEY OVERRIDE --->
<cfset COLDBOX_APP_KEY = "">

<!--- on Application Start --->
<cffunction name="onApplicationStart" returnType="boolean" output="false">
<cfscript>
//Load ColdBox Bootstrap
application.cbBootstrap = new coldbox.system.Coldbox( COLDBOX_CONFIG_FILE, COLDBOX_APP_ROOT_PATH, COLDBOX_APP_KEY, COLDBOX_APP_MAPPING );
application.cbBootstrap.loadColdbox();
return true;
</cfscript>
</cffunction>

<!--- on Request Start --->
<cffunction name="onRequestStart" returnType="boolean" output="true">
<!--- ************************************************************* --->
<cfargument name="targetPage" type="string" required="true" />
<!--- ************************************************************* --->
<!--- BootStrap Reinit Check --->
<cfif not structKeyExists( application, "cbBootstrap" ) or application.cbBootStrap.isfwReinit()>
<cflock name="coldbox.bootstrap_#hash( getCurrentTemplatePath() )#" type="exclusive" timeout="5" throwontimeout="true">
<cfset structDelete( application, "cbBootStrap" )>
<cfset onApplicationStart()>
</cflock>
</cfif>
<!--- On Request Start via ColdBox --->
<cfset application.cbBootstrap.onRequestStart( arguments.targetPage )>

<cfreturn true>
</cffunction>

<!--- on Application End --->
<cffunction name="onApplicationEnd" returnType="void" output="false">
<!--- ************************************************************* --->
<cfargument name="appScope" type="struct" required="true">
<!--- ************************************************************* --->
<cfset arguments.appScope.cbBootstrap.onApplicationEnd( argumentCollection=arguments )>
</cffunction>

<!--- on Session Start --->
<cffunction name="onSessionStart" returnType="void" output="false">
<cfset application.cbBootstrap.onSessionStart()>
</cffunction>

<!--- on Session End --->
<cffunction name="onSessionEnd" returnType="void" output="false">
<!--- ************************************************************* --->
<cfargument name="sessionScope" type="struct" required="true">
<cfargument name="appScope" type="struct" required="false">
<!--- ************************************************************* --->
<cfset appScope.cbBootstrap.onSessionEnd( argumentCollection=arguments )>
</cffunction>

<!--- OnMissing Template --->
<cffunction name="onMissingTemplate" access="public" returntype="boolean" output="true" hint="I execute when a non-existing CFM page was requested.">
<cfargument name="template" type="string" required="true" hint="I am the template that the user requested."/>
<cfreturn application.cbBootstrap.onMissingTemplate( argumentCollection=arguments )>
</cffunction>

</cfcomponent>
19 changes: 19 additions & 0 deletions apidocs/Application.cfc
@@ -0,0 +1,19 @@
component{

this.name = "colddoc_" & hash(getCurrentTemplatePath());
this.sessionManagement = true;
this.sessionTimeout = createTimeSpan(0,0,1,0);

// mappings
this.mappings[ "/colddoc" ] = getDirectoryFromPath( getCurrentTemplatePath() );

rootPath = REReplaceNoCase( this.mappings[ "/colddoc" ], "apidocs(\\|\/)$", "" );
this.mappings[ "/root" ] = rootPath;
this.mappings[ "/messagebox" ] = rootPath & "modules/messagebox/model";

// request start
public boolean function onRequestStart(String targetPage){
return true;
}

}

0 comments on commit 5c21df6

Please sign in to comment.