src.modules
Class ScheduleModule
java.lang.Object
src.server.ModuleClass
src.modules.ScheduleModule
- All Implemented Interfaces:
- Module
- public class ScheduleModule
- extends ModuleClass
This module provides functionality connected to the schedule. One can
query the module about when/where a class is. What the next class is etc.
A few example queries:
- Vad är min nästa lektion?
- Vilken lektion har jag nu?
- Vilka lektioner har jag idag/imorgon/den dd/mm?
The module also keeps track of settings in order for people to be able to
for instance set what schedudle they want to query (D1/D2... etc) or give
course codes. A few examples:
- schema inställningar kurser 2D1025 2D1026 paket D1D
- Jag vill ställa in schema inställningarna till paket D2D
- Schema ska ha inställningarna kurser 2D1025 2D1026
- Version:
- 2005-maj-02
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScheduleModule
public ScheduleModule()
- Constructor for ScheduleModule.
isValidCache
public boolean isValidCache(ModuleQuery query,
java.lang.String cachedUserId,
long cacheAge)
- Description copied from interface:
Module
- Checks if a cached result is valid or not based on how long ago the
result was cached. Some services might work fine with returning very old
cached results, for instance the result of a map service wont change
(often at least) and most cache ages would then be valid. Other things
like news services on the other hand should not allow a long cache age.
- 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.
processQuery
public Package processQuery(ModuleQuery query)
- Description copied from interface:
Module
- Process a user sent query. This is very individual depending on the
service provided by the module.
- Parameters:
query - The user sent query.
- Returns:
- An ErrorPackage if an error occured while processing the query,
an OutputPackage with the result otherwise.