public class ResourceFactory extends Object implements IResourceFactory
| Constructor and Description |
|---|
ResourceFactory(IClient client) |
| 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
|
static Map<String,Class<? extends IResource>> |
getImplMap() |
<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) |
public ResourceFactory(IClient client)
public List<IResource> createList(String json, String kind)
IResourceFactorycreateList in interface IResourceFactorypublic <T extends IResource> T create(InputStream input)
IResourceFactorycreate in interface IResourceFactoryinput - Read the given input stream which assumes the input
is parsable JSON representing a valid resourcepublic IResource create(InputStream input, boolean strict)
create in interface IResourceFactorypublic <T extends IResource> T create(String response)
IResourceFactorycreate in interface IResourceFactorypublic IResource create(String response, boolean strict)
create in interface IResourceFactorypublic <T extends IResource> T create(String version, String kind)
IResourceFactorycreate in interface IResourceFactorypublic IResource create(String version, String kind, boolean strict)
create in interface IResourceFactorypublic <T extends IResource> T stub(String kind, String name, String namespace)
stub in interface IResourceFactorypublic <T extends IResource> T stub(String kind, String name)
IResourceFactorystub in interface IResourceFactoryCopyright © 2016 Red Hat, Inc. All rights reserved.