Skip to content

Commit

Permalink
Whitespace/indentation cleanup
Browse files Browse the repository at this point in the history
Default Emacs indentation, untabify.
  • Loading branch information
seancorfield committed Jul 11, 2016
1 parent a3347f7 commit cb7b695
Showing 1 changed file with 47 additions and 47 deletions.
94 changes: 47 additions & 47 deletions framework/one.cfc
@@ -1,20 +1,20 @@
component {
variables._fw1_version = "4.0.0-snapshot";
/*
Copyright (c) 2009-2016, Sean Corfield, Marcin Szczepanski, Ryan Cogswell
/*
Copyright (c) 2009-2016, Sean Corfield, Marcin Szczepanski, Ryan Cogswell
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

this.name = hash( getBaseTemplatePath() );
if ( !structKeyExists( request, '_fw1' ) ) {
Expand Down Expand Up @@ -252,7 +252,7 @@ component {

if ( structKeyExists( request._fw1, 'controllerExecutionStarted' ) ) {
throw( type='FW1.controllerExecutionStarted', message="Controller '#action#' may not be added at this point.",
detail='The controller execution phase has already started. Controllers may not be added by other controller methods.' );
detail='The controller execution phase has already started. Controllers may not be added by other controller methods.' );
}

tuple.controller = getController( section = section, subsystem = subsystem );
Expand Down Expand Up @@ -392,7 +392,7 @@ component {

if ( variables.framework.defaultSubsystem == '' ) {
throw( type='FW1.subsystemNotSpecified', message='No subsystem specified and no default configured.',
detail='When using subsystems, every request should specify a subsystem or variables.framework.defaultSubsystem should be configured.' );
detail='When using subsystems, every request should specify a subsystem or variables.framework.defaultSubsystem should be configured.' );
}

return variables.framework.defaultSubsystem;
Expand Down Expand Up @@ -715,9 +715,9 @@ component {
try {
if ( !structKeyExists( variables, 'framework' ) ||
!structKeyExists( variables.framework, 'version' ) ) {
// error occurred before framework was initialized
failure( exception, event, false, true );
return;
// error occurred before framework was initialized
failure( exception, event, false, true );
return;
}

// record details of the exception:
Expand Down Expand Up @@ -1329,7 +1329,7 @@ component {
* returns the UI generated by the named view
*/
public any function view( string path, struct args = { },
any missingView = { } ) {
any missingView = { } ) {
var viewPath = parseViewOrLayoutPath( path, 'view' );
if ( cachedFileExists( viewPath ) ) {
internalFrameworkTrace( 'view( #path# ) called - rendering #viewPath#' );
Expand Down Expand Up @@ -1389,7 +1389,7 @@ component {
internalFrameworkTrace( 'building layout queue', subsystem, section, item );
// look for item-specific layout:
testLayout = parseViewOrLayoutPath( subsystem & variables.framework.subsystemDelimiter &
section & '/' & item, 'layout' );
section & '/' & item, 'layout' );
if ( cachedFileExists( testLayout ) ) {
internalFrameworkTrace( 'found item-specific layout #testLayout#', subsystem, section, item );
arrayAppend( request._fw1.layouts, testLayout );
Expand Down Expand Up @@ -1450,7 +1450,7 @@ component {
internalFrameworkTrace( 'building view queue', subsystem, section, item );
// view and layout setup - used to be in setupRequestWrapper():
request._fw1.view = parseViewOrLayoutPath( subsystem & variables.framework.subsystemDelimiter &
section & '/' & item, 'view' );
section & '/' & item, 'view' );
if ( cachedFileExists( request._fw1.view ) ) {
internalFrameworkTrace( 'found view #request._fw1.view#', subsystem, section, item );
} else {
Expand Down Expand Up @@ -1582,7 +1582,7 @@ component {
for ( var i = 1; i <= n; ++i ) {
var property = md.properties[ i ];
if ( implicitSetters ||
structKeyExists( property, 'setter' ) && isBoolean( property.setter ) && property.setter ) {
structKeyExists( property, 'setter' ) && isBoolean( property.setter ) && property.setter ) {
setters[ property.name ] = 'implicit';
}
}
Expand Down Expand Up @@ -1623,8 +1623,8 @@ component {
writeOutput( '<hr /><div id="fw1_trace" style="background: ##ccdddd; color: black; border: 1px solid; border-color: black; padding: 5px; #font#">' );
writeOutput( '<div style="#font# font-weight: bold; font-size: large; float: left;">Framework Lifecycle Trace</div><div style="clear: both;"></div>' );
var table = '<table style="border: 1px solid; border-color: black; color: black; #font#" width="100%">' &
'<tr><th style="text-align:right;" width="5%">time</th><th style="text-align:right;" width="5%">delta</th>' &
'<th style="text-align:center;">type</th><th width="10%">action</th><th>message</th></tr>';
'<tr><th style="text-align:right;" width="5%">time</th><th style="text-align:right;" width="5%">delta</th>' &
'<th style="text-align:center;">type</th><th width="10%">action</th><th>message</th></tr>';
writeOutput( table );
var colors = [ '##ccd4dd', '##ccddcc' ];
var row = 0;
Expand Down Expand Up @@ -1942,7 +1942,7 @@ component {
case 'view':
folder = variables.viewFolder;
break;
// else leave it alone?
// else leave it alone?
}
var pathInfo = { };
var subsystem = getSubsystem( getSubsystemSectionAndItem( path ) );
Expand Down Expand Up @@ -2268,10 +2268,10 @@ component {
structAppend( request.context, session[ preserveKeySessionKey ], false );
if ( variables.framework.maxNumContextsPreserved == 1 ) {
/*
When multiple contexts are preserved, the oldest context is purged
within getNextPreserveKeyAndPurgeOld once the maximum is reached.
This allows for a browser refresh after the redirect to still receive
the same context.
When multiple contexts are preserved, the oldest context is purged
within getNextPreserveKeyAndPurgeOld once the maximum is reached.
This allows for a browser refresh after the redirect to still receive
the same context.
*/
structDelete( session, preserveKeySessionKey );
}
Expand Down Expand Up @@ -2389,9 +2389,9 @@ component {
// this will recreate the main bean factory on a reload:
internalFrameworkTrace( 'setupApplication() called' );
setupApplication();
application[variables.framework.applicationKey] = request._fw1.theApp;
application[variables.framework.applicationKey] = request._fw1.theApp;

}
}

private void function setupFrameworkDefaults() {
if ( structKeyExists( variables, "_fw1_defaults_initialized" ) ) return;
Expand Down Expand Up @@ -2585,19 +2585,19 @@ component {
if ( !structKeyExists( variables.framework, 'diComponent' ) ) {
var diComponent = 'framework.ioc';
switch ( variables.framework.diEngine ) {
case 'aop1':
diComponent = 'framework.aop';
break;
case 'wirebox':
diComponent = 'framework.WireBoxAdapter';
break;
case 'custom':
throw( type="FW1.IllegalConfiguration",
message="If you specify diEngine='custom' you must specify a component path for diComponent." );
break;
default:
// assume DI/1
break;
case 'aop1':
diComponent = 'framework.aop';
break;
case 'wirebox':
diComponent = 'framework.WireBoxAdapter';
break;
case 'custom':
throw( type="FW1.IllegalConfiguration",
message="If you specify diEngine='custom' you must specify a component path for diComponent." );
break;
default:
// assume DI/1
break;
}
variables.framework.diComponent = diComponent;
}
Expand Down Expand Up @@ -2793,8 +2793,8 @@ component {
try {
var paramPairs = listToArray( body, "&" );
for ( var pair in paramPairs ) {
var parts = listToArray( pair, "=", true ); // handle blank values
request.context[ parts[ 1 ] ] = urlDecode( parts[ 2 ] );
var parts = listToArray( pair, "=", true ); // handle blank values
request.context[ parts[ 1 ] ] = urlDecode( parts[ 2 ] );
}
} catch ( any e ) {
throw( type = "FW1.JSONPOST",
Expand Down Expand Up @@ -2902,7 +2902,7 @@ component {
// check for forward and backward slash in the action - using chr() to avoid confusing TextMate (Hi Nathan!)
if ( findOneOf( chr(47) & chr(92), action ) > 0 ) {
throw( type='FW1.actionContainsSlash', message="Found a slash in the action: '#action#'.",
detail='Actions are not allowed to embed sub-directory paths.');
detail='Actions are not allowed to embed sub-directory paths.');
}
return action;
}
Expand All @@ -2913,7 +2913,7 @@ component {
// the exception we actually want to throw!
param name="request.missingView" default="<unknown.view>";
throw( type='FW1.viewNotFound', message="Unable to find a view for '#request.action#' action.",
detail="'#request.missingView#' does not exist." );
detail="'#request.missingView#' does not exist." );
}

}

0 comments on commit cb7b695

Please sign in to comment.