Class DefaultGalleryViewController
- java.lang.Object
-
- it.tidalwave.northernwind.frontend.ui.component.nodecontainer.DefaultNodeContainerViewController
-
- it.tidalwave.northernwind.frontend.ui.component.gallery.DefaultGalleryViewController
-
- All Implemented Interfaces:
GalleryViewController
,NodeContainerViewController
,ViewController
- Direct Known Subclasses:
HtmlTemplateGalleryViewController
public class DefaultGalleryViewController extends DefaultNodeContainerViewController implements GalleryViewController
- Author:
- Fabrizio Giudici
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface it.tidalwave.northernwind.frontend.ui.component.gallery.GalleryViewController
GalleryViewController.GalleryItem
-
-
Field Summary
Fields Modifier and Type Field Description protected GalleryAdapter
galleryAdapter
protected java.util.Map<it.tidalwave.util.Id,GalleryViewController.GalleryItem>
itemMapById
protected java.util.List<GalleryViewController.GalleryItem>
items
-
Fields inherited from interface it.tidalwave.northernwind.frontend.ui.component.nodecontainer.NodeContainerViewController
P_INLINED_SCRIPTS, P_PRINT_STYLE_SHEETS, P_RSS_FEEDS, P_SCREEN_STYLE_SHEETS, P_SCRIPTS, P_TITLE_PREFIX, PD_ID, PD_IMAGE_ID, PD_TITLE, PD_URL
-
-
Constructor Summary
Constructors Constructor Description DefaultGalleryViewController(NodeContainerView view, SiteNode siteNode, RequestLocaleManager requestLocaleManager, org.springframework.beans.factory.BeanFactory beanFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description it.tidalwave.util.Finder<SiteNode>
findVirtualSiteNodes()
Controllers which manage composite site nodes must override this method and return a collection ofSiteNode
s, one for each composite content.void
initialize()
Initializes the component.-
Methods inherited from class it.tidalwave.northernwind.frontend.ui.component.nodecontainer.DefaultNodeContainerViewController
computeInlinedScriptsSection, getViewProperties, renderView
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface it.tidalwave.northernwind.frontend.ui.ViewController
prepareRendering, renderView
-
-
-
-
Field Detail
-
galleryAdapter
@Nonnull protected GalleryAdapter galleryAdapter
-
items
protected final java.util.List<GalleryViewController.GalleryItem> items
-
itemMapById
protected final java.util.Map<it.tidalwave.util.Id,GalleryViewController.GalleryItem> itemMapById
-
-
Constructor Detail
-
DefaultGalleryViewController
public DefaultGalleryViewController(@Nonnull NodeContainerView view, @Nonnull SiteNode siteNode, @Nonnull RequestLocaleManager requestLocaleManager, @Nonnull org.springframework.beans.factory.BeanFactory beanFactory)
-
-
Method Detail
-
initialize
public void initialize() throws java.lang.Exception
Initializes the component. If the class has a superclass, remember to callsuper.initialize()
. This method must execute quickly, as it is called whenever a new instance is created - consider that some components, such as the one rendering a site map, are likely to instantiate lots of controllers.- Specified by:
initialize
in interfaceViewController
- Throws:
java.lang.Exception
- in case of problems
-
findVirtualSiteNodes
@Nonnull public it.tidalwave.util.Finder<SiteNode> findVirtualSiteNodes()
Controllers which manage composite site nodes must override this method and return a collection ofSiteNode
s, one for each composite content. For instance, the controller of a gallery should return the relative paths of all the media pages in the gallery; the controller of a blog should return the relative paths of all the posts. SeeVirtualSiteNode
for a convenient implementation ofSiteNode
to return.- Specified by:
findVirtualSiteNodes
in interfaceViewController
- Returns:
- the virtual nodes
- See Also:
VirtualSiteNode
-
-