Items that need to be stored for session management
There is a unique org.osid.OsidContext object and org.osid.repository.RepositoryManager object for each user. The OsidContext object gets loaded into the RepositoryManager when a user starts a new "search session" (selecting sources, conducting a search, paging through results, selecting certain results, etc.). The RepositoryManager will then "know" the user throughout the user's session in the system. Some of the items below could be passed in a java.util.Properties object to the getAssetsBySearch() method of org.osid.repository.Repository.
Our final goal should be to pack enough logic into the provider so that the consumer manages as little state as possible. Preferably, there would only be one Out-of-Band agreement for the searchProperties that the consumer must follow - more on the guid approach to come...
Key |
Description |
Type |
---|---|---|
|
identifies which repository belongs to the user of this OsidContext |
long, alpha-numeric String |
|
necessary to identify a specific user and allow that user access to X-Server services |
long, alpha-numeric String |
|
identifies a result set created by submitting a query with the /wiki/spaces/SLIB/pages/2921168923 command. This number is necessary for asynchronous searches, retrieving results and pagination |
short, numeric String |
|
a flag indicating whether the user is starting a new search session or continuing with a previous one |
short String ("true"/"false") |
|
stores how many results are showed per page. Needed for paging through results. |
java.lang.Integer |
|
stores which results are currently being displayed. Needed for 'next' and 'previous' paging options |
java.lang.Integer |
|
total number of results |
java.lang.Integer |
|
flag indicating whether an asynchronous search should be performed |
short String |
|
a list of source identifiers representing which databases should be searched |
java.util.List or multiple Strings |
Issues
- How do we know when a user's session is done? This is up to the consumer. In our case (using Servlets), we can choose when to invalidate a session: a timeout & when the search dialog is closed.
- Will the metasearch engine support multiple users logged on at once? Yes.