Package net.fortuna.ical4j.model

Examples of net.fortuna.ical4j.model.Property


        }
      }
    }
    calEvent.setKalendarEventLinks(kalendarEventLinks);
   
    Property comment = event.getProperty(ICAL_X_OLAT_COMMENT);
    if (comment != null)
      calEvent.setComment(comment.getValue());
   
    Property numParticipants = event.getProperty(ICAL_X_OLAT_NUMPARTICIPANTS);
    if (numParticipants != null)
      calEvent.setNumParticipants(Integer.parseInt(numParticipants.getValue()));
   
    Property participants = event.getProperty(ICAL_X_OLAT_PARTICIPANTS);
    if (participants != null) {
      StringTokenizer strTok = new StringTokenizer(participants.getValue(), "§", false);
      String[] parts = new String[strTok.countTokens()];
      for ( int i = 0; strTok.hasMoreTokens(); i++ ) {
        parts[i] = strTok.nextToken();
      }
      calEvent.setParticipants(parts);
    }
   
    Property sourceNodId = event.getProperty(ICAL_X_OLAT_SOURCENODEID);
    if (sourceNodId != null)
      calEvent.setSourceNodeId(sourceNodId.getValue());
   
    // recurrence
    if (event.getProperty(ICAL_RRULE) != null) {
      calEvent.setRecurrenceRule(event.getProperty(ICAL_RRULE).getValue());
    }
View Full Code Here


    protected static String fromXProperty(PropertyList propertyList, String propertyName) {
        if (propertyName == null) {
            return null;
        }
        Property property = propertyList.getProperty(propertyName);
        if (property != null) {
            return property.getValue();
        }
        return null;
    }
View Full Code Here

            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;
View Full Code Here

        replaceProperty(componentProps, toLastModified(workEffort.getTimestamp("lastModifiedDate")));
        replaceProperty(componentProps, toPriority(workEffort.getLong("priority")));
        replaceProperty(componentProps, toLocation(workEffort.getString("locationDesc")));
        replaceProperty(componentProps, toStatus(workEffort.getString("currentStatusId")));
        replaceProperty(componentProps, toSummary(workEffort.getString("workEffortName")));
        Property uid = componentProps.getProperty(Uid.UID);
        if (uid == null) {
            // Don't overwrite UIDs created by calendar clients
            replaceProperty(componentProps, toUid(workEffort.getString("workEffortId")));
        }
        replaceProperty(componentProps, toXProperty(workEffortIdXPropName, workEffort.getString("workEffortId")));
View Full Code Here

    protected static void replaceProperty(PropertyList propertyList, Property property) {
        if (property == null) {
            return;
        }
        Property existingProp = propertyList.getProperty(property.getName());
        if (existingProp != null) {
            propertyList.remove(existingProp);
        }
        propertyList.add(property);
    }
View Full Code Here

        ResponseProperties responseProps = null;
        for (Component component : components) {
            if (Component.VEVENT.equals(component.getName()) || Component.VTODO.equals(component.getName())) {
                workEffortId = fromXProperty(component.getProperties(), workEffortIdXPropName);
                if (workEffortId == null) {
                    Property uid = component.getProperty(Uid.UID);
                    if (uid != null) {
                        GenericValue workEffort = EntityUtil.getFirst(delegator.findByAnd("WorkEffort", UtilMisc.toMap("universalId", uid.getValue())));
                        if (workEffort != null) {
                            workEffortId = workEffort.getString("workEffortId");
                        }
                    }
                }
View Full Code Here

            return null;
        }
        Iterator<Component> i = UtilGenerics.cast(resultList.iterator());
        while (i.hasNext()) {
            result = i.next();
            Property xProperty = result.getProperty(workEffortIdXPropName);
            if (xProperty != null && workEffortId.equals(xProperty.getValue())) {
                newComponent = false;
                break;
            }
            Property uid = result.getProperty(Uid.UID);
            if (uid != null && uid.getValue().equals(workEffortUid)) {
                newComponent = false;
                break;
            }
        }
        if (isTask) {
View Full Code Here

            if (part.getFileName().equals("invite.ics")) {
              log.info("Found an iCal attachement. Filename: " + part.getFileName());
              CalendarBuilder builder = new CalendarBuilder();
              Calendar calendar = builder.build(part.getInputStream());
              Component event = calendar.getComponent(Component.VEVENT);
              Property startDate = event.getProperty(Property.DTSTART);
              Property endDate = event.getProperty(Property.DTEND);
              Property attendee = null;
              String login = null;
              for (Iterator j = event.getProperties(Property.ATTENDEE).iterator(); j.hasNext();) {
                Property att = (Property) j.next();
                if (!att.getValue().contains("@casamind.com")) {
                  attendee = att;
                  login = attendee.getValue().replace("mailto:", "");
                }
              }
              if (attendee != null) {
View Full Code Here

    protected static String fromXProperty(PropertyList propertyList, String propertyName) {
        if (propertyName == null) {
            return null;
        }
        Property property = propertyList.getProperty(propertyName);
        if (property != null) {
            return property.getValue();
        }
        return null;
    }
View Full Code Here

            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;
View Full Code Here

TOP

Related Classes of net.fortuna.ical4j.model.Property

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.