wip on content control panel ui

This commit is contained in:
Zlatin Balevsky
2019-07-09 19:20:06 +01:00
parent feef773bac
commit ac12bff69b
6 changed files with 79 additions and 4 deletions

View File

@@ -15,6 +15,11 @@ class KeywordMatcher extends Matcher {
false
}
@Override
public String getTerm() {
keyword
}
@Override
public int hashCode() {
keyword.hashCode()

View File

@@ -7,6 +7,8 @@ abstract class Matcher {
protected abstract boolean match(String []searchTerms);
public abstract String getTerm();
public void process(QueryEvent qe) {
def terms = qe.searchEvent.searchTerms
if (match(terms)) {

View File

@@ -15,6 +15,11 @@ class RegexMatcher extends Matcher {
return pattern.matcher(combined).find()
}
@Override
public String getTerm() {
pattern.pattern()
}
@Override
public int hashCode() {
pattern.hashCode()