} else {
try {
BasicReader.getReader().search(searchOn, search, page,
- item);
+ item, true);
} catch (IOException e1) {
Instance.getTraceHandler().error(e1);
}
try {
BasicReader.getReader().searchTag(searchOn, page, item,
- tags.toArray(new Integer[] {}));
+ true, tags.toArray(new Integer[] {}));
} catch (IOException e1) {
Instance.getTraceHandler().error(e1);
}
* @param item
* the item to select (0 = do not select a specific item but show
* all the page, items start at 1)
+ * @param sync
+ * execute the process synchronously (wait until it is terminated
+ * before returning)
*
* @throws IOException
* in case of I/O error
*/
- public void search(SupportType searchOn, String keywords, int page, int item)
- throws IOException;
+ public void search(SupportType searchOn, String keywords, int page,
+ int item, boolean sync) throws IOException;
/**
* Search based upon a hierarchy of tags, or search for (sub)tags.
* @param item
* the item to select (0 = do not select a specific item but show
* all the page, items <b>start at 1</b>)
+ * @param sync
+ * execute the process synchronously (wait until it is terminated
+ * before returning)
* @param tags
* the tags indices to search for (this is a tag
* <b>hierarchy</b>, <b>NOT</b> a multiple tags choice)
* in case of I/O error
*/
public void searchTag(SupportType searchOn, int page, int item,
- Integer... tags) throws IOException;
+ boolean sync, Integer... tags) throws IOException;
/**
* Open the {@link Story} with an external reader (the program should be
}
@Override
- public void search(SupportType searchOn, String keywords, int page, int item)
- throws IOException {
+ public void search(SupportType searchOn, String keywords, int page,
+ int item, boolean sync) throws IOException {
}
@Override
public void searchTag(SupportType searchOn, int page, int item,
- Integer... tags) throws IOException {
+ boolean sync, Integer... tags) throws IOException {
BasicSearchable search = BasicSearchable.getSearchable(searchOn);
List<SearchableTag> stags = search.getTags();
String fqnTag = "";
Instance.getTraceHandler().error(e);
}
}
-
+
@Override
- public void search(SupportType searchOn, String keywords, int page, int item) {
- // TODO: !!!
- throw new java.lang.IllegalStateException("Not implemented yet.");
+ public void search(SupportType searchOn, String keywords, int page,
+ int item, boolean sync) {
+ // TODO
+ if (sync) {
+ throw new java.lang.IllegalStateException("Not implemented yet.");
+ }
}
-
+
@Override
- public void searchTag(SupportType searchOn, int page, int item, String... tags) {
- // TODO: !!!
- throw new java.lang.IllegalStateException("Not implemented yet.");
+ public void searchTag(SupportType searchOn, int page, int item,
+ boolean sync, Integer... tags) {
+ // TODO
+ if (sync) {
+ throw new java.lang.IllegalStateException("Not implemented yet.");
+ }
}
}
}
@Override
- public void search(SupportType searchOn, String keywords, int page, int item) throws IOException {
- reader.search(searchOn, keywords, page, item);
+ public void search(SupportType searchOn, String keywords, int page,
+ int item, boolean sync) throws IOException {
+ reader.search(searchOn, keywords, page, item, sync);
}
@Override
public void searchTag(SupportType searchOn, int page, int item,
- Integer... tags) throws IOException {
- reader.searchTag(searchOn, page, item, tags);
+ boolean sync, Integer... tags) throws IOException {
+ reader.searchTag(searchOn, page, item, sync, tags);
}
/**
}
@Override
- public void search(SupportType searchOn, String keywords, int page, int item) {
- // TODO: !!!
- throw new java.lang.IllegalStateException("Not implemented yet.");
+ public void search(SupportType searchOn, String keywords, int page,
+ int item, boolean sync) {
+ // TODO
+ if (sync) {
+ throw new java.lang.IllegalStateException("Not implemented yet.");
+ }
}
@Override
public void searchTag(SupportType searchOn, int page, int item,
- Integer... tags) {
- // TODO: !!!
- throw new java.lang.IllegalStateException("Not implemented yet.");
+ boolean sync, Integer... tags) {
+ // TODO
+ if (sync) {
+ throw new java.lang.IllegalStateException("Not implemented yet.");
+ }
}
/**
searchItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
- reader.search(type, "", 1, 0);
+ reader.search(type, "", 1, 0, false);
}
});
search.add(searchItem);