D
- Represents the descriptor type. This is Descriptor<T>
normally but often there are subtypes
of descriptors, like ViewDescriptor
, NodeDescriptor
, etc, and this parameter points
to those for better type safety of users.
The actual value of 'D' is not necessary for the operation of this code, so it's purely for convenience
of the users of this class.public class DescriptorExtensionList<T extends Describable<T>,D extends Descriptor<T>> extends ExtensionList<D>
ExtensionList
for holding a set of Descriptor
s, which is a group of descriptors for
the same extension point.
Use Jenkins.getDescriptorList(Class)
to obtain instances.extensionType, hudson, jenkins
modCount
Modifier | Constructor and Description |
---|---|
protected |
DescriptorExtensionList(Hudson hudson,
Class<T> describableType)
Deprecated.
as of 1.416
Use
DescriptorExtensionList(Jenkins, Class) |
protected |
DescriptorExtensionList(Jenkins jenkins,
Class<T> describableType) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(D d)
Write access will put the instance into a legacy store.
|
static void |
clearLegacyInstances()
Exposed just for the test harness.
|
static <T extends Describable<T>,D extends Descriptor<T>> |
createDescriptorList(Hudson hudson,
Class<T> describableType)
Deprecated.
as of 1.416
Use
ExtensionList.create(Jenkins, Class) |
static <T extends Describable<T>,D extends Descriptor<T>> |
createDescriptorList(Jenkins jenkins,
Class<T> describableType)
Creates a new instance.
|
D |
find(Class<? extends T> type)
Finds the descriptor that describes the given type.
|
D |
find(String fqcn)
Deprecated.
Descriptor.getId() is supposed to be used for new code, not the descriptor class name. |
D |
findByName(String id)
Finds a descriptor by their
Descriptor.getId() . |
protected Object |
getLoadLock()
load() in the descriptor is not a real load activity, so locking against "this" is enough. |
static Iterable<Descriptor> |
listLegacyInstances()
List up all the legacy instances currently in use.
|
protected List<ExtensionComponent<D>> |
load()
Loading the descriptors in this case means filtering the descriptor from the master
ExtensionList . |
protected Collection<ExtensionComponent<D>> |
load(ExtensionComponentSet delta)
Picks up extensions that we care from the given list.
|
T |
newInstanceFromRadioList(net.sf.json.JSONObject config)
Creates a new instance of a
Describable from the structured form submission data posted by a radio button group. |
T |
newInstanceFromRadioList(net.sf.json.JSONObject parent,
String name)
Creates a new instance of a
Describable from the structured form submission data posted by a radio list. |
boolean |
remove(Object o) |
add, addListener, create, create, get, get, getComponents, getDynamic, getInstance, iterator, lookup, lookupSingleton, refresh, remove, removeAll, reverseView, size, sort
addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, removeRange, set, subList
addAll, contains, containsAll, isEmpty, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, contains, containsAll, isEmpty, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
@Deprecated protected DescriptorExtensionList(Hudson hudson, Class<T> describableType)
DescriptorExtensionList(Jenkins, Class)
public static <T extends Describable<T>,D extends Descriptor<T>> DescriptorExtensionList<T,D> createDescriptorList(Jenkins jenkins, Class<T> describableType)
@Deprecated public static <T extends Describable<T>,D extends Descriptor<T>> DescriptorExtensionList<T,D> createDescriptorList(Hudson hudson, Class<T> describableType)
ExtensionList.create(Jenkins, Class)
@Deprecated public D find(String fqcn)
Descriptor.getId()
is supposed to be used for new code, not the descriptor class name.fqcn
- Fully qualified name of the descriptor, not the describable.public D find(Class<? extends T> type)
d.clazz==type
@CheckForNull public T newInstanceFromRadioList(net.sf.json.JSONObject config) throws Descriptor.FormException
Describable
from the structured form submission data posted by a radio button group.config
- Submitted configuration for Radio Listnull
if none was selected in the radio list or if the value is filtered by a DescriptorVisibilityFilter
Descriptor.FormException
- Data submission error@CheckForNull public T newInstanceFromRadioList(@NonNull net.sf.json.JSONObject parent, @NonNull String name) throws Descriptor.FormException
Describable
from the structured form submission data posted by a radio list.name
- Name of the form fieldnull
if none was selected in the radio list or if the value is filtered by a DescriptorVisibilityFilter
Descriptor.FormException
- Data submission error@CheckForNull public D findByName(String id)
Descriptor.getId()
.
If none is found, null is returned.public boolean add(D d)
ExtensionList
add
in interface Collection<D extends Descriptor<T>>
add
in interface List<D extends Descriptor<T>>
add
in class ExtensionList<D extends Descriptor<T>>
public boolean remove(Object o)
remove
in interface Collection<D extends Descriptor<T>>
remove
in interface List<D extends Descriptor<T>>
remove
in class ExtensionList<D extends Descriptor<T>>
protected Object getLoadLock()
load()
in the descriptor is not a real load activity, so locking against "this" is enough.getLoadLock
in class ExtensionList<D extends Descriptor<T>>
protected List<ExtensionComponent<D>> load()
ExtensionList
.load
in class ExtensionList<D extends Descriptor<T>>
protected Collection<ExtensionComponent<D>> load(ExtensionComponentSet delta)
ExtensionList
load
in class ExtensionList<D extends Descriptor<T>>
public static Iterable<Descriptor> listLegacyInstances()
public static void clearLegacyInstances()
Copyright © 2004–2022. All rights reserved.