(StringBuilder buffer)
| 2273 | * ############################################################### |
| 2274 | */ |
| 2275 | private void appendTemplateLines(StringBuilder buffer) |
| 2276 | { |
| 2277 | for (PCTemplate template : charDisplay.getTemplateSet()) |
| 2278 | { |
| 2279 | // |
| 2280 | // TEMPLATESAPPLIED:[NAME:<template_name>] |
| 2281 | // TEMPLATESAPPLIED:[NAME:<template_name>|CHOSENFEAT:[KEY:<key>|VALUE:<value>]CHOSENFEAT:[KEY:<key>| |
| 2282 | // VALUE:<value>]...CHOSENFEAT:[KEY:<key>|VALUE:<value>]] |
| 2283 | // |
| 2284 | buffer.append(IOConstants.TAG_TEMPLATESAPPLIED).append(':').append('['); |
| 2285 | buffer.append(IOConstants.TAG_NAME).append(':').append(EntityEncoder.encode(template.getKeyName())); |
| 2286 | |
| 2287 | final String chosenFeats = chosenFeats(template); |
| 2288 | |
| 2289 | if (!chosenFeats.isEmpty()) |
| 2290 | { |
| 2291 | buffer.append('|').append(chosenFeats); |
| 2292 | } |
| 2293 | |
| 2294 | // |
| 2295 | // Save list of template names 'owned' by current template |
| 2296 | // |
| 2297 | Collection<PCTemplate> templatesAdded = thePC.getTemplatesAdded(template); |
| 2298 | if (templatesAdded != null) |
| 2299 | { |
| 2300 | for (PCTemplate ownedTemplate : templatesAdded) |
| 2301 | { |
| 2302 | buffer.append('|').append(IOConstants.TAG_CHOSENTEMPLATE).append(':').append('['); |
| 2303 | buffer.append(IOConstants.TAG_NAME).append(':') |
| 2304 | .append(EntityEncoder.encode(ownedTemplate.getKeyName())); |
| 2305 | buffer.append(']'); |
| 2306 | } |
| 2307 | } |
| 2308 | List<String> assocList = thePC.getAssociationList(template); |
| 2309 | if (assocList != null && !assocList.isEmpty()) |
| 2310 | { |
| 2311 | buffer.append(IOConstants.TAG_SEPARATOR); |
| 2312 | buffer.append(IOConstants.TAG_APPLIEDTO).append(IOConstants.TAG_END); |
| 2313 | boolean first = true; |
| 2314 | for (String assoc : assocList) |
| 2315 | { |
| 2316 | if (!first) |
| 2317 | { |
| 2318 | buffer.append(Constants.COMMA); |
| 2319 | } |
| 2320 | first = false; |
| 2321 | buffer.append(EntityEncoder.encode(assoc)); |
| 2322 | } |
| 2323 | } |
| 2324 | |
| 2325 | buffer.append(']'); |
| 2326 | appendAddTokenInfo(buffer, template); |
| 2327 | buffer.append(IOConstants.LINE_SEP); |
| 2328 | } |
| 2329 | } |
| 2330 | |
| 2331 | private void appendUseTempModsLine(StringBuilder buffer) |
| 2332 | { |
no test coverage detected