Index: lams_common/src/java/org/lamsfoundation/lams/tool/OutputFactory.java =================================================================== diff -u -ra818550d0d742ccd872808a455481913b88d8901 -re23eafbb7e9d9b602f8b2ad972a662ba026f328a --- lams_common/src/java/org/lamsfoundation/lams/tool/OutputFactory.java (.../OutputFactory.java) (revision a818550d0d742ccd872808a455481913b88d8901) +++ lams_common/src/java/org/lamsfoundation/lams/tool/OutputFactory.java (.../OutputFactory.java) (revision e23eafbb7e9d9b602f8b2ad972a662ba026f328a) @@ -247,6 +247,19 @@ return definition; } + /** Build a tool definition designed for a set of boolean conditions. It will get the definition's description from the + * I18N file using the getDescription() method and set the type to OUTPUT_SET_BOOLEAN. The tool's factory should then + * set up a series of conditions, each of type OUTPUT_BOOLEAN. Sets showConditionNameOnly to true so that the user + * in authoring doesn't see the internal definitions, just the condition name. + */ + protected ToolOutputDefinition buildBooleanSetOutputDefinition(String definitionName) { + ToolOutputDefinition definition = buildDefinition(definitionName, OutputType.OUTPUT_SET_BOOLEAN, null, null, null, Boolean.TRUE); + List defaultConditions = new ArrayList(); + definition.setDefaultConditions(defaultConditions); + return definition; + } + + /** Build a tool definition designed for a single String value. * It will get the definition's description from the I18N file using the getDescription() method and * set the type to OUTPUT_STRING. */ Index: lams_common/src/java/org/lamsfoundation/lams/tool/OutputType.java =================================================================== diff -u -r09048f91f2dcbb6b63449f3c1fb9e1a09221a35e -re23eafbb7e9d9b602f8b2ad972a662ba026f328a --- lams_common/src/java/org/lamsfoundation/lams/tool/OutputType.java (.../OutputType.java) (revision 09048f91f2dcbb6b63449f3c1fb9e1a09221a35e) +++ lams_common/src/java/org/lamsfoundation/lams/tool/OutputType.java (.../OutputType.java) (revision e23eafbb7e9d9b602f8b2ad972a662ba026f328a) @@ -25,9 +25,11 @@ /** * Output Types define the type of object that will be returned as output. - * OUTPUT_NUMERIC includes both integers and floating point numbers. + * OUTPUT_NUMERIC includes both integers and floating point numbers. If we have an output definition for + * a set of OUTPUT_BOOLEAN conditions, then the definition will be OUTPUT_SET_BOOLEAN, but each condition + * will be OUTPUT_BOOLEAN. */ public enum OutputType { - OUTPUT_LONG, OUTPUT_DOUBLE, OUTPUT_BOOLEAN, OUTPUT_STRING, OUTPUT_COMPLEX + OUTPUT_LONG, OUTPUT_DOUBLE, OUTPUT_BOOLEAN, OUTPUT_STRING, OUTPUT_COMPLEX, OUTPUT_SET_BOOLEAN }