protected VAlarm getDisplayAlarm(VEvent event) { ComponentList<VAlarm> alarmsList = event.getAlarms(); for(VAlarm alarm: alarmsList) { if (alarm.getProperties().getProperty(Property.ACTION).equals( Action.DISPLAY)) { return alarm; } } return null; }
protected VAlarm getDisplayAlarm(VEvent event) { ComponentList<VAlarm> alarmsList = event.getAlarms(); for(VAlarm alarm: alarmsList) { if (alarm.getProperties().getProperty(Property.ACTION).equals( Action.DISPLAY)) { return alarm; } } return null; }
/** * Gets display alarm. * @param event The event. * @return The alarm. */ private VAlarm getDisplayAlarm(VEvent event) { for(VAlarm alarm : event.getAlarms()) { if (alarm.getProperties().getProperty(Property.ACTION).equals(Action.DISPLAY)) { return alarm; } } return null; }
/** * Gets display alarm. * @param event The event. * @return The alarm. */ private VAlarm getDisplayAlarm(VEvent event) { for(VAlarm alarm : event.getAlarms()) { if (alarm.getProperties().getProperty(Property.ACTION).equals(Action.DISPLAY)) { return alarm; } } return null; }
/** * {@inheritDoc} */ public final boolean match(final Component component) { boolean match = false; final PropertyList properties = component.getProperties(property.getName()); for (final Iterator i = properties.iterator(); i.hasNext();) { final Property p = (Property) i.next(); if (matchEquals && property.equals(p)) { match = true; } else if (property.getValue().equals(p.getValue())) { match = true; } } return match; } }
/** * {@inheritDoc} */ public final boolean match(final Component component) { boolean match = false; final PropertyList properties = component.getProperties(property.getName()); for (final Property p : properties) { if (matchEquals && property.equals(p)) { match = true; } else if (property.getValue().equals(p.getValue())) { match = true; } } return match; } }
/** * {@inheritDoc} */ public final boolean test(final Component component) { boolean match = false; final PropertyList<Property> properties = component.getProperties(property.getName()); for (final Property p : properties) { if (matchEquals && property.equals(p)) { match = true; } else if (property.getValue().equals(p.getValue())) { match = true; } } return match; } }
/** * {@inheritDoc} */ public final boolean test(final Component component) { boolean match = false; final PropertyList<Property> properties = component.getProperties(property.getName()); for (final Property p : properties) { if (matchEquals && property.equals(p)) { match = true; } else if (property.getValue().equals(p.getValue())) { match = true; } } return match; } }
/** * {@inheritDoc} */ public final boolean match(final Component component) { boolean match = false; final PropertyList<Property> properties = component.getProperties(property.getName()); for (final Property p : properties) { if (matchEquals && property.equals(p)) { match = true; } else if (property.getValue().equals(p.getValue())) { match = true; } } return match; } }
/** * Test equality of properties. */ public void testEquals() { assertTrue(property.equals(property)); @SuppressWarnings("serial") Property notEqual = new Property("notEqual", null) { public String getValue() { return ""; } public void setValue(String value) throws IOException, URISyntaxException, ParseException { } public void validate() throws ValidationException { } }; assertFalse("Properties are equal", property.equals(notEqual)); assertFalse("Properties are equal", notEqual.equals(property)); }
public void removeDisplayAlarm() { VEvent event = getEvent(); if(event==null) { return; } ComponentList<VAlarm> alarmsList = event.getAlarms(); for(VAlarm alarm: alarmsList) { if (alarm.getProperties().getProperty(Property.ACTION).equals( Action.DISPLAY)) { alarmsList.remove(alarm); } } }
public void removeDisplayAlarm() { VEvent event = getEvent(); if(event==null) { return; } ComponentList<VAlarm> alarmsList = event.getAlarms(); for(VAlarm alarm: alarmsList) { if (alarm.getProperties().getProperty(Property.ACTION).equals( Action.DISPLAY)) { alarmsList.remove(alarm); } } }
@Override public Calendar transform(Calendar object) { MethodUpdate methodUpdate = new MethodUpdate(method); methodUpdate.transform(object); Property uid = null; for (CalendarComponent component : object.getComponents()) { uidUpdate.transform(component); if (uid == null) { uid = component.getProperty(Property.UID); } else if (sameUid && !uid.equals(component.getProperty(Property.UID))) { throw new IllegalArgumentException("All components must share the same non-null UID"); } // if a calendar component has already been published previously // update the sequence number.. if (incrementSequence) { sequenceIncrement.transform(component); } } return object; } }
@Override public Calendar transform(Calendar object) { MethodUpdate methodUpdate = new MethodUpdate(method); methodUpdate.transform(object); Property uid = null; for (CalendarComponent component : object.getComponents()) { uidUpdate.transform(component); if (uid == null) { uid = component.getProperty(Property.UID); } else if (sameUid && !uid.equals(component.getProperty(Property.UID))) { throw new IllegalArgumentException("All components must share the same non-null UID"); } // if a calendar component has already been published previously // update the sequence number.. if (incrementSequence) { sequenceIncrement.transform(component); } } return object; } }