1 package com.indexdata.mkjsf.pazpar2;
\r
3 import java.io.Serializable;
\r
5 import com.indexdata.mkjsf.controls.ResultsPager;
\r
7 public interface Pz2Interface extends Serializable {
\r
10 * Executes a Pazpar2 search using the given query string
\r
14 public void doSearch(String query);
\r
17 * Executes a Pazpar2 search using the current query
\r
19 public void doSearch();
\r
22 * Updates display data objects by issuing the following pazpar2 commands:
\r
23 * 'show', 'stat', 'termlist' and 'bytarget'.
\r
25 * Returns a count of the remaining active clients from the most recent search.
\r
27 * After refreshing the data from pazpar2 the UI components displaying those
\r
28 * data should be re-rendered.
\r
30 * @return count of activeclients
\r
32 public String update();
\r
35 * Updates the data objects given by a comma separated list of one or more commands -
\r
36 * i.e. "show,state,termlist,bytarget".
\r
38 * May not be useful for the UI directly.
\r
40 * @param commands Command separated list of pazpar2 commands.
\r
41 * @return count of activeclients
\r
44 public String update (String commands);
\r
47 * Will retrieve or remove the record with the given recid from memory.
\r
49 * A pazpar2 'record' command will then be issued. The part of the UI
\r
50 * showing record data should thus be re-rendered.
\r
55 public String toggleRecord(String recid);
\r
58 * Resolves whether the backend has a record with the given recid in memory
\r
60 * @return true if the bean currently holds the record with recid
\r
62 public boolean hasRecord (String recId);
\r
66 * Initiates a pager object, a component holding the data to draw a sequence
\r
67 * of page numbers to navigate by and mechanisms to navigate with
\r
69 * @param pageRange number of pages to display in the pager
\r
70 * @return ResultsPager the initiated pager component
\r
72 public ResultsPager setPager(int pageRange);
\r
75 * Gives a component for drawing a pager to navigate by.
\r
76 * @return ResultsPager pager component
\r
78 public ResultsPager getPager();
\r
81 * Returns the current hash key used, as used for internal session state tracking
\r
82 * and potentially for browser history entries as well
\r
84 * A UI author would not normally be concerned with retrieving this. It's used by the
\r
85 * framework internally
\r
87 * @return string that can be used for browsers window.location.hash
\r
89 public String getCurrentStateKey ();
\r
92 * Sets the current state key, i.e. when user clicks back or forward in browser history.
\r
93 * Would normally be automatically handled by the frameworks components.
\r
95 * @param key corresponding to browsers hash string
\r
97 public void setCurrentStateKey(String key);
\r
99 public boolean getAuthenticationRequired ();
\r
101 public String getCheckHistory ();
\r
102 public String getWatchActiveclients ();
\r
103 public String getWatchActiveclientsRecord ();
\r