public class PreferenceTransitionProvider extends java.lang.Object implements ViewTransitionProvider<PreferenceAction,AbstractSetting>, IndexTransitionProvider<PreferenceAction,AbstractSetting>
| Modifier and Type | Class and Description |
|---|---|
class |
PreferenceTransitionProvider.ClearPreferenceTransition |
class |
PreferenceTransitionProvider.IndexResult |
class |
PreferenceTransitionProvider.IndexTransition |
class |
PreferenceTransitionProvider.Linker |
class |
PreferenceTransitionProvider.SetFeatureTransition |
class |
PreferenceTransitionProvider.SetPreferenceTransition |
| Constructor and Description |
|---|
PreferenceTransitionProvider(AppContext conn,
java.lang.String target) |
| Modifier and Type | Method and Description |
|---|---|
<R> R |
accept(TransitionFactoryVisitor<R,AbstractSetting,PreferenceAction> vis)
Accept a
TransitionFactoryVisitor. |
void |
addTable(Table t,
AbstractSetting target) |
boolean |
allowTransition(AppContext c,
AbstractSetting target,
PreferenceAction key)
Access control check.
|
boolean |
canView(AbstractSetting target,
SessionService<?> sess)
Can the current person view this target
|
<X extends ContentBuilder> |
getBottomContent(X cb,
AbstractSetting target,
SessionService<?> sess)
Get the content to be displayed at the bottom of the target page.
|
AppContext |
getContext() |
java.lang.String |
getHelp(PreferenceAction key)
Get tooltip help string for an operation
|
java.lang.String |
getID(AbstractSetting target)
Get the id string for form posts from a target
|
Table |
getIndexTable(SessionService sess) |
PreferenceAction |
getIndexTransition()
Get the key for the default index transition.
|
<X extends ContentBuilder> |
getLogContent(X cb,
AbstractSetting target,
SessionService<?> sess)
Get the content to be displayed on the view target page as part of the target pane.
|
<X extends ContentBuilder> |
getSummaryContent(AppContext c,
X cb,
AbstractSetting target)
Get target summary to be shown on transition page.
|
AbstractSetting |
getTarget(java.lang.String id)
Find target type by id string
|
java.lang.String |
getTargetName()
What is the name for this type of transition.
|
java.lang.String |
getText(PreferenceAction key)
get custom button content.
|
<X extends ContentBuilder> |
getTopContent(X cb,
AbstractSetting target,
SessionService<?> sess)
Get the content to be displayed at the top of the target page.
|
Transition<AbstractSetting> |
getTransition(AbstractSetting target,
PreferenceAction key)
Find a transition operator for this type by key.
|
java.util.Set<PreferenceAction> |
getTransitions(AbstractSetting target)
Get a list of all the transition keys supported by the target type to be presented to the user
as a set of possible options in a view transition.
|
PreferenceAction |
lookupTransition(AbstractSetting target,
java.lang.String name)
Lookup a transition key by String
This has to be the same as the result of the toString method
on the key as this is what is passed from transitions.jsp for a form transition.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitshowTransitionpublic PreferenceTransitionProvider(AppContext conn, java.lang.String target)
conn - target - public java.util.Set<PreferenceAction> getTransitions(AbstractSetting target)
TransitionFactoryTransitionFactory.allowTransition(AppContext, Object, Object) will not be presented.
Additional hidden operations may also be supported but these will never be presented to the user
as options and can only generated as a ChainedTransitionResult.
In most cases the transition set will be the same for all null/non-null targets
though in principal dynamic transitions could be generated based on the state of the target e.g. a parameterised
transition with the parameter encoded in the key.getTransitions in interface TransitionFactory<PreferenceAction,AbstractSetting>public Transition<AbstractSetting> getTransition(AbstractSetting target, PreferenceAction key)
TransitionFactorygetTransition in interface TransitionFactory<PreferenceAction,AbstractSetting>target - target (may be null)key - keypublic PreferenceAction lookupTransition(AbstractSetting target, java.lang.String name)
TransitionFactorylookupTransition in interface TransitionFactory<PreferenceAction,AbstractSetting>target - (may be null)public java.lang.String getTargetName()
TransitionFactoryTransitionServlet
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<PreferenceAction,AbstractSetting>public boolean allowTransition(AppContext c, AbstractSetting target, PreferenceAction key)
TransitionFactoryallowTransition in interface TransitionFactory<PreferenceAction,AbstractSetting>c - AppContexttarget - target objectkey - identifying key object for transitionpublic Table getIndexTable(SessionService sess)
public void addTable(Table t, AbstractSetting target)
public <X extends ContentBuilder> X getSummaryContent(AppContext c, X cb, AbstractSetting target)
TransitionFactorygetSummaryContent in interface TransitionFactory<PreferenceAction,AbstractSetting>c - AppContextcb - ContentBuilderpublic <R> R accept(TransitionFactoryVisitor<R,AbstractSetting,PreferenceAction> vis)
TransitionFactoryTransitionFactoryVisitor.
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<PreferenceAction,AbstractSetting>accept in interface TransitionProvider<PreferenceAction,AbstractSetting>public AppContext getContext()
getContext in interface Contexedpublic boolean canView(AbstractSetting target, SessionService<?> sess)
ViewTransitionFactorycanView in interface ViewTransitionFactory<PreferenceAction,AbstractSetting>public <X extends ContentBuilder> X getTopContent(X cb, AbstractSetting target, SessionService<?> sess)
ViewTransitionFactorygetTopContent in interface ViewTransitionFactory<PreferenceAction,AbstractSetting>public <X extends ContentBuilder> X getBottomContent(X cb, AbstractSetting target, SessionService<?> sess)
ViewTransitionFactorygetBottomContent in interface ViewTransitionFactory<PreferenceAction,AbstractSetting>public <X extends ContentBuilder> X getLogContent(X cb, AbstractSetting target, SessionService<?> sess)
ViewTransitionFactorygetLogContent in interface ViewTransitionFactory<PreferenceAction,AbstractSetting>public java.lang.String getHelp(PreferenceAction key)
ViewTransitionFactorygetHelp in interface ViewTransitionFactory<PreferenceAction,AbstractSetting>public java.lang.String getText(PreferenceAction key)
ViewTransitionFactorygetText in interface ViewTransitionFactory<PreferenceAction,AbstractSetting>public AbstractSetting getTarget(java.lang.String id)
TransitionProvidergetTarget in interface TransitionProvider<PreferenceAction,AbstractSetting>public java.lang.String getID(AbstractSetting target)
TransitionProvidergetID in interface TransitionProvider<PreferenceAction,AbstractSetting>public PreferenceAction getIndexTransition()
IndexTransitionFactorygetIndexTransition in interface IndexTransitionFactory<PreferenceAction,AbstractSetting>