From cb7b69596c49c1e7bea6a8d075694819afe27426 Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Mon, 11 Jul 2016 11:58:10 -0700 Subject: [PATCH] Whitespace/indentation cleanup Default Emacs indentation, untabify. --- framework/one.cfc | 94 +++++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/framework/one.cfc b/framework/one.cfc index 856539ff..a5a862a9 100644 --- a/framework/one.cfc +++ b/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' ) ) { @@ -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 ); @@ -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; @@ -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: @@ -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#' ); @@ -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 ); @@ -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 { @@ -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'; } } @@ -1623,8 +1623,8 @@ component { writeOutput( '
' ); writeOutput( '
Framework Lifecycle Trace
' ); var table = '' & - '' & - ''; + '' & + ''; writeOutput( table ); var colors = [ '##ccd4dd', '##ccddcc' ]; var row = 0; @@ -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 ) ); @@ -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 ); } @@ -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; @@ -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; } @@ -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", @@ -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; } @@ -2913,7 +2913,7 @@ component { // the exception we actually want to throw! param name="request.missingView" default=""; 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." ); } }
timedeltatypeactionmessage
timedeltatypeactionmessage