public abstract class StrolchPolicy extends Object
PolicyHandler| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
StrolchPolicy(ComponentContainer container,
StrolchTransaction tx)
Instantiate a new
Command |
| Modifier and Type | Method and Description |
|---|---|
protected <V> V |
getComponent(Class<V> clazz)
Allows the concrete
Command implementation access to StrolchComponents at
runtime |
protected ComponentContainer |
getContainer() |
protected Resource |
getResource(Action action)
|
protected StrolchTransaction |
tx()
Returns the
StrolchTransaction bound to this Command's runtime |
abstract void |
undo() |
public StrolchPolicy(ComponentContainer container, StrolchTransaction tx)
Commandcontainer - the ComponentContainer to access components at runtimetx - protected <V> V getComponent(Class<V> clazz) throws IllegalArgumentException
Command implementation access to StrolchComponents at
runtimeclazz - the type of component to be returnedClass which is registered on the ComponentContainerIllegalArgumentException - if the component with the given class does not existprotected ComponentContainer getContainer()
protected StrolchTransaction tx()
StrolchTransaction bound to this Command's runtimeStrolchTransaction bound to this Command's runtimeprotected Resource getResource(Action action) throws IllegalArgumentException, StrolchException
action - the action for which to get the ResourceResourceIllegalArgumentException - if the resource is not defined on the action, i.e. fields are empty or a dashStrolchException - if the resource does not exist, which is referenced by the actionpublic abstract void undo()
Command.undo()Copyright © 2011–2016 Strolch. All rights reserved.