/** * {@inheritDoc} */ public void validate(VAlarm target) throws ValidationException { /* * ; the following is optional, ; but MUST NOT occur more than once attach / */ PropertyValidator.getInstance().assertOneOrLess(ATTACH, target.getProperties()); } }
/** * {@inheritDoc} */ public void validate(final VAlarm target) throws ValidationException { Arrays.asList(ACTION, TRIGGER).forEach(property -> PropertyValidator.getInstance().assertOne(property, target.getProperties())); Arrays.asList(DESCRIPTION, DURATION, REPEAT, SUMMARY).forEach(property -> PropertyValidator.getInstance().assertOneOrLess(property, target.getProperties())); } }
/** * {@inheritDoc} */ public void validate(final VAlarm target) throws ValidationException { Arrays.asList(ACTION, TRIGGER).forEach(property -> PropertyValidator.getInstance().assertOne(property, target.getProperties())); Arrays.asList(DESCRIPTION, DURATION, REPEAT, SUMMARY).forEach(property -> PropertyValidator.getInstance().assertOneOrLess(property, target.getProperties())); } }
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())); } }
public void validate(final VEvent target) throws ValidationException { Arrays.asList(ATTENDEE, DTSTAMP, ORGANIZER, UID).forEach(property -> PropertyValidator.getInstance().assertOne(property, target.getProperties())); Arrays.asList(RECURRENCE_ID, SEQUENCE, CATEGORIES, CLASS, CREATED, DESCRIPTION, DTEND, DTSTART, DURATION, GEO, LAST_MODIFIED, LOCATION, PRIORITY, RESOURCES, STATUS, SUMMARY, TRANSP, URL).forEach(property -> PropertyValidator.getInstance().assertOneOrLess(property, target.getProperties())); ComponentValidator.assertNone(VALARM, target.getAlarms()); } }
public void validate(final VEvent target) throws ValidationException { Arrays.asList(DTSTAMP, ORGANIZER, UID).forEach(property -> PropertyValidator.getInstance().assertOne(property, target.getProperties())); Arrays.asList(RECURRENCE_ID, SEQUENCE).forEach(property -> PropertyValidator.getInstance().assertOneOrLess(property, target.getProperties())); Arrays.asList(ATTACH, ATTENDEE, CATEGORIES, CLASS, CONTACT, CREATED, DESCRIPTION, DTEND, DTSTART, DURATION, EXDATE, EXRULE, GEO, LAST_MODIFIED, LOCATION, PRIORITY, RDATE, RELATED_TO, RESOURCES, RRULE, STATUS, SUMMARY, TRANSP, URL).forEach(property -> PropertyValidator.getInstance().assertNone(property, target.getProperties())); ComponentValidator.assertNone(Component.VALARM, target.getAlarms()); } }
public void validate(final VEvent target) throws ValidationException { Arrays.asList(DTSTAMP, DTSTART, ORGANIZER, SEQUENCE, SUMMARY, UID).forEach(property -> PropertyValidator.getInstance().assertOne(property, target.getProperties())); Arrays.asList(CATEGORIES, CLASS, CREATED, DESCRIPTION, DTEND, DURATION, GEO, LAST_MODIFIED, LOCATION, PRIORITY, RESOURCES, STATUS, TRANSP, URL).forEach(property -> PropertyValidator.getInstance().assertOneOrLess(property, target.getProperties())); Arrays.asList(RECURRENCE_ID, REQUEST_STATUS).forEach(property -> PropertyValidator.getInstance().assertNone(property, target.getProperties())); for (final VAlarm alarm : target.getAlarms()) { alarm.validate(Method.ADD); } } }
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()); } }
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()); } }
public void validate(final VFreeBusy target) throws ValidationException { // FREEBUSY is 1+ in RFC2446 but 0+ in Calsify Arrays.asList(ATTENDEE, DTSTAMP, DTEND, DTSTART, ORGANIZER, UID).forEach(property -> PropertyValidator.getInstance().assertOne(property, target.getProperties())); PropertyValidator.getInstance().assertOneOrLess(URL, target.getProperties()); Arrays.asList(DURATION, SEQUENCE).forEach(property -> PropertyValidator.getInstance().assertNone(property, target.getProperties())); } }
/** * {@inheritDoc} */ public void validate(VTimeZone target) throws ValidationException { for (final Observance observance : target.getObservances()) { Arrays.asList(DTSTART, TZOFFSETFROM, TZOFFSETTO).forEach( property -> PropertyValidator.getInstance().assertOne(property, observance.getProperties())); PropertyValidator.getInstance().assertOneOrLess(TZNAME, observance.getProperties()); } } }
public void validate(final VToDo target) throws ValidationException { Arrays.asList(UID, DTSTAMP, ORGANIZER, SEQUENCE).forEach( property -> PropertyValidator.getInstance().assertOne(property, target.getProperties())); Arrays.asList(CATEGORIES, CLASS, CREATED, DESCRIPTION, DTSTART, DUE, DURATION, GEO, LAST_MODIFIED, LOCATION, PERCENT_COMPLETE, RECURRENCE_ID, RESOURCES, PRIORITY, STATUS, URL).forEach(property -> PropertyValidator.getInstance().assertOneOrLess(property, target.getProperties())); PropertyValidator.getInstance().assertNone(REQUEST_STATUS, target.getProperties()); ComponentValidator.assertNone(VALARM, target.getAlarms()); } }
public void validate(final VToDo target) throws ValidationException { PropertyValidator.getInstance().assertOneOrMore(ATTENDEE, target.getProperties()); Arrays.asList(DTSTAMP, ORGANIZER, UID).forEach( property -> PropertyValidator.getInstance().assertOne(property, target.getProperties())); Arrays.asList(CATEGORIES, CLASS, CREATED, DESCRIPTION, DTSTART, DUE, DURATION, GEO, LAST_MODIFIED, LOCATION, PERCENT_COMPLETE, PRIORITY, RESOURCES, RECURRENCE_ID, SEQUENCE, STATUS, SUMMARY, URL).forEach(property -> PropertyValidator.getInstance().assertOneOrLess(property, target.getProperties())); ComponentValidator.assertNone(VALARM, target.getAlarms()); } }
public void validate(final VEvent target) throws ValidationException { Arrays.asList(ATTENDEE, DTSTAMP, ORGANIZER, UID).forEach(property -> PropertyValidator.getInstance().assertOne(property, target.getProperties())); PropertyValidator.getInstance().assertOneOrLess(RECURRENCE_ID, target.getProperties()); Arrays.asList(ATTACH, CATEGORIES, CLASS, CONTACT, CREATED, DESCRIPTION, DTEND, DTSTART, DURATION, EXDATE, EXRULE, GEO, LAST_MODIFIED, LOCATION, PRIORITY, RDATE, RELATED_TO, REQUEST_STATUS, RESOURCES, RRULE, SEQUENCE, STATUS, SUMMARY, TRANSP, URL).forEach(property -> PropertyValidator.getInstance().assertNone(property, target.getProperties())); ComponentValidator.assertNone(Component.VALARM, target.getAlarms()); } }
public void validate(final VToDo target) throws ValidationException { PropertyValidator.getInstance().assertOneOrMore(ATTENDEE, target.getProperties()); Arrays.asList(DTSTAMP, ORGANIZER, SEQUENCE, UID).forEach( property -> PropertyValidator.getInstance().assertOne(property, target.getProperties())); Arrays.asList(CATEGORIES, CLASS, CREATED, DESCRIPTION, DTSTART, DUE, DURATION, GEO, LAST_MODIFIED, LOCATION, LOCATION, PERCENT_COMPLETE, PRIORITY, RECURRENCE_ID, RESOURCES, STATUS, URL).forEach(property -> PropertyValidator.getInstance().assertOneOrLess(property, target.getProperties())); ComponentValidator.assertNone(VALARM, target.getAlarms()); } }
public final void validate(final VEvent target) throws ValidationException { Arrays.asList(DTSTAMP, DTSTART, ORGANIZER, SEQUENCE, UID).forEach(property -> PropertyValidator.getInstance().assertOne(property, target.getProperties())); Arrays.asList(CATEGORIES, CLASS, CREATED, DESCRIPTION, DTEND, DTSTART, DURATION, GEO, LAST_MODIFIED, LOCATION, PRIORITY, RECURRENCE_ID, RESOURCES, STATUS, SUMMARY, TRANSP, URL).forEach(property -> PropertyValidator.getInstance().assertOneOrLess(property, target.getProperties())); PropertyValidator.getInstance().assertNone(REQUEST_STATUS, target.getProperties()); ComponentValidator.assertNone(VALARM, target.getAlarms()); } }
public void validate(final VToDo target) throws ValidationException { PropertyValidator.getInstance().assertOneOrMore(ATTENDEE, target.getProperties()); Arrays.asList(DTSTAMP, ORGANIZER, SEQUENCE, UID).forEach( property -> PropertyValidator.getInstance().assertOne(property, target.getProperties())); Arrays.asList(CATEGORIES, CLASS, CREATED, DESCRIPTION, DTSTART, DUE, DURATION, GEO, LAST_MODIFIED, LOCATION, LOCATION, PERCENT_COMPLETE, PRIORITY, RECURRENCE_ID, RESOURCES, STATUS, URL).forEach(property -> PropertyValidator.getInstance().assertOneOrLess(property, target.getProperties())); ComponentValidator.assertNone(VALARM, target.getAlarms()); } }
public void validate(final VEvent target) throws ValidationException { Arrays.asList(ATTENDEE, DTSTAMP, ORGANIZER, UID).forEach(property -> PropertyValidator.getInstance().assertOne(property, target.getProperties())); PropertyValidator.getInstance().assertOneOrLess(RECURRENCE_ID, target.getProperties()); Arrays.asList(ATTACH, CATEGORIES, CLASS, CONTACT, CREATED, DESCRIPTION, DTEND, DTSTART, DURATION, EXDATE, EXRULE, GEO, LAST_MODIFIED, LOCATION, PRIORITY, RDATE, RELATED_TO, REQUEST_STATUS, RESOURCES, RRULE, SEQUENCE, STATUS, SUMMARY, TRANSP, URL).forEach(property -> PropertyValidator.getInstance().assertNone(property, target.getProperties())); ComponentValidator.assertNone(Component.VALARM, target.getAlarms()); } }
public void validate(final VFreeBusy target) throws ValidationException { PropertyValidator.getInstance().assertOneOrMore(FREEBUSY, target.getProperties()); Arrays.asList(DTSTAMP, DTSTART, DTEND, ORGANIZER, UID).forEach(property -> PropertyValidator.getInstance().assertOne(property, target.getProperties())); PropertyValidator.getInstance().assertOneOrLess(URL, target.getProperties()); Arrays.asList(ATTENDEE, DURATION, REQUEST_STATUS).forEach(property -> PropertyValidator.getInstance().assertNone(property, target.getProperties())); } }
public void validate(final VFreeBusy target) throws ValidationException { PropertyValidator.getInstance().assertOneOrMore(FREEBUSY, target.getProperties()); Arrays.asList(DTSTAMP, DTSTART, DTEND, ORGANIZER, UID).forEach(property -> PropertyValidator.getInstance().assertOne(property, target.getProperties())); PropertyValidator.getInstance().assertOneOrLess(URL, target.getProperties()); Arrays.asList(ATTENDEE, DURATION, REQUEST_STATUS).forEach(property -> PropertyValidator.getInstance().assertNone(property, target.getProperties())); } }