1 4 package com.tc.config.schema.test; 5 6 10 public class QueryRouteConfigBuilder extends BaseConfigBuilder { 11 12 private final String matchType; 13 private final String route; 14 private final String query; 15 16 public static final String MATCH_TYPE_EXACT = "exact"; 17 public static final String MATCH_TYPE_REGEX = "regex"; 18 19 public static final String ROUTE_TERRACOTTA = "terracotta"; 20 public static final String ROUTE_NATIVE = "native"; 21 22 public QueryRouteConfigBuilder(String matchType, String route, String query) { 23 super(5, new String [0]); 24 25 this.matchType = matchType; 26 this.route = route; 27 this.query = query; 28 } 29 30 public String toString() { 31 String out = indent() + "<query-route"; 32 if (this.matchType != null) out += " match-type=\"" + this.matchType + "\""; 33 if (this.route != null) out += " route=\"" + this.route + "\""; 34 out += ">"; 35 if (this.query != null) out += this.query; 36 out += "</query-route>\n"; 37 38 return out; 39 } 40 41 } 42 | Popular Tags |