public abstract class ObjectComponent<T extends AbstractModelObject> extends Component implements Describable<ObjectComponent<T>>, ExtensionPoint
This is the unit of user consent; when creating a bundle for this object, the user would enable/disable individual components.
ExtensionPoint.LegacyInstancesAreScopedToHudson
Constructor and Description |
---|
ObjectComponent() |
Modifier and Type | Method and Description |
---|---|
void |
addContents(Container container)
Add contents to a container
|
abstract void |
addContents(Container container,
T item)
Add contents from a specific item to a container
|
static <T extends AbstractModelObject> |
allInstances(T item)
All applicable
ObjectComponent s for the class. |
static <T extends AbstractModelObject> |
for_(T item)
All applicable
ObjectComponentDescriptor s for the class. |
ObjectComponentDescriptor<T> |
getDescriptor() |
<C extends AbstractModelObject> |
isApplicable(Class<C> clazz)
Return if this component is applicable to a specific class of item.
|
protected boolean |
isApplicable(T item)
Return if this component is applicable to a specific item.
|
boolean |
isSelectedByDefault(T item)
Control if the component should be selected by default, based on the applicable item
|
getDisplayName, getDisplayPermissions, getId, getRequiredPermissions, isEnabled, isSelectedByDefault, start
public ObjectComponentDescriptor<T> getDescriptor()
getDescriptor
in interface Describable<ObjectComponent<T extends AbstractModelObject>>
public void addContents(@NonNull Container container)
addContents
in class Component
container
- a Container
public abstract void addContents(@NonNull Container container, @NonNull T item)
container
- the Container
item
- the itempublic static <T extends AbstractModelObject> List<ObjectComponent<T>> allInstances(T item)
ObjectComponent
s for the class.public static <T extends AbstractModelObject> List<ObjectComponentDescriptor<T>> for_(T item)
ObjectComponentDescriptor
s for the class.public <C extends AbstractModelObject> boolean isApplicable(Class<C> clazz)
isApplicable
in class Component
C
- Object that extends AbstractModelObject
clazz
- the classtrue
if applicable to this classprotected boolean isApplicable(T item)
item
- the itempublic boolean isSelectedByDefault(T item)
item
- the itemCopyright © 2016–2022. All rights reserved.