public interface IResourceFactory
Modifier and Type | Method and Description |
---|---|
<T extends IResource> |
create(InputStream input)
Create a resource from a response string
|
IResource |
create(InputStream input,
boolean strict) |
<T extends IResource> |
create(String response)
Create a resource from a response string
|
IResource |
create(String response,
boolean strict) |
<T extends IResource> |
create(String version,
String kind)
Create(or stub) a resource for a given version and kind
|
IResource |
create(String version,
String kind,
boolean strict) |
List<IResource> |
createList(String json,
String kind)
Create a list of resources of the given kind
from a response string
|
<T extends IResource> |
stub(String kind,
String name)
Stub out the given resource kind using a version determined by the factory
|
<T extends IResource> |
stub(String kind,
String name,
String namespace) |
List<IResource> createList(String json, String kind)
json
- kind
- ResourceFactoryException
- if it is unable to create resources<T extends IResource> T create(String response)
response
- ResourceFactoryException
- if it is unable to create resources<T extends IResource> T create(InputStream input)
input
- Read the given input stream which assumes the input
is parsable JSON representing a valid resourceResourceFactoryException
- if it is unable to create resourcesIResource create(InputStream input, boolean strict)
<T extends IResource> T create(String version, String kind)
version
- kind
- <T extends IResource> T stub(String kind, String name)
kind
- name
- Copyright © 2016 Red Hat, Inc. All rights reserved.