* @inheritDoc
*/
public Object getValueAt(Object node, int column) {
Object res = null;
ResourceNode rn = null;
AssignmentNode an = null;
if (node instanceof ResourceNode)
rn = (ResourceNode) node;
else if (node instanceof AssignmentNode)
an = (AssignmentNode) node;
boolean hasChild = rn != null;
switch (column) {
case 0: // name
if (hasChild) {
res = rn.getName();
} else {
res = an.getTask().getName();
}
break;
case 1: // def role
if (hasChild) {
res = rn.getDefaultRole();
} else {
res = "";
}
break;
case 2: // mail
if (hasChild) {
res = rn.getEMail();
} else {
res = "";
}
break;
case 3: // phone
if (hasChild) {
res = rn.getPhone();
} else {
res = "";
}
break;
case 4: // assign role
if (hasChild) {
res = "";
} else {
res = an.getRoleForAssigment();
}
break;
default: // custom column
if (hasChild) {
res = rn.getCustomField(this.getColumnName(column));