/** * Find and return the first DISPLAY VALARM in a comoponent * @param component VEVENT or VTODO * @return first DISPLAY VALARM, null if there is none */ public static VAlarm getDisplayAlarm(Component component) { ComponentList<VAlarm> alarms = null; if(component instanceof VEvent) { alarms = ((VEvent) component).getAlarms(); } else if(component instanceof VToDo) { alarms = ((VToDo) component).getAlarms(); } if(alarms==null || alarms.size()==0) { return null; } for(Iterator<VAlarm> it = alarms.iterator();it.hasNext();) { VAlarm alarm = it.next(); if(Action.DISPLAY.equals(alarm.getAction())) { return alarm; } } return null; } }
/** * Find and return the first DISPLAY VALARM in a comoponent * @param component VEVENT or VTODO * @return first DISPLAY VALARM, null if there is none */ public static VAlarm getDisplayAlarm(Component component) { ComponentList<VAlarm> alarms = null; if(component instanceof VEvent) { alarms = ((VEvent) component).getAlarms(); } else if(component instanceof VToDo) { alarms = ((VToDo) component).getAlarms(); } if(alarms==null || alarms.size()==0) { return null; } for(Iterator<VAlarm> it = alarms.iterator();it.hasNext();) { VAlarm alarm = it.next(); if(Action.DISPLAY.equals(alarm.getAction())) { return alarm; } } return null; } }
@Override public void applyTo(VAlarm element) { Action action = element.getAction(); if (action == null || !"DISPLAY".equals(action.getValue()) || element.getDescription() != null && element.getDescription().getValue() != null) { return; } Description description = new Description("display"); element.getProperties().add(description); }
@Override public void applyTo(VAlarm element) { Action action = element.getAction(); if (action == null || !"DISPLAY".equals(action.getValue()) || element.getDescription() != null && element.getDescription().getValue() != null) { return; } Description description = new Description("display"); element.getProperties().add(description); }
@Override public void applyTo(VAlarm element) { Action action = element.getAction(); if (action == null || !"DISPLAY".equals(action.getValue()) || element.getDescription() != null && element.getDescription().getValue() != null) { return; } Description description = new Description("display"); element.getProperties().add(description); }
final Validator actionValidator = actionValidators.get(getAction()); if (actionValidator != null) { actionValidator.validate(this);
final Validator actionValidator = actionValidators.get(getAction()); if (actionValidator != null) { actionValidator.validate(this);
final Validator actionValidator = (Validator) actionValidators.get(getAction()); if (actionValidator != null) { actionValidator.validate();
final Validator actionValidator = actionValidators.get(getAction()); if (actionValidator != null) { actionValidator.validate(this);
final Validator actionValidator = actionValidators.get(getAction()); if (actionValidator != null) { actionValidator.validate(this);