01: package org.sakaiproject.api.app.scheduler;
02:
03: import org.sakaiproject.time.api.Time;
04:
05: public interface ScheduledInvocationManager {
06:
07: /**
08: * Creates a new delayed invocation and returns the unique id of the created invocation
09: *
10: * @param time the date and time the method will be invoked
11: * @param componentId the unique name of a bean in the bean factory which implements
12: * command pattern DelayedInvocationCommand
13: * @param opaqueContext the key which the tool can use to uniquely identify some
14: * entity when invoked; i.e. the context
15: * @return unique id of a delayed invocation
16: */
17: public String createDelayedInvocation(Time time,
18: String componentId, String opaqueContext);
19:
20: /**
21: * Remove a future scheduled invocation by its unique id
22: *
23: * @param uuid unique id of a delayed invocation
24: */
25: public void deleteDelayedInvocation(String uuid);
26:
27: /**
28: * Remove future scheduled invocations by the component and/or context,
29: * can specify both items, just a component or just a context, or even leave both
30: * as empty strings to remove all future invocations
31: *
32: * @param componentId the unique name of a bean in the bean factory which implements
33: * command pattern DelayedInvocationCommand, may be empty string to match any component
34: * @param opaqueContext the key which the tool can use to uniquely identify some
35: * entity when invoked; i.e. the context, may be empty string to match any context
36: */
37: public void deleteDelayedInvocation(String componentId,
38: String opaqueContext);
39:
40: /**
41: * Find future scheduled invocations by the component and/or context,
42: * can specify both items, just a component or just a context, or even leave both
43: * as empty strings to find all future invocations
44: *
45: * @param componentId the unique name of a bean in the bean factory which implements
46: * command pattern DelayedInvocationCommand, may be empty string to match any component
47: * @param opaqueContext the key which the tool can use to uniquely identify some
48: * entity when invoked; i.e. the context, may be empty string to match any context
49: * @return an array of {@link DelayedInvocation} objects representing all scheduled
50: * invocations which match the inputs
51: */
52: public DelayedInvocation[] findDelayedInvocations(
53: String componentId, String opaqueContext);
54:
55: }
|