addItem( new ScriptField( FIELD_FREEBUSY, new Integer( freeBusy ), ScriptField.TYPE_INT, false, false ) );
addItem( new ScriptField( FIELD_ATTENDEES, attendeeObjects, ScriptField.TYPE_SCRIPTABLE, false, false ) );
if( repeatRule != null ) {
RecurrenceObject recurObject = new RecurrenceObject();
int count = PIMUtils.getRepeatRuleInt( repeatRule, RepeatRule.COUNT );
recurObject.getItem( RecurrenceObject.FIELD_COUNT ).setValue( new Integer( count ) );
int freq = PIMUtils.getRepeatRuleInt( repeatRule, RepeatRule.FREQUENCY );
recurObject.getItem( RecurrenceObject.FIELD_FREQUENCY ).setValue(
new Integer( RecurrenceObject.repeatRuleToFrequency( freq ) ) );
int interval = PIMUtils.getRepeatRuleInt( repeatRule, RepeatRule.INTERVAL );
recurObject.getItem( RecurrenceObject.FIELD_INTERVAL ).setValue( new Integer( interval ) );
long endTime = PIMUtils.getRepeatRuleDate( repeatRule, RepeatRule.END );
recurObject.getItem( RecurrenceObject.FIELD_END ).setValue( new Date( endTime ) );
int monthInYear = PIMUtils.getRepeatRuleInt( repeatRule, RepeatRule.MONTH_IN_YEAR );
recurObject.getItem( RecurrenceObject.FIELD_MONTHINYEAR ).setValue( new Integer( monthInYear ) );
int weekInMonth = PIMUtils.getRepeatRuleInt( repeatRule, RepeatRule.WEEK_IN_MONTH );
recurObject.getItem( RecurrenceObject.FIELD_WEEKINMONTH ).setValue( new Integer( weekInMonth ) );
int dayInWeek = PIMUtils.getRepeatRuleInt( repeatRule, RepeatRule.DAY_IN_WEEK );
recurObject.getItem( RecurrenceObject.FIELD_DAYINWEEK ).setValue( new Integer( dayInWeek ) );
int dayInMonth = PIMUtils.getRepeatRuleInt( repeatRule, RepeatRule.DAY_IN_MONTH );
recurObject.getItem( RecurrenceObject.FIELD_DAYINMONTH ).setValue( new Integer( dayInMonth ) );
int dayInYear = PIMUtils.getRepeatRuleInt( repeatRule, RepeatRule.DAY_IN_YEAR );
recurObject.getItem( RecurrenceObject.FIELD_DAYINYEAR ).setValue( new Integer( dayInYear ) );
addItem( new ScriptField( FIELD_RECURRENCE, recurObject, ScriptField.TYPE_SCRIPTABLE, false, false ) );
} else {
addItem( new ScriptField( FIELD_RECURRENCE, null, ScriptField.TYPE_SCRIPTABLE, false, false ) );
}