src.modules
Class LunchModule
java.lang.Object
src.server.ModuleClass
src.modules.LunchModule
- All Implemented Interfaces:
- EventReceiver, Module
- public class LunchModule
- extends ModuleClass
- implements EventReceiver
Queries this module handles:
Vad blir det till lunch [idag/imorgon/den {datum}] [på restaurang]?
Den här modulen stödjer även att man får
dagens meny varje morgon. Kl 05.00 varje dag skickar den ut
ett meddelande med menyn för dagen på alla restauranger till
registrerade användare.
Last updated $Date: 2005/08/09 21:00:20 $ by $Author: andreas $
Changelog:
$Log: LunchModule.html,v $
Revision 1.1.1.1 2005/08/09 21:00:20 andreas
Initial entry
Revision 1.11 2005/05/11 07:01:51 andreas
The Module interface no longer extends the EventReceiver interface.
All modules (or other classes) that wants events now have to implement the EventReceiver interface.
Revision 1.10 2005/05/09 12:00:59 linus
Added book module and some other stuff.
Revision 1.9 2005/05/04 12:15:11 andreas
Removed warnings.
Revision 1.8 2005/05/04 11:23:16 linus
Added easter egg module and updated modules to work
with new modul structure.
Revision 1.7 2005/05/02 13:25:32 linus
Added some small features.
Revision 1.6 2005/05/01 17:09:54 andreas
Adapted following the changes to Module.
Revision 1.5 2005/04/30 09:00:27 linus
*** empty log message ***
Revision 1.3 2005/04/28 06:55:56 andreas
Removed a couple of warnings.
Revision 1.2 2005/04/27 10:27:24 linus
Uppdatering av lunchmodul till att ?ven inkludera r?tter.
Revision 1.1 2005/04/27 09:50:34 linus
Added lunch module.
- Version:
- $Revision: 1.1.1.1 $
TODO
- Author:
- linus
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LunchModule
public LunchModule()
isValidCache
public boolean isValidCache(ModuleQuery query,
java.lang.String cachedUserId,
long cacheAge)
- Test for cache.
- Specified by:
isValidCache in interface Module
- Parameters:
query - The user query that resulted in the cached result. The
user's query parameters are identical to the cached query parameters.cachedUserId - The userId of the query that is cached.cacheAge - The number of seconds that has elapsed since the cached
version was cached.
- Returns:
- True if the cache should be concidered to still be valid. False
otherwise.
- See Also:
src.server.Module#isValidCache(src.server.ModuleQuery, long)
processQuery
public Package processQuery(ModuleQuery query)
- Process a query.
- Specified by:
processQuery in interface Module
- Parameters:
query - The user sent query.
- Returns:
- An ErrorPackage if an error occured while processing the query,
an OutputPackage with the result otherwise.
- See Also:
Module.processQuery(src.server.ModuleQuery)
triggerEvent
public void triggerEvent(java.lang.String eventId)
- Description copied from interface:
EventReceiver
- Triggers an event with a specific id. An process can send out events to specified
eventreceivers which can then act as they please. Normally this is used for time based
reminders.
- Specified by:
triggerEvent in interface EventReceiver
- Parameters:
eventId - The event's id as defined when the event was registered.