public class NamespaceableResourceAdapter<T extends io.fabric8.kubernetes.api.model.HasMetadata> extends ResourceAdapter<T> implements NamespaceableResource<T>
NamespaceableResource is not Namespaceable to allow for future versions of the logic
to be consolidated.
With generic typed interface design Namespacable<X> and Namespaceable<Y> are considered incompatible no matter the types for X and Y, but NamespaceableX and NamespaceableY can be polymorphic. As long as there is no usage expectation like instanceof Namespaceable - then it would be fine to have the non-generic versions.
The constructor and the inNamespace method determine the namespacing rules: - if the item is namespaced, the resource context will use that namespace as that is not currently the default behavior of withItem
FieldValidateable.Validation| Modifier and Type | Field and Description |
|---|---|
protected T |
item |
protected HasMetadataOperation<T,?,?> |
operation |
| Constructor and Description |
|---|
NamespaceableResourceAdapter(T item,
HasMetadataOperation<T,?,?> op) |
| Modifier and Type | Method and Description |
|---|---|
Resource<T> |
inNamespace(String name) |
accept, create, create, createOr, createOrReplace, createOrReplace, delete, delete, dryRun, dryRun, edit, edit, edit, editStatus, fieldManager, fieldValidation, forceConflicts, fromServer, get, getResource, inform, inform, inform, informOnCondition, isReady, item, lockResourceVersion, lockResourceVersion, patch, patch, patch, patch, patch, patch, patchStatus, patchStatus, replace, replace, replaceStatus, replaceStatus, require, runnableInformer, scale, scale, scale, scale, serverSideApply, unlock, update, updateStatus, updateStatus, waitUntilCondition, waitUntilReady, watch, watch, watch, withGracePeriod, withIndexers, withLimit, withPropagationPolicy, withResourceVersion, withTimeout, withTimeoutInMillisclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcascading, isReady, item, lockResourceVersion, lockResourceVersion, requirescale, scale, scale, scalefromServerwithResourceVersionwaitUntilCondition, waitUntilReadycreateOr, unlockcreate, createOrReplaceaccept, edit, edit, edit, editStatus, patch, patch, patch, patch, patch, patch, patchStatusreplace, replaceStatus, update, updateStatuscreate, createOrReplace, delete, patchStatus, updateStatuswithGracePeriodwithPropagationPolicydelete, withTimeout, withTimeoutInMillisreplace, replaceStatusfieldManager, forceConflicts, serverSideApplyfieldValidationdryRun, dryRuninform, inform, inform, informOnCondition, runnableInformer, withIndexers, withLimitprotected final T extends io.fabric8.kubernetes.api.model.HasMetadata item
protected final HasMetadataOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata,?,?> operation
public NamespaceableResourceAdapter(T item, HasMetadataOperation<T,?,?> op)
public Resource<T> inNamespace(String name)
inNamespace in interface NamespaceableResource<T extends io.fabric8.kubernetes.api.model.HasMetadata>Copyright © 2015–2023 Red Hat. All rights reserved.