/** * {@inheritDoc} */ public final String getValue() { return Uris.decode(Strings.valueOf(getCalAddress())); }
/** * {@inheritDoc} */ public final String getValue() { return Uris.decode(Strings.valueOf(getCalAddress())); }
/** * {@inheritDoc} */ public final String getValue() { return Uris.decode(Strings.valueOf(getCalAddress())); }
@Override public void applyTo(Attendee element) { if (element == null) { return; } URI calAddress = element.getCalAddress(); if (calAddress == null) { return; } String scheme = calAddress.getScheme(); if (scheme != null && StringUtils.startsWithIgnoreCase(scheme, MAILTO)) { String part = calAddress.getSchemeSpecificPart(); if (part != null && part.length() >= MIN_LENGTH && StringUtils.startsWith(part, APOSTROPHE) && StringUtils.endsWith(part, APOSTROPHE)) { String newPart = part.substring(1, part.length() - 1); safelySetNewValue(element, newPart); } } }
@Override public void applyTo(Attendee element) { if (element == null) { return; } URI calAddress = element.getCalAddress(); if (calAddress == null) { return; } String scheme = calAddress.getScheme(); if (scheme != null && StringUtils.startsWithIgnoreCase(scheme, MAILTO)) { String part = calAddress.getSchemeSpecificPart(); if (part != null && part.length() >= MIN_LENGTH && StringUtils.startsWith(part, APOSTROPHE) && StringUtils.endsWith(part, APOSTROPHE)) { String newPart = part.substring(1, part.length() - 1); safelySetNewValue(element, newPart); } } }
/** * {@inheritDoc} */ public final String getValue() { return Uris.decode(Strings.valueOf(getCalAddress())); }
/** * {@inheritDoc} */ public final String getValue() { return Uris.decode(Strings.valueOf(getCalAddress())); }
@Override public void applyTo(Attendee element) { if (element == null) { return; } URI calAddress = element.getCalAddress(); if (calAddress == null) { return; } String scheme = calAddress.getScheme(); if (scheme != null && StringUtils.startsWithIgnoreCase(scheme, MAILTO)) { String part = calAddress.getSchemeSpecificPart(); if (part != null && part.length() >= MIN_LENGTH && StringUtils.startsWith(part, APOSTROPHE) && StringUtils.endsWith(part, APOSTROPHE)) { String newPart = part.substring(1, part.length() - 1); safelySetNewValue(element, newPart); } } }
/** * Test method for {@link net.fortuna.ical4j.model.property.Attendee#Attendee(java.lang.String)}. */ public void testAttendeeString() throws URISyntaxException { try { new Attendee("MAILTO:CET Meeting Room@university.edu"); fail("Should throw URISyntaxException"); } catch (URISyntaxException use) { LOG.info("Caught exception: " + use.getMessage()); } CompatibilityHints.setHintEnabled(CompatibilityHints.KEY_RELAXED_PARSING, true); Attendee attendee = new Attendee("MAILTO:CET Meeting Room@university.edu"); assertEquals(new URI("MAILTO:CET%20Meeting%20Room@university.edu"), attendee.getCalAddress()); }
public void testRelaxedParsing() throws IOException, ParserException { try { Calendars.load(getClass().getResource("/samples/invalid/groupwise.ics")); fail("Should throw URISyntaxException"); } catch (ParserException pe) { LOG.info("Caught exception: " + pe.getMessage()); } CompatibilityHints.setHintEnabled(CompatibilityHints.KEY_RELAXED_PARSING, true); Calendar calendar = Calendars.load(getClass().getResource("/samples/invalid/groupwise.ics")); Attendee attendee = (Attendee) calendar.getComponent(Component.VEVENT).getProperty(Property.ATTENDEE); assertNotNull(attendee.getCalAddress()); } }
String email = attendee.getCalAddress().getSchemeSpecificPart(); user = getResourceFactory().getUserService().getUserByEmail(email); } catch (Exception e) { ScheduleResponse resp = new ScheduleResponse(attendee.getCalAddress().toString()); resp.setStatus(RequestStatus.CLIENT_ERROR); ms.addResponse(resp); ScheduleResponse resp = new ScheduleResponse(attendee.getCalAddress().toString()); resp.setStatus("3.7;Invalid Calendar User"); ms.addResponse(resp); Calendar cal = ICalendarUtils.createBaseCalendar(vfb); cal.getProperties().add(Method.REPLY); ScheduleResponse resp = new ScheduleResponse(attendee.getCalAddress().toString()); resp.setCalendarData(cal.toString()); ms.addResponse(resp);
URI attendeeUri = attendee.getCalAddress(); final String email = (attendeeUri != null) ? attendeeUri.getSchemeSpecificPart() : null;
String email = attendee.getCalAddress().getSchemeSpecificPart(); user = getResourceFactory().getUserService().getUserByEmail(email); } catch (Exception e) { ScheduleResponse resp = new ScheduleResponse(attendee.getCalAddress().toString()); resp.setStatus(RequestStatus.CLIENT_ERROR); ms.addResponse(resp); ScheduleResponse resp = new ScheduleResponse(attendee.getCalAddress().toString()); resp.setStatus("3.7;Invalid Calendar User"); ms.addResponse(resp); Calendar cal = ICalendarUtils.createBaseCalendar(vfb); cal.getProperties().add(Method.REPLY); ScheduleResponse resp = new ScheduleResponse(attendee.getCalAddress().toString()); resp.setCalendarData(cal.toString()); ms.addResponse(resp);
for (Property property4 : (Iterable<Property>) component.getProperties(Property.ATTENDEE)) { Attendee attendee = (Attendee) property4; if (attendee.getCalAddress() != null) { URI v_attendee = createURI(attendee.getCalAddress().toString()); rdfHandler.handleStatement(createStatement(resource, p_attendee, v_attendee)); } else {