| 20 | | <!--- If the event-handler already exists, get a reference to it ---> |
| 21 | | <cfif modelglue.hasEventHandler(ehXml.xmlAttributes.name)> |
| 22 | | <cflog file="timer" text="The EH already existed. Woot."> |
| 23 | | <cfset ehInst = modelglue.getEventHandler(ehXml.xmlAttributes.name) /> |
| | 20 | <!--- If the event-handler already exists, get a reference to it ---> |
| | 21 | <cfif modelglue.hasEventHandler(ehXml.xmlAttributes.name)> |
| | 22 | <cflog file="timer" text="The EH already existed. Woot."> |
| | 23 | <cfset ehInst = modelglue.getEventHandler(ehXml.xmlAttributes.name) /> |
| 25 | | <!--- If it's not an "extensible" event-handler, create a new eh object---> |
| 26 | | <cfif not ehInst.extensible> |
| 27 | | <cfset ehInst = ehFactory.create("EventHandler") /> |
| 28 | | </cfif> |
| 29 | | <!--- Otherwise, try to instantiate the type. ---> |
| 30 | | <cfelse> |
| 31 | | <cflog file="timer" text="Going to try to make it: |
| | 25 | <!--- If it's not an "extensible" event-handler, create a new eh object---> |
| | 26 | <cfif not ehInst.extensible> |
| | 27 | <cfset ehInst = ehFactory.create("EventHandler") /> |
| | 28 | </cfif> |
| | 29 | <!--- Otherwise, try to instantiate the type. ---> |
| | 30 | <cfelse> |
| | 31 | <cflog file="timer" text="Going to try to make it: |
| 33 | | <cfset ehInst = ehFactory.create(ehXml.xmlAttributes.type) > |
| 34 | | </cfif> |
| 35 | | <!--- If the type is not found, force a base EventHandler to be created ---> |
| 36 | | <cfcatch> |
| 37 | | <cflog file="timer" text="I had to make a base EH"> |
| 38 | | <cfset ehInst = ehFactory.create("EventHandler") /> |
| 39 | | </cfcatch> |
| 40 | | </cftry> |
| 41 | | |
| | 33 | <cfset ehInst = ehFactory.create(ehXml.xmlAttributes.type) > |
| | 34 | </cfif> |
| | 35 | <!--- If the type is not found, force a base EventHandler to be created ---> |
| | 36 | <cfcatch> |
| | 37 | <cflog file="timer" text="I had to make a base EH"> |
| | 38 | <cfset ehInst = ehFactory.create("EventHandler") /> |
| | 39 | </cfcatch> |
| | 40 | </cftry> |
| | 41 | }}} |
| 54 | | <cfif structKeyExists(variables.eventTypes, ehXml.xmlAttributes.type) |
| 55 | | or find(",", ehXml.xmlAttributes.type) |
| 56 | | > |
| 57 | | <cfset isXmlTypeList = "true" /> |
| 58 | | </cfif> |
| | 54 | {{{ |
| | 55 | <cfif structKeyExists(variables.eventTypes, ehXml.xmlAttributes.type) |
| | 56 | or find(",", ehXml.xmlAttributes.type) |
| | 57 | > |
| | 58 | <cfset isXmlTypeList = "true" /> |
| | 59 | </cfif> |
| | 60 | }}} |
| 66 | | <!--- If the event-handler already exists, get a reference to it ---> |
| 67 | | <cfif modelglue.hasEventHandler(ehXml.xmlAttributes.name)> |
| 68 | | <cflog file="timer" text="The EH already existed. Woot."> |
| 69 | | <cfset ehInst = modelglue.getEventHandler(ehXml.xmlAttributes.name) /> |
| | 69 | <!--- If the event-handler already exists, get a reference to it ---> |
| | 70 | <cfif modelglue.hasEventHandler(ehXml.xmlAttributes.name)> |
| | 71 | <cflog file="timer" text="The EH already existed. Woot."> |
| | 72 | <cfset ehInst = modelglue.getEventHandler(ehXml.xmlAttributes.name) /> |
| 71 | | <!--- If it's not an "extensible" event-handler, create a new eh object---> |
| 72 | | <cfif not ehInst.extensible> |
| 73 | | <cfset ehInst = ehFactory.create("EventHandler") /> |
| 74 | | </cfif> |
| 75 | | <!--- Otherwise, try to instantiate the type. ---> |
| 76 | | <cfelseif not isXmlTypeList> |
| 77 | | <cflog file="timer" text="Going to try to make it: |
| | 74 | <!--- If it's not an "extensible" event-handler, create a new eh object---> |
| | 75 | <cfif not ehInst.extensible> |
| | 76 | <cfset ehInst = ehFactory.create("EventHandler") /> |
| | 77 | </cfif> |
| | 78 | <!--- Otherwise, try to instantiate the type. ---> |
| | 79 | <cfelseif not isXmlTypeList> |
| | 80 | <cflog file="timer" text="Going to try to make it: |
| 79 | | <cfset ehInst = ehFactory.create(ehXml.xmlAttributes.type) > |
| 80 | | <cfelse> |
| 81 | | <cfset ehInst = ehFactory.create("EventHandler") /> |
| 82 | | </cfif> |
| 83 | | <!--- If the type is not found, force a base EventHandler to be created ---> |
| 84 | | <cfcatch> |
| 85 | | <cflog file="timer" text="I had to make a base EH"> |
| 86 | | <cfset ehInst = ehFactory.create("EventHandler") /> |
| 87 | | </cfcatch> |
| 88 | | </cftry> |
| | 82 | <cfset ehInst = ehFactory.create(ehXml.xmlAttributes.type) > |
| | 83 | <cfelse> |
| | 84 | <cfset ehInst = ehFactory.create("EventHandler") /> |
| | 85 | </cfif> |
| | 86 | <!--- If the type is not found, force a base EventHandler to be created ---> |
| | 87 | <cfcatch> |
| | 88 | <cflog file="timer" text="I had to make a base EH"> |
| | 89 | <cfset ehInst = ehFactory.create("EventHandler") /> |
| | 90 | </cfcatch> |
| | 91 | </cftry> |
| | 92 | }}} |