Class ItemGroupModifier.StandardModifier
java.lang.Object
com.cloudbees.hudson.plugins.folder.relocate.ItemGroupModifier.StandardModifier
- All Implemented Interfaces:
ItemGroupModifier<DirectlyModifiableTopLevelItemGroup,
,TopLevelItem> ExtensionPoint
- Enclosing interface:
- ItemGroupModifier<G extends ItemGroup<I>,
I extends TopLevelItem>
@Extension
public static final class ItemGroupModifier.StandardModifier
extends Object
implements ItemGroupModifier<DirectlyModifiableTopLevelItemGroup,TopLevelItem>
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Nested classes/interfaces inherited from interface com.cloudbees.hudson.plugins.folder.relocate.ItemGroupModifier
ItemGroupModifier.Factory, ItemGroupModifier.StandardModifier
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<II extends TopLevelItem>
IIadd
(DirectlyModifiableTopLevelItemGroup target, II item) Adds an item to the target.<II extends TopLevelItem>
booleancanAdd
(DirectlyModifiableTopLevelItemGroup target, II item) Returnstrue
if the target can take the item.The type of group that this modifier works on.void
remove
(DirectlyModifiableTopLevelItemGroup target, TopLevelItem item) Removes an item from the target.
-
Constructor Details
-
StandardModifier
public StandardModifier()
-
-
Method Details
-
getTargetClass
Description copied from interface:ItemGroupModifier
The type of group that this modifier works on.- Specified by:
getTargetClass
in interfaceItemGroupModifier<DirectlyModifiableTopLevelItemGroup,
TopLevelItem> - Returns:
- the type of group that this modifier works on.
-
canAdd
public <II extends TopLevelItem> boolean canAdd(DirectlyModifiableTopLevelItemGroup target, II item) Description copied from interface:ItemGroupModifier
Returnstrue
if the target can take the item.- Specified by:
canAdd
in interfaceItemGroupModifier<DirectlyModifiableTopLevelItemGroup,
TopLevelItem> - Type Parameters:
II
- the type of the item.- Parameters:
target
- the target.item
- the item.- Returns:
true
if the target can take the item.
-
add
public <II extends TopLevelItem> II add(DirectlyModifiableTopLevelItemGroup target, II item) throws IOException Description copied from interface:ItemGroupModifier
Adds an item to the target.- Specified by:
add
in interfaceItemGroupModifier<DirectlyModifiableTopLevelItemGroup,
TopLevelItem> - Type Parameters:
II
- the type of the item.- Parameters:
target
- the target.item
- the item- Returns:
- the item instance within the target, may be the same instance as the passed in parameter or may be a new instance, depending on the target container.
- Throws:
IOException
- if the addition could not be completed.
-
remove
public void remove(DirectlyModifiableTopLevelItemGroup target, TopLevelItem item) throws IOException Description copied from interface:ItemGroupModifier
Removes an item from the target.- Specified by:
remove
in interfaceItemGroupModifier<DirectlyModifiableTopLevelItemGroup,
TopLevelItem> - Parameters:
target
- the target.item
- the item- Throws:
IOException
- if the removal could not be completed.
-