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 * Executes a Pazpar2 record requests
\r
23 * @return Active clients for the record request
\r
25 public String doRecord();
\r
28 * Updates display data objects by issuing the following pazpar2 commands:
\r
29 * 'show', 'stat', 'termlist' and 'bytarget'.
\r
31 * Returns a count of the remaining active clients from the most recent search.
\r
33 * After refreshing the data from pazpar2 the UI components displaying those
\r
34 * data should be re-rendered.
\r
36 * @return count of activeclients
\r
38 public String update();
\r
41 * Updates the data objects given by a comma separated list of one or more commands -
\r
42 * i.e. "show,state,termlist,bytarget".
\r
44 * May not be useful for the UI directly.
\r
46 * @param commands Command separated list of pazpar2 commands.
\r
47 * @return count of activeclients
\r
50 public String update (String commands);
\r
53 * Will retrieve or remove the record with the given recid from memory.
\r
55 * A pazpar2 'record' command will then be issued. The part of the UI
\r
56 * showing record data should thus be re-rendered.
\r
61 public String toggleRecord(String recid);
\r
64 * Resolves whether the backend has a record with the given recid in memory
\r
66 * @return true if the bean currently holds the record with recid
\r
68 public boolean hasRecord (String recId);
\r
72 * Initiates a pager object, a component holding the data to draw a sequence
\r
73 * of page numbers to navigate by and mechanisms to navigate with
\r
75 * @param pageRange number of pages to display in the pager
\r
76 * @return ResultsPager the initiated pager component
\r
78 public ResultsPager setPager(int pageRange);
\r
81 * Gives a component for drawing a pager to navigate by.
\r
82 * @return ResultsPager pager component
\r
84 public ResultsPager getPager();
\r
87 * Returns the current hash key used, as used for internal session state tracking
\r
88 * and potentially for browser history entries as well
\r
90 * A UI author would not normally be concerned with retrieving this. It's used by the
\r
91 * framework internally
\r
93 * @return string that can be used for browsers window.location.hash
\r
95 public String getCurrentStateKey ();
\r
98 * Sets the current state key, i.e. when user clicks back or forward in browser history.
\r
99 * Would normally be automatically handled by the frameworks components.
\r
101 * @param key corresponding to browsers hash string
\r
103 public void setCurrentStateKey(String key);
\r
105 public boolean getAuthenticationRequired ();
\r
107 public String getCheckHistory ();
\r
108 public String getWatchActiveclients ();
\r
109 public String getWatchActiveclientsRecord ();
\r
111 public void setServiceTypePZ2 ();
\r
112 public void setServiceTypeSP ();
\r
113 public void setServiceTypeTBD ();
\r
114 public void setServiceUrl(String url);
\r
115 public String getServiceUrl();
\r
116 public String getServiceType();
\r
117 public boolean isPazpar2Service ();
\r
118 public boolean isServiceProxyService();
\r
119 public boolean serviceIsToBeDecided ();
\r