@Override public Set<String> get(ContentStore db, Map model, String key) { return db.getAllTags(); }
@Override public DocumentList get(ContentStore db, Map model, String key) { DocumentList dl = new DocumentList(); Map<?, ?> config = (Map<?, ?>) model.get("config"); String tagPath = config.get(TAG_PATH.replace(".", "_")).toString(); for (String tag : db.getAllTags()) { Map<String, Object> newTag = new HashMap<>(); String tagName = tag; newTag.put("name", tagName); String uri = tagPath + FileUtil.URI_SEPARATOR_CHAR + tag + config.get(OUTPUT_EXTENSION.replace(".", "_")).toString(); newTag.put("uri", uri); newTag.put("tagged_posts", db.getPublishedPostsByTag(tagName)); newTag.put("tagged_documents", db.getPublishedDocumentsByTag(tagName)); dl.push(newTag); } return dl; }
final List<Throwable> errors = new LinkedList<>(); for (String tag : db.getAllTags()) { try { Map<String, Object> model = new HashMap<>();
@Override public Set<String> get(ContentStore db, Map model, String key) { return db.getAllTags(); }
@Override public DocumentList get(ContentStore db, Map model, String key) { DocumentList dl = new DocumentList(); Map<?, ?> config = (Map<?, ?>) model.get("config"); String tagPath = config.get(TAG_PATH.replace(".", "_")).toString(); for (String tag : db.getAllTags()) { Map<String, Object> newTag = new HashMap<>(); String tagName = tag; newTag.put("name", tagName); String uri = tagPath + FileUtil.URI_SEPARATOR_CHAR + tag + config.get(OUTPUT_EXTENSION.replace(".", "_")).toString(); newTag.put("uri", uri); newTag.put("tagged_posts", db.getPublishedPostsByTag(tagName)); newTag.put("tagged_documents", db.getPublishedDocumentsByTag(tagName)); dl.push(newTag); } return dl; }
final List<Throwable> errors = new LinkedList<>(); for (String tag : db.getAllTags()) { try { Map<String, Object> model = new HashMap<>();