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)
IResourceFactory
createList
in interface IResourceFactory
public <T extends IResource> T create(InputStream input)
IResourceFactory
create
in interface IResourceFactory
input
- 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 IResourceFactory
public <T extends IResource> T create(String response)
IResourceFactory
create
in interface IResourceFactory
public IResource create(String response, boolean strict)
create
in interface IResourceFactory
public <T extends IResource> T create(String version, String kind)
IResourceFactory
create
in interface IResourceFactory
public IResource create(String version, String kind, boolean strict)
create
in interface IResourceFactory
public <T extends IResource> T stub(String kind, String name, String namespace)
stub
in interface IResourceFactory
public <T extends IResource> T stub(String kind, String name)
IResourceFactory
stub
in interface IResourceFactory
Copyright © 2016 Red Hat, Inc. All rights reserved.