public interface IClient extends ICapable, IAuthorizationClient
Modifier and Type | Method and Description |
---|---|
Collection<IResource> |
create(IList list,
String namespace)
Creates a list of resources in the given namespace
|
<T extends IResource> |
create(String kind,
String namespace,
String name,
String subresource,
IResource payload)
Creates the given resource in the given namespace using the subresource
|
<T extends IResource> |
create(T resource)
Creates the given resource in the namespace defined on the
resource or the default namspace if undefined
|
<T extends IResource> |
create(T resource,
String namespace)
Creates the given resource in the given namespace
|
<T extends IResource> |
delete(T resource)
Deletes the given resource.
|
<T extends IResource> |
get(String kind,
String name,
String namespace) |
IAuthorizationStrategy |
getAuthorizationStrategy() |
URL |
getBaseURL() |
IUser |
getCurrentUser() |
String |
getOpenShiftAPIVersion()
Returns the OpenShift API version for this client
|
IResourceFactory |
getResourceFactory()
Returns the resource factory used to create resources based on the
response from the server
|
String |
getResourceURI(IResource resource) |
<T extends IResource> |
list(String kind)
Lists all possible resources of the given kind in the default namespace
|
<T extends IResource> |
list(String kind,
String namespace)
Lists the given given resource kind scoping it to a specific namespace
|
<T extends IResource> |
list(String kind,
String namespace,
Map<String,String> labels)
Lists the given given resource kind scoping it to a specific namespace
|
void |
setAuthorizationStrategy(IAuthorizationStrategy strategy)
Sets the authorization strategy for the client when
making requests to the server
|
<T extends IResource> |
update(T resource)
Updates the given resource
|
accept, getCapability, supports
getAuthorizationDetails, getContext, setSSLCertificateCallback
<T extends IResource> List<T> list(String kind)
kind
- <T extends IResource> List<T> list(String kind, String namespace)
kind
- namespace
- The namespace to scope the possible results of this list<T extends IResource> List<T> list(String kind, String namespace, Map<String,String> labels)
kind
- namespace
- The namespace to scope the possible results of this listlabels
- The label used to filter the resource<T extends IResource> T get(String kind, String name, String namespace)
service
- name
- OpenShiftException
- if operation not supported for resource type<T extends IResource> T create(T resource)
resource
- UnsupportedOperationException
- if the resource is a list<T extends IResource> T create(T resource, String namespace)
resource
- namespace
- <T extends IResource> T create(String kind, String namespace, String name, String subresource, IResource payload)
kind
- namespace
- name
- subresource
- payload
- Collection<IResource> create(IList list, String namespace)
list
- The resource definitionsnamespace
- the namespace for the resourcesOpenShiftException
- if a status can not be determined from
the exception<T extends IResource> T update(T resource)
resource
- UnsupportedOperationException
- if the resource is a list<T extends IResource> void delete(T resource)
resource
- UnsupportedOperationException
- if the resource is a listURL getBaseURL()
String getResourceURI(IResource resource)
resource
- String getOpenShiftAPIVersion() throws UnsupportedVersionException
UnsupportedVersionException
{@link
- UnauthorizedException}void setAuthorizationStrategy(IAuthorizationStrategy strategy)
strategy
- IAuthorizationStrategy getAuthorizationStrategy()
IResourceFactory getResourceFactory()
IUser getCurrentUser()
Copyright © 2016 Red Hat, Inc. All rights reserved.