com.sebtools Build 10 Documentation: ProgramManager.cfc

ProgramManager.cfc

ProgramManager.cfc is a service component meant to build the primary component for a program. It effectively encompasses multiple Records components and helps unify some functionality from other com.sebtools components as well (such as NoticeMgr and Scheduler).

ProgramManager.cfc can be thought of as a multi-table Records.cfc (though it is more than that). Much like Records.cfc, ProgramManager.cfc is used by extension, requires Manager.cfc, and can consist only of an "xml" method defining the data storage for the application.

Example

The following is ContactOMatic.cfc. For our purposes, let's assume that we would instantiate this into Application.ContactOMatic.

<cfcomponent extends="com.sebtools.ProgramManager">

<cffunction name="xml" access="public" output="yes">
<tables>
	<table entity="Contact Type">
		<data>
			<row ContactTypeName="Friend" />
			<row ContactTypeName="Co-Worker" />
			<row ContactTypeName="Enemy" />
		</data>
	</table>
	<table entity="Contact">
		<field fentity="Contact" />
	</table>
</tables>
</cffunction>

</cfcomponent>

The above example would produce Application.ContactOMatic as well as automatically producing Application.ContactOMatic.Contacts and Application.ContactOMatic.ContactTypes - both of which would be fully functioning Records components.