Package org.dspace.app.itemupdate
Class ActionManager
- java.lang.Object
-
- org.dspace.app.itemupdate.ActionManager
-
- All Implemented Interfaces:
Iterable<UpdateAction>
public class ActionManager extends Object implements Iterable<UpdateAction>
Container for UpdateActions Order of actions is very import for correct processing. This implementation supports an iterator that returns the actions in the order in which they are put in. Adding the same action a second time has no effect on this order.
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<Class<? extends UpdateAction>,UpdateAction>registry
-
Constructor Summary
Constructors Constructor Description ActionManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UpdateActiongetUpdateAction(Class<? extends UpdateAction> actionClass)Get update action.booleanhasActions()Iterator<UpdateAction>iterator()This implementation guarantees the iterator order is the same as the order in which updateActions have been added-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
registry
protected Map<Class<? extends UpdateAction>,UpdateAction> registry
-
-
Method Detail
-
getUpdateAction
public UpdateAction getUpdateAction(Class<? extends UpdateAction> actionClass) throws InstantiationException, IllegalAccessException, NoSuchMethodException, IllegalArgumentException, InvocationTargetException
Get update action.- Parameters:
actionClass- UpdateAction class- Returns:
- instantiation of UpdateAction class
- Throws:
InstantiationException- if instantiation errorIllegalAccessException- if illegal access errorNoSuchMethodException- passed through.InvocationTargetException- passed through.IllegalArgumentException
-
hasActions
public boolean hasActions()
- Returns:
- whether any actions have been registered with this manager
-
iterator
public Iterator<UpdateAction> iterator()
This implementation guarantees the iterator order is the same as the order in which updateActions have been added- Specified by:
iteratorin interfaceIterable<UpdateAction>- Returns:
- iterator for UpdateActions
-
-