Index: lams_common/src/java/org/lamsfoundation/lams/tool/dto/ToolOutputDefinitionDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/tool/dto/ToolOutputDefinitionDTO.java,v diff -u -r1.6 -r1.6.6.1 --- lams_common/src/java/org/lamsfoundation/lams/tool/dto/ToolOutputDefinitionDTO.java 26 Mar 2008 06:23:37 -0000 1.6 +++ lams_common/src/java/org/lamsfoundation/lams/tool/dto/ToolOutputDefinitionDTO.java 21 Apr 2009 03:44:44 -0000 1.6.6.1 @@ -32,127 +32,140 @@ /** * @author Mitchell Seaton * - * This class acts as a data transfer object for - * transferring information between FLASH and the core module. + * This class acts as a data transfer object for transferring information + * between FLASH and the core module. * - * This class is required in the authoring environment to pass - * information about the ToolOutput for a ToolActivity + * This class is required in the authoring environment to pass information about + * the ToolOutput for a ToolActivity */ public class ToolOutputDefinitionDTO { - - private String name; - private String description; - private String type; - private String startValue; - private String endValue; - private String complexDefinition; + + private String name; + private String description; + private String type; + private String startValue; + private String endValue; + private String complexDefinition; private Boolean showConditionNameOnly; + private Boolean isDefaultGradebookMark; private ArrayList defaultConditions; - public ToolOutputDefinitionDTO(String name, String description, String type, String startValue, String endValue, String complexDefinition, Boolean showConditionNameOnly) { - super(); - this.name = name; - this.description = description; - this.type = type; + public ToolOutputDefinitionDTO(String name, String description, String type, String startValue, String endValue, + String complexDefinition, Boolean showConditionNameOnly) { + super(); + this.name = name; + this.description = description; + this.type = type; - this.startValue = startValue; - this.endValue = endValue; + this.startValue = startValue; + this.endValue = endValue; - this.complexDefinition = complexDefinition; + this.complexDefinition = complexDefinition; - this.showConditionNameOnly = showConditionNameOnly; - } - - public ToolOutputDefinitionDTO(ToolOutputDefinition definition) { - super(); - this.name = definition.getName(); - this.description = definition.getDescription(); - this.type = (definition.getType() != null)? definition.getType().toString() : null; + this.showConditionNameOnly = showConditionNameOnly; + } - this.startValue = (definition.getStartValue() != null) ? definition.getStartValue().toString() : null; - this.endValue = (definition.getEndValue() != null) ? definition.getEndValue().toString() : null; + public ToolOutputDefinitionDTO(ToolOutputDefinition definition) { + super(); + this.name = definition.getName(); + this.description = definition.getDescription(); + this.type = (definition.getType() != null) ? definition.getType().toString() : null; - this.complexDefinition = (definition.getComplexDefinition() != null) ? definition.getComplexDefinition().toString() : null; - - this.showConditionNameOnly = definition.isShowConditionNameOnly(); - if ( definition.getDefaultConditions() != null && definition.getDefaultConditions().size() > 0 ) { - defaultConditions = new ArrayList(); - for ( BranchCondition condition : definition.getDefaultConditions() ) { - defaultConditions.add(condition.getBranchConditionDTO(null)); - } - } - } - - /** - * Returns the name. - * @return - */ - public String getName() { - return name; - } - - /** - * Returns the description. - * @return - */ - public String getDescription() { - return description; - } - - /** - * Returns the output type. - * @return - */ - public String getType() { - return type; - } - - /** - * Returns the start value. - * @return - */ - public String getStartValue() { - return startValue; - } - - /** - * Returns the end value. - * @return - */ - public String getEndValue() { - return endValue; - } - - /** - * Returns the complex definition. - * @return - */ - public String getComplexDefinition() { - return complexDefinition; - } + this.startValue = (definition.getStartValue() != null) ? definition.getStartValue().toString() : null; + this.endValue = (definition.getEndValue() != null) ? definition.getEndValue().toString() : null; - public ArrayList getDefaultConditions() { - return defaultConditions; - } + this.complexDefinition = (definition.getComplexDefinition() != null) ? definition.getComplexDefinition() + .toString() : null; - public void setDefaultConditions(ArrayList defaultConditions) { - this.defaultConditions = defaultConditions; + this.showConditionNameOnly = definition.isShowConditionNameOnly(); + if (definition.getDefaultConditions() != null && definition.getDefaultConditions().size() > 0) { + defaultConditions = new ArrayList(); + for (BranchCondition condition : definition.getDefaultConditions()) { + defaultConditions.add(condition.getBranchConditionDTO(null)); + } } + } - public Boolean getShowConditionNameOnly() { - return showConditionNameOnly; - } - public void setShowConditionNameOnly(Boolean showConditionNameOnly) { - this.showConditionNameOnly = showConditionNameOnly; - } + /** + * Returns the name. + * + * @return + */ + public String getName() { + return name; + } - public String toString() { - return new ToStringBuilder(this) - .append("name", name) - .append("description", description) - .append("type", type) - .append("startValue", startValue) - .append("endValue", endValue) - .toString(); - } + /** + * Returns the description. + * + * @return + */ + public String getDescription() { + return description; + } + + /** + * Returns the output type. + * + * @return + */ + public String getType() { + return type; + } + + /** + * Returns the start value. + * + * @return + */ + public String getStartValue() { + return startValue; + } + + /** + * Returns the end value. + * + * @return + */ + public String getEndValue() { + return endValue; + } + + /** + * Returns the complex definition. + * + * @return + */ + public String getComplexDefinition() { + return complexDefinition; + } + + public ArrayList getDefaultConditions() { + return defaultConditions; + } + + public void setDefaultConditions(ArrayList defaultConditions) { + this.defaultConditions = defaultConditions; + } + + public Boolean getShowConditionNameOnly() { + return showConditionNameOnly; + } + + public void setShowConditionNameOnly(Boolean showConditionNameOnly) { + this.showConditionNameOnly = showConditionNameOnly; + } + + public String toString() { + return new ToStringBuilder(this).append("name", name).append("description", description).append("type", type) + .append("startValue", startValue).append("endValue", endValue).toString(); + } + + public Boolean getIsDefaultGradebookMark() { + return isDefaultGradebookMark; + } + + public void isDefaultGradebookMark(Boolean isDefaultGradebookMark) { + this.isDefaultGradebookMark = isDefaultGradebookMark; + } }