public interface IResource extends ICapable
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
|
String |
getApiVersion()
returns the version of this resource
|
Set<Class<? extends ICapability>> |
getCapabilities()
Retrieves the list of capabilities supported by this resource
|
String |
getCreationTimeStamp()
Returns the timestamp of when this resource
was created
|
String |
getKind()
Returns the resource kind
|
Map<String,String> |
getLabels()
Retrieves the labels associated with the resource
|
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
|
boolean |
isAnnotatedWith(String key)
Returns
true if the resource is annotated with
the given key |
void |
setAnnotation(String key,
String value)
Set the resource annotation
|
String |
toJson() |
String |
toJson(boolean compact) |
accept, getCapability, supports
Set<Class<? extends ICapability>> getCapabilities()
String getKind()
String getApiVersion()
String getCreationTimeStamp()
String getName()
String getNamespace()
IProject getProject()
boolean isAnnotatedWith(String key)
true
if the resource is annotated with
the given keykey
- String getAnnotation(String key)
key
- void setAnnotation(String key, String value)
key
- value
- Map<String,String> getAnnotations()
String toJson()
String toJson(boolean compact)
compact
- true if the string should be compact; default: falseCopyright © 2016 Red Hat, Inc. All rights reserved.