24.3. Command (*.command.def.xml)

A file named <moduleName>.<commandName>.command.def.xml defines one or more Hackystat commands; in other words, the individual analyses or preferences that appear once you log in to your Hackystat server. This extension point requires a file pattern of "*.command.def.xml" in order to be recognized by the build system.

Example 24.2, “hackyCore_Common.listsensordata.command.def.xml” illustrates an example command definition file for the List Sensor Data command.

Example 24.2. hackyCore_Common.listsensordata.command.def.xml

<commands>
  <command type="analysis"
           page="extras"
           label="List Sensor Data"
           enabled="true"
           commandrequest="org.hackystat.core.common.analysis.listsensordata.ListSensorData"
           docstring="Lists your sensor data of the given type for the given day"
           group="Validation"
           contact="Philip Johnson (johnson@hawaii.edu)">
    <parameter name="Type"
               file="SensorDataTypeSelector.jsp"
               requesthook="org.hackystat.core.common.selector.sdt.SensorDataTypeSelector"/>
    <parameter name="Day"
               file="StartDaySelector.jsp"
               requesthook="org.hackystat.core.common.selector.day.StartDaySelector"/>
    <resultpage file="ListSensorData.jsp"/>
  </command>
</commands>

The definition file specifies the name of the command, a label to be used on the page where it appears, which page it appears on, a title for the section of the page it should appear on, and the parameters to be associated with this command.