The Query String for the template. Expressions are not resolved. @return the Query String.
()
| 1034 | * @return the Query String. |
| 1035 | */ |
| 1036 | public String queryLine() { |
| 1037 | StringBuilder queryString = new StringBuilder(); |
| 1038 | |
| 1039 | if (!this.queries.isEmpty()) { |
| 1040 | Iterator<QueryTemplate> iterator = this.queries.values().iterator(); |
| 1041 | while (iterator.hasNext()) { |
| 1042 | QueryTemplate queryTemplate = iterator.next(); |
| 1043 | String query = queryTemplate.toString(); |
| 1044 | if (query != null && !query.isEmpty()) { |
| 1045 | queryString.append(query); |
| 1046 | if (iterator.hasNext()) { |
| 1047 | queryString.append("&"); |
| 1048 | } |
| 1049 | } |
| 1050 | } |
| 1051 | } |
| 1052 | /* remove any trailing ampersands */ |
| 1053 | String result = queryString.toString(); |
| 1054 | if (result.endsWith("&")) { |
| 1055 | result = result.substring(0, result.length() - 1); |
| 1056 | } |
| 1057 | |
| 1058 | if (!result.isEmpty()) { |
| 1059 | result = "?" + result; |
| 1060 | } |
| 1061 | |
| 1062 | return result; |
| 1063 | } |
| 1064 | |
| 1065 | private void extractQueryTemplates(String queryString, boolean append) { |
| 1066 | /* split the query string up into name value pairs */ |