Class ViewManager
- java.lang.Object
-
- org.shredzone.commons.view.manager.ViewManager
-
@Component @ParametersAreNonnullByDefault public class ViewManager extends Object
Manages the view handlers.- Author:
- Richard "Shred" Körber
-
-
Constructor Summary
Constructors Constructor Description ViewManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ViewPattern
getViewPatternForSignature(Signature signature, String qualifier)
Returns theViewPattern
that handles the givenSignature
.Collection<ViewPattern>
getViewPatterns()
Returns a collection of all definedViewPattern
.Collection<ViewPattern>
getViewPatternsForView(String view, String qualifier)
Returns a collection ofViewPattern
that were defined for the given view.protected void
setup()
Sets up the view manager.
-
-
-
Constructor Detail
-
ViewManager
public ViewManager()
-
-
Method Detail
-
getViewPatterns
@Nonnull public Collection<ViewPattern> getViewPatterns()
Returns a collection of all definedViewPattern
.- Returns:
- Collection of matching
ViewPattern
-
getViewPatternsForView
@Nonnull public Collection<ViewPattern> getViewPatternsForView(String view, @Nullable String qualifier)
Returns a collection ofViewPattern
that were defined for the given view.- Parameters:
view
- View namequalifier
- Qualifier name, ornull
- Returns:
- Collection of matching
ViewPattern
, empty if there is no such view
-
getViewPatternForSignature
public ViewPattern getViewPatternForSignature(Signature signature, @Nullable String qualifier)
Returns theViewPattern
that handles the givenSignature
.- Parameters:
signature
-Signature
to find aViewPattern
forqualifier
- Qualifier name, ornull
- Returns:
ViewPattern
found, ornull
if there is no suchViewPattern
-
setup
@PostConstruct protected void setup()
Sets up the view manager. All Spring beans are searched forViewHandler
annotations.
-
-