Methods Summary |
---|
public static int | getClassCode(java.lang.String s)Gets the value of the ToDo.CLASS field for the given
value of the vToDo CLASS property.
This method encapsulates the following mapping:
ToDo.CLASS_PUBLIC <- "PUBLIC"
ToDo.CLASS_PRIVATE <- "PRIVATE"
ToDo.CLASS_CONFIDENTIAL <- "CONFIDENTIAL"
switch (s.length()) {
case 6:
if (s.equals("PUBLIC")) {
return ToDo.CLASS_PUBLIC;
}
break;
case 7:
if (s.equals("PRIVATE")) {
return ToDo.CLASS_PRIVATE;
}
break;
case 12:
if (s.equals("CONFIDENTIAL")) {
return ToDo.CLASS_CONFIDENTIAL;
}
break;
}
return -1;
|
public static java.lang.String | getClassType(int fieldValue)Gets the value of the vToDo CLASS field for the given
value of the ToDo.CLASS field.
This method encapsulates the following mapping:
ToDo.CLASS_PUBLIC -> "PUBLIC"
ToDo.CLASS_PRIVATE -> "PRIVATE"
ToDo.CLASS_CONFIDENTIAL -> "CONFIDENTIAL"
switch (fieldValue) {
case ToDo.CLASS_CONFIDENTIAL: return "CONFIDENTIAL";
case ToDo.CLASS_PRIVATE: return "PRIVATE";
case ToDo.CLASS_PUBLIC: return "PUBLIC";
}
return null;
|
public static int | getFieldCode(java.lang.String fieldName)Converts a vToDo property name to a JSR75 field code.
if (fieldName.equals("DESCRIPTION"))
return ToDo.NOTE;
else if (fieldName.equals("LAST-MODIFIED"))
return ToDo.REVISION;
else if (fieldName.equals("SUMMARY"))
return ToDo.SUMMARY;
else if (fieldName.equals("UID"))
return ToDo.UID;
else if (fieldName.equals("PRIORITY"))
return ToDo.PRIORITY;
else if (fieldName.equals("DESCRIPTION"))
return ToDo.NOTE;
else if (fieldName.equals("COMPLETED"))
return ToDo.COMPLETION_DATE;
else if (fieldName.equals("STATUS"))
return ToDo.COMPLETED;
else if (fieldName.equals("DUE"))
return ToDo.DUE;
else if (fieldName.equals("CLASS"))
return ToDo.CLASS;
else return -1;
|
public static java.lang.String | getFieldLabel(int field)Converts a JSR75 field code to a vToDo property name.
switch (field) {
case ToDo.COMPLETED: return "STATUS";
case ToDo.COMPLETION_DATE: return "COMPLETED";
case ToDo.PRIORITY: return "PRIORITY";
case ToDo.DUE: return "DUE";
case ToDo.NOTE: return "DESCRIPTION";
case ToDo.REVISION: return "LAST-MODIFIED";
case ToDo.SUMMARY: return "SUMMARY";
case ToDo.UID: return "UID";
case ToDo.CLASS: return "CLASS";
default:
return null;
}
|