T
- target typeK
- public abstract class AbstractIndexedTransitionProvider<T extends Indexed,K> extends AbstractContexed implements TransitionProvider<K,T>
TransitionProvider
s on Indexed
objects.
unlike SimpleTransitionProvider
this makes no assumption about the type used as the keyModifier and Type | Field and Description |
---|---|
static Feature |
USE_NAME_PARSER |
conn
Constructor and Description |
---|
AbstractIndexedTransitionProvider(AppContext c,
IndexedProducer<? extends T> fac,
java.lang.String target_name) |
Modifier and Type | Method and Description |
---|---|
<R> R |
accept(TransitionFactoryVisitor<R,T,K> vis)
Accept a
TransitionFactoryVisitor . |
java.lang.String |
getID(T target)
Get the id string for form posts from a target
|
static <T extends Indexed> |
getIndexedID(AppContext c,
IndexedProducer<? extends T> fac,
T target)
default rule for generating an ID string for and
Indexed |
static <T extends Indexed> |
getIndexedTarget(AppContext c,
IndexedProducer<? extends T> fac,
java.lang.String id)
default rule for generating an
Indexed from a String. |
IndexedProducer<? extends T> |
getProducer() |
T |
getTarget(java.lang.String id)
Find target type by id string
|
java.lang.String |
getTargetName()
What is the name for this type of transition.
|
getContext, getLogger, resetLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
allowTransition, getSummaryContent, getTransition, getTransitions, lookupTransition
getContext
public static final Feature USE_NAME_PARSER
public AbstractIndexedTransitionProvider(AppContext c, IndexedProducer<? extends T> fac, java.lang.String target_name)
public final java.lang.String getID(T target)
TransitionProvider
getID
in interface TransitionProvider<K,T extends Indexed>
public static <T extends Indexed> java.lang.String getIndexedID(AppContext c, IndexedProducer<? extends T> fac, T target)
Indexed
target
- public final IndexedProducer<? extends T> getProducer()
public final T getTarget(java.lang.String id)
TransitionProvider
getTarget
in interface TransitionProvider<K,T extends Indexed>
public static <T extends Indexed> T getIndexedTarget(AppContext c, IndexedProducer<? extends T> fac, java.lang.String id)
Indexed
from a String.id
- public final java.lang.String getTargetName()
TransitionFactory
TransitionServlet
The value can also be used as the user presented text for the type of object
in the title of the transition form page though this can be overridden by setting
target-name.transition_titlegetTargetName
in interface TransitionFactory<K,T extends Indexed>
public final <R> R accept(TransitionFactoryVisitor<R,T,K> vis)
TransitionFactory
TransitionFactoryVisitor
.
Any code that depends on
the particular sub-interface of TransitionFactory
should implement TransitionFactoryVisitor
this ensures it will always
handle all possible sub-classes.accept
in interface TransitionFactory<K,T extends Indexed>
accept
in interface TransitionProvider<K,T extends Indexed>