Methods Summary |
---|
public java.util.Collection | getAvailableItems()Returning a List because the JSF dataGrid can't handle a Set for some
reason
return new ArrayList(super.getAvailableItems());
|
public java.util.Map | getAvailableLevelsAsMap()Converting the list into a map
Map map = new LinkedHashMap();
for (Object val : super.getAvailableLevels()) {
map.put(val, val);
}
return map;
|
public java.util.Map | getAvailablePositionsAsMap()Changing the String array into a Map
Map<String, String> map = new LinkedHashMap<String, String>();
for (String val : super.getAvailablePositions()) {
map.put(val, val);
}
return map;
|
public java.util.Map | getAvailableSkills()Converting the Skill object list into a map
Map<String, String> map = new HashMap<String, String>();
for (Object val : skillDao.findAll()) {
Skill skill = (Skill) val;
map.put(skill.getDescription(), skill.getName());
}
return map;
|
public java.util.List | getSelectedSkillsAsList()Gets the selected Skill objects as a list
System.out.println("asked for skills");
List<String> list = new ArrayList<String>();
List skills = super.getSelectedSkills();
if (skills != null) {
for (Object val : skills) {
if (val instanceof Skill) {
list.add(((Skill) val).getDescription());
} else {
Skill skill = skillDao.getSkill((String) val);
list.add(skill.getDescription());
}
}
}
return list;
|
public void | setSkillDao(org.apache.struts2.showcase.dao.SkillDao skillDao)
this.skillDao = skillDao;
|