List list = getModel().getDb().getTableHistory().getHistoryList(session.getSessionId(), HistoryReference.TYPE_MANUAL);
int last = list.size();
for (int index=0;index < last;index++){
int v = ((Integer)(list.get(index))).intValue();
try {
HttpMessage message = getModel().getDb().getTableHistory().read(v).getHttpMessage();
if (Type.URL.equals(reqType)) {
// URL
matcher = pattern.matcher(message.getRequestHeader().getURI().toString());
if (matcher.find()) {
this.searchPanel.addSearchResult(
new SearchResult(message, reqType,
filter, matcher.group()));
}
}
if (Type.Request.equals(reqType) ||
Type.All.equals(reqType)) {
// Request Header
matcher = pattern.matcher(message.getRequestHeader().toString());
if (matcher.find()) {
this.searchPanel.addSearchResult(
new SearchResult(message, reqType,
filter, matcher.group()));
}
// Request Body
matcher = pattern.matcher(message.getRequestBody().toString());
if (matcher.find()) {
this.searchPanel.addSearchResult(
new SearchResult(message, reqType,
filter, matcher.group()));
}
}
if (Type.Response.equals(reqType) ||
Type.All.equals(reqType)) {
// Response header
matcher = pattern.matcher(message.getResponseHeader().toString());
if (matcher.find()) {
this.searchPanel.addSearchResult(
new SearchResult(message, reqType,
filter, matcher.group()));
}
// Response body
matcher = pattern.matcher(message.getResponseBody().toString());
if (matcher.find()) {
this.searchPanel.addSearchResult(
new SearchResult(message, reqType,
filter, matcher.group()));
}