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.6.1 -r1.6.6.2 --- lams_common/src/java/org/lamsfoundation/lams/tool/dto/ToolOutputDefinitionDTO.java 21 Apr 2009 03:44:44 -0000 1.6.6.1 +++ lams_common/src/java/org/lamsfoundation/lams/tool/dto/ToolOutputDefinitionDTO.java 21 Apr 2009 04:49:51 -0000 1.6.6.2 @@ -32,140 +32,150 @@ /** * @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 Boolean showConditionNameOnly; - private Boolean isDefaultGradebookMark; - private ArrayList defaultConditions; + 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; - } + 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; + public ToolOutputDefinitionDTO(ToolOutputDefinition definition) { + super(); + this.name = definition.getName(); + this.description = definition.getDescription(); + this.type = (definition.getType() != null) ? definition.getType() + .toString() : null; - this.startValue = (definition.getStartValue() != null) ? definition.getStartValue().toString() : null; - this.endValue = (definition.getEndValue() != null) ? definition.getEndValue().toString() : null; + this.startValue = (definition.getStartValue() != null) ? definition + .getStartValue().toString() : null; + this.endValue = (definition.getEndValue() != null) ? definition + .getEndValue().toString() : null; - this.complexDefinition = (definition.getComplexDefinition() != null) ? definition.getComplexDefinition() - .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)); - } + 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)); + } + } + + this.isDefaultGradebookMark = definition.isDefaultGradebookMark() != null ? definition.isDefaultGradebookMark() : false; } - } - /** - * Returns the name. - * - * @return - */ - public String getName() { - return name; - } + /** + * Returns the name. + * + * @return + */ + public String getName() { + return name; + } - /** - * Returns the description. - * - * @return - */ - public String getDescription() { - return description; - } + /** + * Returns the description. + * + * @return + */ + public String getDescription() { + return description; + } - /** - * Returns the output type. - * - * @return - */ - public String getType() { - return type; - } + /** + * Returns the output type. + * + * @return + */ + public String getType() { + return type; + } - /** - * Returns the start value. - * - * @return - */ - public String getStartValue() { - return startValue; - } + /** + * Returns the start value. + * + * @return + */ + public String getStartValue() { + return startValue; + } - /** - * Returns the end value. - * - * @return - */ - public String getEndValue() { - return endValue; - } + /** + * Returns the end value. + * + * @return + */ + public String getEndValue() { + return endValue; + } - /** - * Returns the complex definition. - * - * @return - */ - public String getComplexDefinition() { - return complexDefinition; - } + /** + * Returns the complex definition. + * + * @return + */ + public String getComplexDefinition() { + return complexDefinition; + } - public ArrayList getDefaultConditions() { - return defaultConditions; - } + public ArrayList getDefaultConditions() { + return defaultConditions; + } - public void setDefaultConditions(ArrayList defaultConditions) { - this.defaultConditions = defaultConditions; - } + public void setDefaultConditions(ArrayList defaultConditions) { + this.defaultConditions = defaultConditions; + } - public Boolean getShowConditionNameOnly() { - return showConditionNameOnly; - } + public Boolean getShowConditionNameOnly() { + return showConditionNameOnly; + } - public void setShowConditionNameOnly(Boolean showConditionNameOnly) { - this.showConditionNameOnly = 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 String toString() { + return new ToStringBuilder(this).append("name", name).append( + "description", description).append("type", type).append( + "startValue", startValue).append("endValue", endValue).append( + "isDefaultGradebookMark", isDefaultGradebookMark).toString(); + } - public Boolean getIsDefaultGradebookMark() { - return isDefaultGradebookMark; - } + public Boolean getIsDefaultGradebookMark() { + return isDefaultGradebookMark; + } - public void isDefaultGradebookMark(Boolean isDefaultGradebookMark) { - this.isDefaultGradebookMark = isDefaultGradebookMark; - } + public void isDefaultGradebookMark(Boolean isDefaultGradebookMark) { + this.isDefaultGradebookMark = isDefaultGradebookMark; + } }