19 package org.turro.plugin.command;
21 import java.util.ArrayList;
22 import java.util.Collection;
23 import java.util.Date;
24 import java.util.HashMap;
26 import org.turro.command.Command;
27 import org.turro.command.Context;
28 import org.turro.elephant.context.Application;
29 import org.turro.plugin.calendar.ICalendarEvent;
30 import org.turro.plugin.contacts.IContact;
36 public abstract class CalendarPlugin
implements IPlugin, Command {
38 protected Map<String, Object>
params;
39 protected Collection<ICalendarEvent>
result;
53 this.params = (Map<String, Object>)
params;
61 return (Date)
params.get(
"from");
65 return (Date)
params.get(
"to");
85 result =
new ArrayList<>();
92 protected abstract void executePlugin(Context context)
throws Exception;
void setParams(Object params)
Object execute(Context context)
static Collection< ICalendarEvent > getCalendarFor(Application app, IContact contact, Date from, Date to)
abstract void executePlugin(Context context)
Collection< ICalendarEvent > result
Map< String, Object > params
boolean stopsPropagating()
void addToResult(Object data)