@Override public VJournal createComponent(PropertyList properties) { return new VJournal(properties); }
/** * @return the optional last-modified property for a journal entry */ public final LastModified getLastModified() { return getProperty(Property.LAST_MODIFIED); }
getProperties()); getProperties()); Property.STATUS, Property.SUMMARY, Property.UID, Property.URL).forEach(property -> PropertyValidator.getInstance().assertOneOrLess(property, getProperties())); final Status status = getProperty(Property.STATUS); if (status != null && !Status.VJOURNAL_DRAFT.getValue().equals(status.getValue()) && !Status.VJOURNAL_FINAL.getValue().equals(status.getValue()) validateProperties();
public void validate(final VJournal target) throws ValidationException { Arrays.asList(DESCRIPTION, DTSTAMP, DTSTART, ORGANIZER, SEQUENCE, UID).forEach(property -> PropertyValidator.getInstance().assertOne(property, target.getProperties())); Arrays.asList(CATEGORIES, CLASS, CREATED, LAST_MODIFIED, STATUS, SUMMARY, URL).forEach(property -> PropertyValidator.getInstance().assertOneOrLess(property, target.getProperties())); Arrays.asList(ATTENDEE, RECURRENCE_ID).forEach( property -> PropertyValidator.getInstance().assertNone(property, target.getProperties())); } }
/** * Sets calendar attributes. * @param note The note item. * @param journal The VJournal. */ private void setCalendarAttributes(NoteItem note, VJournal journal) { // UID if(journal.getUid()!=null) { note.setIcalUid(journal.getUid().getValue()); } // for now displayName is limited to 1024 chars if (journal.getSummary() != null) { note.setDisplayName(StringUtils.substring(journal.getSummary() .getValue(), 0, 1024)); } if (journal.getDescription() != null) { note.setBody(journal.getDescription().getValue()); } // look for DTSTAMP if (journal.getDateStamp() != null) { note.setClientModifiedDate(journal.getDateStamp().getDate()); } }
private void parseJournal(VJournal journal) throws RDFParseException, RDFHandlerException, UnsupportedEncodingException { log.debug("parsing journal: {}", journal.getUid()); Resource r_event; String uriBase = ""; if(journal.getUid() != null) { uriBase = journal.getUid().getValue(); } else { uriBase = UUID.randomUUID().toString(); } if(journal.getRecurrenceId() != null) { uriBase += "-" + DF_DIGITS.format(journal.getRecurrenceId().getDate()); } if(journal.getSequence() != null) { uriBase += "-"+journal.getSequence().getSequenceNo(); } r_event = resolveURI(uriBase); Resource t_vevent = createURI(NS_ICAL + "Vjournal"); URI p_type = createURI(NS_RDF + "type"); rdfHandler.handleStatement(createStatement(r_event,p_type,t_vevent)); parseCalendarComponent(journal,r_event); }
getProperties()); getProperties()); Property.STATUS, Property.SUMMARY, Property.UID, Property.URL).forEach(property -> PropertyValidator.getInstance().assertOneOrLess(property, getProperties())); final Status status = getProperty(Property.STATUS); if (status != null && !Status.VJOURNAL_DRAFT.getValue().equals(status.getValue()) && !Status.VJOURNAL_FINAL.getValue().equals(status.getValue()) validateProperties();
public void validate(final VJournal target) throws ValidationException { Arrays.asList(DESCRIPTION, DTSTAMP, DTSTART, ORGANIZER, SEQUENCE, UID).forEach(property -> PropertyValidator.getInstance().assertOne(property, target.getProperties())); Arrays.asList(CATEGORIES, CLASS, CREATED, LAST_MODIFIED, STATUS, SUMMARY, URL).forEach(property -> PropertyValidator.getInstance().assertOneOrLess(property, target.getProperties())); Arrays.asList(ATTENDEE, RECURRENCE_ID).forEach( property -> PropertyValidator.getInstance().assertNone(property, target.getProperties())); } }
/** * Sets calendar attributes. * @param note The note item. * @param journal The VJournal. */ private void setCalendarAttributes(NoteItem note, VJournal journal) { // UID if(journal.getUid()!=null) { note.setIcalUid(journal.getUid().getValue()); } // for now displayName is limited to 1024 chars if (journal.getSummary() != null) { note.setDisplayName(StringUtils.substring(journal.getSummary() .getValue(), 0, 1024)); } if (journal.getDescription() != null) { note.setBody(journal.getDescription().getValue()); } // look for DTSTAMP if (journal.getDateStamp() != null) { note.setClientModifiedDate(journal.getDateStamp().getDate()); } }
/** * @return the optional organizer property for a journal entry */ public final Organizer getOrganizer() { return getProperty(Property.ORGANIZER); }
getProperties()); getProperties()); getProperties()); PropertyValidator.getInstance().assertOneOrLess(Property.CREATED, getProperties()); PropertyValidator.getInstance().assertOneOrLess(Property.DESCRIPTION, getProperties()); PropertyValidator.getInstance().assertOneOrLess(Property.DTSTART, getProperties()); PropertyValidator.getInstance().assertOneOrLess(Property.DTSTAMP, getProperties()); PropertyValidator.getInstance().assertOneOrLess(Property.LAST_MODIFIED, getProperties()); PropertyValidator.getInstance().assertOneOrLess(Property.ORGANIZER, getProperties()); PropertyValidator.getInstance().assertOneOrLess(Property.RECURRENCE_ID, getProperties()); PropertyValidator.getInstance().assertOneOrLess(Property.SEQUENCE, getProperties()); PropertyValidator.getInstance().assertOneOrLess(Property.STATUS, getProperties()); PropertyValidator.getInstance().assertOneOrLess(Property.SUMMARY, getProperties()); PropertyValidator.getInstance().assertOneOrLess(Property.UID, getProperties()); PropertyValidator.getInstance().assertOneOrLess(Property.URL, getProperties());
public void validate(final VJournal target) throws ValidationException { Arrays.asList(DTSTAMP, ORGANIZER, SEQUENCE, UID).forEach( property -> PropertyValidator.getInstance().assertOne(property, target.getProperties())); Arrays.asList(CATEGORIES, CLASS, CREATED, DESCRIPTION, DTSTART, LAST_MODIFIED, RECURRENCE_ID, STATUS, SUMMARY, URL).forEach(property -> PropertyValidator.getInstance().assertOneOrLess(property, target.getProperties())); PropertyValidator.getInstance().assertNone(REQUEST_STATUS, target.getProperties()); } }
@Override public VJournal createComponent(PropertyList properties) { return new VJournal(properties); }
/** * @return the optional status property for a journal entry */ public final Status getStatus() { return getProperty(Property.STATUS); }
getProperties()); getProperties()); final Status status = (Status) getProperty(Property.STATUS); if (status != null && !Status.VJOURNAL_DRAFT.getValue().equals(status.getValue()) && !Status.VJOURNAL_FINAL.getValue().equals(status.getValue()) validateProperties();
public void validate(final VJournal target) throws ValidationException { Arrays.asList(DESCRIPTION, DTSTAMP, DTSTART, ORGANIZER, UID).forEach( property -> PropertyValidator.getInstance().assertOne(property, target.getProperties())); Arrays.asList(CATEGORIES, CLASS, CREATED, LAST_MODIFIED, RECURRENCE_ID, SEQUENCE, STATUS, SUMMARY, URL).forEach(property -> PropertyValidator.getInstance().assertOneOrLess(property, target.getProperties())); PropertyValidator.getInstance().assertNone(ATTENDEE, target.getProperties()); } }
@Override public VJournal createComponent() { return new VJournal(false); }
/** * Convenience method to pull the DTSTART out of the property list. * @return The DtStart object representation of the start Date */ public final DtStart getStartDate() { return getProperty(Property.DTSTART); }
getProperties()); getProperties()); final Status status = (Status) getProperty(Property.STATUS); if (status != null && !Status.VJOURNAL_DRAFT.getValue().equals(status.getValue()) && !Status.VJOURNAL_FINAL.getValue().equals(status.getValue()) validateProperties();
public void validate(final VJournal target) throws ValidationException { Arrays.asList(DESCRIPTION, DTSTAMP, DTSTART, ORGANIZER, UID).forEach( property -> PropertyValidator.getInstance().assertOne(property, target.getProperties())); Arrays.asList(CATEGORIES, CLASS, CREATED, LAST_MODIFIED, RECURRENCE_ID, SEQUENCE, STATUS, SUMMARY, URL).forEach(property -> PropertyValidator.getInstance().assertOneOrLess(property, target.getProperties())); PropertyValidator.getInstance().assertNone(ATTENDEE, target.getProperties()); } }