Methods Summary |
---|
public java.lang.String | execute()
if (getCurrentEmployee() != null && getCurrentEmployee().getOtherSkills() != null) {
setSelectedSkills(new ArrayList());
Iterator it = getCurrentEmployee().getOtherSkills().iterator();
while (it.hasNext()) {
getSelectedSkills().add(((Skill) it.next()).getName());
}
}
return super.execute();
|
public java.util.List | getAvailableLevels()
return Arrays.asList(TestDataProvider.LEVELS);
|
public java.lang.String[] | getAvailablePositions()
return TestDataProvider.POSITIONS;
|
public org.apache.struts2.showcase.model.Employee | getCurrentEmployee()
return currentEmployee;
|
protected org.apache.struts2.showcase.dao.Dao | getDao()
return employeeDao;
|
public java.lang.Long | getEmpId()
return empId;
|
public java.util.List | getSelectedSkills()
return selectedSkills;
|
public void | prepare()This method is called to allow the action to prepare itself.
Employee preFetched = (Employee) fetch(getEmpId(), getCurrentEmployee());
if (preFetched != null) {
setCurrentEmployee(preFetched);
}
|
public java.lang.String | save()
if (getCurrentEmployee() != null) {
setEmpId((Long) employeeDao.merge(getCurrentEmployee()));
employeeDao.setSkills(getEmpId(), getSelectedSkills());
}
return SUCCESS;
|
public void | setCurrentEmployee(org.apache.struts2.showcase.model.Employee currentEmployee)
this.currentEmployee = currentEmployee;
|
public void | setEmpId(java.lang.Long empId)
this.empId = empId;
|
public void | setEmployeeDao(org.apache.struts2.showcase.dao.EmployeeDao employeeDao)
if (log.isDebugEnabled()) {
log.debug("JsfEmployeeAction - [setEmployeeDao]: employeeDao injected.");
}
this.employeeDao = employeeDao;
|
public void | setSelectedSkills(java.util.List selectedSkills)
this.selectedSkills = selectedSkills;
|