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.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface com.cloudbees.hudson.plugins.folder.relocate.ItemGroupModifier
ItemGroupModifier.Factory, ItemGroupModifier.StandardModifier -
Constructor Summary
Constructors -
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) Returnstrueif the target can take the item.The type of group that this modifier works on.voidremove(DirectlyModifiableTopLevelItemGroup target, TopLevelItem item) Removes an item from the target.
-
Constructor Details
-
StandardModifier
public StandardModifier()
-
-
Method Details
-
getTargetClass
Description copied from interface:ItemGroupModifierThe type of group that this modifier works on.- Specified by:
getTargetClassin 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:ItemGroupModifierReturnstrueif the target can take the item.- Specified by:
canAddin interfaceItemGroupModifier<DirectlyModifiableTopLevelItemGroup,TopLevelItem> - Type Parameters:
II- the type of the item.- Parameters:
target- the target.item- the item.- Returns:
trueif the target can take the item.
-
add
public <II extends TopLevelItem> II add(DirectlyModifiableTopLevelItemGroup target, II item) throws IOException Description copied from interface:ItemGroupModifierAdds an item to the target.- Specified by:
addin 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:ItemGroupModifierRemoves an item from the target.- Specified by:
removein interfaceItemGroupModifier<DirectlyModifiableTopLevelItemGroup,TopLevelItem> - Parameters:
target- the target.item- the item- Throws:
IOException- if the removal could not be completed.
-