Package net.fortuna.ical4j.model.property

Examples of net.fortuna.ical4j.model.property.Description


        Date date = iCalObj.getDate();
        return new Timestamp(date.getTime());
    }

    protected static String fromDescription(PropertyList propertyList) {
        Description iCalObj = (Description) propertyList.getProperty(Description.DESCRIPTION);
        if (iCalObj == null) {
            return null;
        }
        return iCalObj.getValue();
    }
View Full Code Here


        }
        return null;
    }

    protected static void getAlarms(GenericValue workEffort, ComponentList alarms) throws GenericEntityException {
        Description description = null;
        if (workEffort.get("description") != null) {
            description = new Description(workEffort.getString("description"));
        } else {
            description = new Description(workEffort.getString("workEffortName"));
        }
        Summary summary = new Summary(UtilProperties.getMessage("WorkEffortUiLabels", "WorkEffortEventReminder", Locale.getDefault()));
        Delegator delegator = workEffort.getDelegator();
        String workEffortId = workEffort.getString("workEffortId");
        List<GenericValue> reminderList = delegator.findList("WorkEffortEventReminder", EntityCondition.makeCondition("workEffortId", EntityOperator.EQUALS, workEffort.get("workEffortId")), null, null, null, false);
        for (GenericValue reminder : reminderList) {
            String reminderId = workEffortId + "-" + reminder.getString("sequenceId");
            VAlarm alarm = null;
            PropertyList alarmProps = null;
            boolean newAlarm = true;
            Iterator<VAlarm> i = UtilGenerics.cast(alarms.iterator());
            while (i.hasNext()) {
                alarm = i.next();
                Property xProperty = alarm.getProperty(reminderXPropName);
                if (xProperty != null && reminderId.equals(xProperty.getValue())) {
                    newAlarm = false;
                    alarmProps = alarm.getProperties();
                    // TODO: Write update code. For now, just re-create
                    alarmProps.clear();
                    break;
                }
            }
            if (newAlarm) {
                alarm = createAlarm(reminder);
                alarms.add(alarm);
                alarmProps = alarm.getProperties();
                alarmProps.add(new XProperty(reminderXPropName, reminderId));
            }
            GenericValue contactMech = reminder.getRelatedOne("ContactMech");
            if (contactMech != null && "EMAIL_ADDRESS".equals(contactMech.get("contactMechTypeId"))) {
                try {
                    alarmProps.add(new Attendee(contactMech.getString("infoString")));
                    alarmProps.add(Action.EMAIL);
                    alarmProps.add(summary);
                    alarmProps.add(description);
                } catch (URISyntaxException e) {
                    alarmProps.add(Action.DISPLAY);
                    alarmProps.add(new Description("Error encountered while creating iCalendar: " + e));
                }
            } else {
                alarmProps.add(Action.DISPLAY);
                alarmProps.add(description);
            }
View Full Code Here

                TemporalExpression tempExpr = TemporalExpressionWorker.getTemporalExpression(delegator, workEffort.getString("tempExprId"));
                if (tempExpr != null) {
                    try {
                        ICalRecurConverter.convert(tempExpr, componentProps);
                    } catch (Exception e) {
                        replaceProperty(componentProps, new Description("Error while converting recurrence: " + e));
                    }
                }
            }
            getAlarms(workEffort, alarms);
        }
View Full Code Here

    protected static Description toDescription(String javaObj) {
        if (javaObj == null) {
            return null;
        }
        return new Description(javaObj);
    }
View Full Code Here

            } catch (IOException e1) {
                description = "";
            }
            java.util.Calendar c = DateUtil.toCalendar(nicolive.getOpenTime());
            c.setTimeZone(timezone);
            properties.add(new Description(description));
            properties.add(new DtStart(new DateTime(c.getTime()), true));
            properties.add(new DtEnd(new DateTime(c.getTime()), true));
            try {
                URI uri = new URI(nicolive.getLink().getValue());
                properties.add(new Url(uri));
View Full Code Here

    DateTime end = new DateTime(endDate);
    end.setTimeZone(timeZone);
   
    VEvent meeting = new VEvent(start, end, name);

    meeting.getProperties().add(new Description(description));
    meeting.getProperties().add(new Sequence(0));
    meeting.getProperties().add(new Location(""));
    meeting.getProperties().add(Transp.OPAQUE);

    // generate unique identifier (if not submitted)
View Full Code Here

    CompatibilityHints.setHintEnabled(
        CompatibilityHints.KEY_OUTLOOK_COMPATIBILITY, true);
    VEvent meeting = new VEvent();
    meeting.getProperties().add(new Summary(subject));
    meeting.getProperties().add(new Description(content));
    meeting.getProperties().add(new DtStart(new DateTime(start)));
    meeting.getProperties().add(new DtEnd(new DateTime(end)));
    if (location != null) {
      meeting.getProperties().add(new Location(location));
    }
View Full Code Here

            } catch (URISyntaxException e) {
            }
        }

        if (event.getNote() != null) {
            vEvent.getProperties().add(new Description(event.getNote()));
        }

        Uid uid = new Uid(digest(event.getTitle() + "-" + begin.toGMTString() + "-" + end.toGMTString()));
        vEvent.getProperties().add(uid);
View Full Code Here

          if (StringUtils.isNotBlank(teamEvent.getLocation()) == true) {
            vEvent.getProperties().add(new Location(teamEvent.getLocation()));
          }
          vEvent.getProperties().add(new Name(teamEvent.getCalendar().getTitle()));
          if (StringUtils.isNotBlank(teamEvent.getNote()) == true) {
            vEvent.getProperties().add(new Description(teamEvent.getNote()));
          }

          // add alarm if necessary
          if (exportReminders == true && teamEvent.getReminderDuration() != null && teamEvent.getReminderActionType() != null) {
            final VAlarm alarm = new VAlarm();
View Full Code Here

        } else {
          summary = TimesheetEventsProvider.getTitle(timesheet);
        }
        final VEvent vEvent = ICal4JUtils.createVEvent(timesheet.getStartTime(), timesheet.getStopTime(), uid, summary);
        if (StringUtils.isNotBlank(timesheet.getDescription()) == true) {
          vEvent.getProperties().add(new Description(timesheet.getDescription()));
        }
        if (StringUtils.isNotBlank(timesheet.getLocation()) == true) {
          vEvent.getProperties().add(new Location(timesheet.getLocation()));
        }
        events.add(vEvent);
View Full Code Here

TOP

Related Classes of net.fortuna.ical4j.model.property.Description

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.