128 lines
3.1 KiB
Java
128 lines
3.1 KiB
Java
/***************************************************************************************************
|
|
*
|
|
*
|
|
* This file is part of WebGoat, an Open Web Application Security Project utility. For details,
|
|
* please see http://www.owasp.org/
|
|
*
|
|
* Copyright (c) 2002 - 2007 Bruce Mayhew
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
|
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
|
|
* License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
|
|
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along with this program; if
|
|
* not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
* 02111-1307, USA.
|
|
*
|
|
* Getting Source ==============
|
|
*
|
|
* Source for this application is maintained at code.google.com, a repository for free software
|
|
* projects.
|
|
*
|
|
* For details, please see http://code.google.com/p/webgoat/
|
|
*/
|
|
package org.owasp.webgoat.lessons.model;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
/**
|
|
*
|
|
* @author rlawson
|
|
*/
|
|
public class LessonMenuItem {
|
|
|
|
private String name;
|
|
private LessonMenuItemType type;
|
|
private List<LessonMenuItem> children = new ArrayList<LessonMenuItem>();
|
|
private boolean complete;
|
|
private String link;
|
|
|
|
/**
|
|
* @return the name
|
|
*/
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
/**
|
|
* @param name the name to set
|
|
*/
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
/**
|
|
* @return the children
|
|
*/
|
|
public List<LessonMenuItem> getChildren() {
|
|
return children;
|
|
}
|
|
|
|
/**
|
|
* @param children the children to set
|
|
*/
|
|
public void setChildren(List<LessonMenuItem> children) {
|
|
this.children = children;
|
|
}
|
|
|
|
/**
|
|
* @return the type
|
|
*/
|
|
public LessonMenuItemType getType() {
|
|
return type;
|
|
}
|
|
|
|
/**
|
|
* @param type the type to set
|
|
*/
|
|
public void setType(LessonMenuItemType type) {
|
|
this.type = type;
|
|
}
|
|
|
|
public void addChild(LessonMenuItem child) {
|
|
children.add(child);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder bldr = new StringBuilder();
|
|
bldr.append("Name: ").append(name).append(" | ");
|
|
bldr.append("Type: ").append(type).append(" | ");
|
|
return bldr.toString();
|
|
}
|
|
|
|
/**
|
|
* @return the complete
|
|
*/
|
|
public boolean isComplete() {
|
|
return complete;
|
|
}
|
|
|
|
/**
|
|
* @param complete the complete to set
|
|
*/
|
|
public void setComplete(boolean complete) {
|
|
this.complete = complete;
|
|
}
|
|
|
|
/**
|
|
* @return the link
|
|
*/
|
|
public String getLink() {
|
|
return link;
|
|
}
|
|
|
|
/**
|
|
* @param link the link to set
|
|
*/
|
|
public void setLink(String link) {
|
|
this.link = link;
|
|
}
|
|
|
|
}
|