public interface IResource extends ICapable, Annotatable, IAnnotatable, JSONSerializeable, ITypeMeta
| Modifier and Type | Method and Description |
|---|---|
void |
addLabel(String key,
String value)
Add or update a label;
|
String |
getAnnotation(String key)
Retrieves the annotated value for the given key
|
Map<String,String> |
getAnnotations()
Retrieves the annotations associated with the resource
|
Set<Class<? extends ICapability>> |
getCapabilities() |
String |
getCreationTimeStamp()
Returns the timestamp of when this resource
was created
|
Map<String,String> |
getLabels()
Retrieves the labels associated with the resource
|
Map<String,String> |
getMetadata() |
String |
getName()
Returns the identifier for this resource
|
String |
getNamespace()
Returns the scope of this resource
|
IProject |
getProject()
Return the project of the resource which
corresponds to the namespace
|
String |
getResourceVersion() |
boolean |
isAnnotatedWith(String key)
Returns
true if the resource is annotated with
the given key |
void |
removeAnnotation(String key)
Removes the resource annotation
|
void |
setAnnotation(String key,
String value)
Set the resource annotation
|
accept, getCapability, supportsgetApiVersiontoJson, toJsonSet<Class<? extends ICapability>> getCapabilities()
String getCreationTimeStamp()
String getName()
String getNamespace()
IProject getProject()
boolean isAnnotatedWith(String key)
true if the resource is annotated with
the given keyisAnnotatedWith in interface IAnnotatablekey - String getAnnotation(String key)
getAnnotation in interface IAnnotatablekey - void setAnnotation(String key, String value)
setAnnotation in interface IAnnotatablekey - value - void removeAnnotation(String key)
key - Map<String,String> getAnnotations()
getAnnotations in interface IAnnotatableString getResourceVersion()
Copyright © 2018 Red Hat, Inc. All Rights Reserved.