Index: lams_common/src/java/org/lamsfoundation/lams/tool/OutputFactory.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/tool/OutputFactory.java,v diff -u -r1.4 -r1.5 --- lams_common/src/java/org/lamsfoundation/lams/tool/OutputFactory.java 7 Apr 2008 00:59:29 -0000 1.4 +++ lams_common/src/java/org/lamsfoundation/lams/tool/OutputFactory.java 8 Apr 2008 01:02:31 -0000 1.5 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/tool/OutputType.java,v diff -u -r1.1 -r1.2 --- lams_common/src/java/org/lamsfoundation/lams/tool/OutputType.java 15 Aug 2007 01:51:16 -0000 1.1 +++ lams_common/src/java/org/lamsfoundation/lams/tool/OutputType.java 8 Apr 2008 01:02:31 -0000 1.2 @@ -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 }