Tabnine Logo
org.jbehave.core.io.rest
Code IndexAdd Tabnine to your IDE (free)

How to use org.jbehave.core.io.rest

Best Java code snippets using org.jbehave.core.io.rest (Showing top 20 results out of 315)

origin: jbehave/jbehave-web

public TreeResource(Resource resource) {
  this.name = resource.getName();
  this.parentName = resource.getParentName();
  this.uri = resource.getURI();
}
origin: org.jbehave/jbehave-rest

public Map<String, Resource> indexResources(String rootURI) {
  String entity = get(uri(rootURI));
  Map<String, Resource> index = createIndexFromEntity(rootURI, entity);
  addBreadcrumbs(index);
  return index;
}
origin: org.jbehave/jbehave-rest

public Map<String, Resource> indexResources(String rootURI,
    String rootPath, String syntax, String includes) {
  Map<String, Resource> index = createIndexFromPaths(rootURI, rootPath,
      syntax, includes);
  addBreadcrumbs(index);
  return index;
}
origin: org.jbehave/jbehave-rest

public void uploadResource(Resource resource) {
  try {
    Type type = client.getType();
    put(uri(resource.getURI(), type), entity(resource, type));
  } catch (Exception cause) {
    throw new InvalidStoryResource(resource.toString(), cause);
  }
}
origin: org.jbehave/jbehave-rest

private void collectBreadcrumbs(List<String> breadcrumbs,
    Resource resource, Map<String, Resource> index) {
  if (resource.hasParent()) {
    String parentName = resource.getParentName();
    breadcrumbs.add(0, parentName);
    Resource parent = index.get(parentName);
    if (parent != null) {
      collectBreadcrumbs(breadcrumbs, parent, index);
    }
  }
}
origin: org.jbehave/jbehave-rest

public String loadResourceAsText(String resourcePath) {
  try {
    Type type = client.getType();
    return text(get(uri(resourcePath, type)), type);
  } catch (Exception cause) {
    throw new InvalidStoryResource(resourcePath, cause);
  }
}
origin: org.jbehave/jbehave-rest

protected void addBreadcrumbs(Map<String, Resource> index) {
  for (Resource resource : index.values()) {
    List<String> breadcrumbs = new ArrayList<>();
    collectBreadcrumbs(breadcrumbs, resource, index);
    resource.setBreadcrumbs(breadcrumbs);
  }
}
origin: org.jbehave/jbehave-rest

public LoadFromConfluence(String username, String password) {
  this(new RESTClient(Type.XML, username, password));
}
origin: org.jbehave/jbehave-rest

public IndexFromXWiki(String username, String password) {
  this(username, password, new ToLowerCase());
}
origin: org.jbehave/jbehave-rest

private String get(String uri) {
  return client.get(uri);
}

origin: org.jbehave/jbehave-rest

protected String entity(Resource resource, Type type) {
  return resource.getContent();
}
origin: org.jbehave/jbehave-rest

private void put(String uri, String entity) {
  client.put(uri, entity);
}
origin: org.jbehave/jbehave-rest

protected String resolveName(String input){
  return nameResolver.resolve(input);
}

origin: org.jbehave/jbehave-rest

public UploadToREST(Type type, String username, String password) {
  this.client = new RESTClient(type, username, password);
}

origin: org.jbehave/jbehave-rest

public IndexFromRedmine(String username, String password) {
  this(username, password, new ToLowerCase());
}
origin: org.jbehave/jbehave-rest

private String get(String uri) {
  return client.get(uri);
}
origin: org.jbehave/jbehave-rest

public IndexFromRedmine(String username, String password, ResourceNameResolver nameResolver) {
  super(new RESTClient(Type.JSON, username, password), nameResolver);
}
origin: org.jbehave/jbehave-rest

public LoadFromREST(Type type, String username, String password) {
  this.client = new RESTClient(type, username, password);
}

origin: org.jbehave/jbehave-rest

public IndexFromConfluence(String username, String password) {
  this(new RESTClient(Type.XML, username, password));
}
origin: org.jbehave/jbehave-rest

public IndexFromXWiki(String username, String password, ResourceNameResolver nameResolver) {
  super(new RESTClient(Type.JSON, username, password), nameResolver);
}
org.jbehave.core.io.rest

Most used classes

  • Resource
    Represents a resource retrieved from a REST API.
  • ResourceIndexer
    Indexes the resources available from the REST root URI. The index is represented as a map, indexed b
  • IndexFromRedmine
    Indexes resources from Redmine using the REST API
  • LoadFromRedmine
    Loads resource from Redmine wiki pages using the REST API
  • IndexWithBreadcrumbs$ToLowerCase
  • LoadFromREST,
  • RESTClient$Type,
  • RESTClient,
  • ResourceExporter,
  • ResourceImporter,
  • ResourceNameResolver,
  • ResourceUploader,
  • UploadToREST,
  • Confluence$Group,
  • Confluence$Link,
  • Confluence$Page,
  • Confluence$Results,
  • Confluence,
  • IndexFromConfluence
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now