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