All GizmoTools are specializations of the GizmoTool class, and must reside in the
GizmoTool
subdirectory for them to be identified as available for use on a
MyPage
. For example, the
GizmoTool
subdirectory currently contains two GizmoTools; WebMonitor and WeatherTool. The
doc
subdirectory of
GizmoTool
contains a sample GizmoTool called
SampleTool.pm,
which indicates the methods that need to be implemented by the GizmoTool subclass
.
Each GizmoTool must implement a
refresh_item
method, as described in
SampleTool.pm
. This method is invoked when the "backend" process, metadotd.pl, runs, and populates channel information for the GizmoTool at that time. The GizmoTool must implement a display method, and the channel info plus the GizmoTool parameter settings and display method determines how the channel is rendered on a MyPage.
The GizmoTool configuration parameters are stored in the database in the
gizmoitemparam
table. A corresponding
channelitem
entry stores the result of running the
refresh_item
method.