use of org.jbehave.core.io.rest.Resource in project jbehave-core by jbehave.
the class ImportToFilesystem method writeResources.
private void writeResources(Map<String, Resource> index, String targetPath, String targetExt) {
for (String name : index.keySet()) {
Resource resource = index.get(name);
writeResource(resource, asFile(resource, targetPath, targetExt));
}
}
use of org.jbehave.core.io.rest.Resource in project jbehave-core by jbehave.
the class IndexFromXWiki method createIndexFromEntity.
protected Map<String, Resource> createIndexFromEntity(String rootURI, String entity) {
Collection<Page> pages = parse(entity);
Map<String, Resource> index = new HashMap<>();
for (Page page : pages) {
String parentName = (page.parent != null ? resolveName(page.parent) : null);
String uri = format(PAGE_URI, rootURI, page.name);
Resource resource = new Resource(uri, resolveName(page.name), parentName);
index.put(resource.getName(), resource);
}
return index;
}
use of org.jbehave.core.io.rest.Resource in project jbehave-core by jbehave.
the class IndexFromConfluence method createResourceMap.
private Map<String, Resource> createResourceMap(String baseUrl, String spaceKey, String pageName, String pattern) {
Map<String, Resource> result = new HashMap<>();
Page rootPage = confluence.loadRootPage(baseUrl, spaceKey, pageName);
addPage(result, rootPage.getSelfReference(), pattern);
return result;
}
use of org.jbehave.core.io.rest.Resource in project jbehave-core by jbehave.
the class ExportFromFilesystem method readResources.
private void readResources(Map<String, Resource> index, String sourcePath, String sourceExt) {
for (String name : index.keySet()) {
Resource resource = index.get(name);
readResource(resource, asFile(resource, sourcePath, sourceExt));
}
}
use of org.jbehave.core.io.rest.Resource in project jbehave-core by jbehave.
the class ExportFromFilesystem method uploadResources.
private void uploadResources(Map<String, Resource> index) {
for (String name : index.keySet()) {
Resource resource = index.get(name);
uploader.uploadResource(resource);
}
}
Aggregations