//# 0 errors, 33 messages
//#
/*
    //#blogsview.java:1:1: class: net.sourceforge.pebble.web.view.impl.BlogsView
    //#blogsview.java:1:1: method: net.sourceforge.pebble.web.view.impl.BlogsView.net.sourceforge.pebble.web.view.impl.BlogsView__static_init
 * Copyright (c) 2003-2006, Simon Brown
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in
 *     the documentation and/or other materials provided with the
 *     distribution.
 *
 *   - Neither the name of Pebble nor the names of its contributors may
 *     be used to endorse or promote products derived from this software
 *     without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
package net.sourceforge.pebble.web.view.impl;

import net.sourceforge.pebble.comparator.BlogByIdComparator;
import net.sourceforge.pebble.web.view.HtmlView;

import java.util.Collections;
import java.util.List;

/**
 * Represents the page showing a list of blogs (in multi-blog mode).
 *
 * @author    Simon Brown
 */
public class BlogsView extends HtmlView {
    //#blogsview.java:45: method: void net.sourceforge.pebble.web.view.impl.BlogsView.net.sourceforge.pebble.web.view.impl.BlogsView()
    //#blogsview.java:45: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.web.view.HtmlView()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.view.impl.BlogsView
    //#    method: void net.sourceforge.pebble.web.view.impl.BlogsView()
    //#    unanalyzed callee: void net.sourceforge.pebble.web.view.HtmlView()
    //#input(void net.sourceforge.pebble.web.view.impl.BlogsView()): this
    //#blogsview.java:45: end of method: void net.sourceforge.pebble.web.view.impl.BlogsView.net.sourceforge.pebble.web.view.impl.BlogsView()

  /**
   * Prepares the view for presentation.
   */
  public void prepare() {
    List blogs = (List)getModel().get("blogs");
    //#blogsview.java:51: method: void net.sourceforge.pebble.web.view.impl.BlogsView.prepare()
    //#blogsview.java:51: Warning: method not available
    //#    -- call on Model net.sourceforge.pebble.web.view.impl.BlogsView:getModel()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.view.impl.BlogsView
    //#    method: void prepare()
    //#    unanalyzed callee: Model net.sourceforge.pebble.web.view.impl.BlogsView:getModel()
    //#blogsview.java:51: Warning: method not available
    //#    -- call on Object net.sourceforge.pebble.web.model.Model:get(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.view.impl.BlogsView
    //#    method: void prepare()
    //#    unanalyzed callee: Object net.sourceforge.pebble.web.model.Model:get(String)
    //#input(void prepare()): this
    //#presumption(void prepare()): net.sourceforge.pebble.web.view.impl.BlogsView:getModel(...)@51 != null
    Collections.sort(blogs, new BlogByIdComparator());
    //#blogsview.java:52: Warning: method not available
    //#    -- call on void net.sourceforge.pebble.comparator.BlogByIdComparator()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.view.impl.BlogsView
    //#    method: void prepare()
    //#    unanalyzed callee: void net.sourceforge.pebble.comparator.BlogByIdComparator()
  }
    //#blogsview.java:53: end of method: void net.sourceforge.pebble.web.view.impl.BlogsView.prepare()

  /**
   * Gets the title of this view.
   *
   * @return the title as a String
   */
  public String getTitle() {
	return getLocalizedString("view.blogs");
    //#blogsview.java:61: method: String net.sourceforge.pebble.web.view.impl.BlogsView.getTitle()
    //#blogsview.java:61: Warning: method not available
    //#    -- call on String net.sourceforge.pebble.web.view.impl.BlogsView:getLocalizedString(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.web.view.impl.BlogsView
    //#    method: String getTitle()
    //#    unanalyzed callee: String net.sourceforge.pebble.web.view.impl.BlogsView:getLocalizedString(String)
    //#input(String getTitle()): this
    //#output(String getTitle()): return_value
    //#post(String getTitle()): init'ed(return_value)
    //#blogsview.java:61: end of method: String net.sourceforge.pebble.web.view.impl.BlogsView.getTitle()
  }

  /**
   * Gets the URI that this view represents.
   *
   * @return the URI as a String
   */
  public String getUri() {
    return "/WEB-INF/jsp/viewBlogs.jsp";
    //#blogsview.java:70: method: String net.sourceforge.pebble.web.view.impl.BlogsView.getUri()
    //#output(String getUri()): return_value
    //#post(String getUri()): return_value == &".WEB-INF.jsp.viewBlogs.jsp"
    //#blogsview.java:70: end of method: String net.sourceforge.pebble.web.view.impl.BlogsView.getUri()
  }

}    //#output(net.sourceforge.pebble.web.view.impl.BlogsView__static_init): __Descendant_Table[net/sourceforge/pebble/web/view/impl/BlogsView]
    //#output(net.sourceforge.pebble.web.view.impl.BlogsView__static_init): __Dispatch_Table.getTitle()Ljava/lang/String;
    //#output(net.sourceforge.pebble.web.view.impl.BlogsView__static_init): __Dispatch_Table.getUri()Ljava/lang/String;
    //#output(net.sourceforge.pebble.web.view.impl.BlogsView__static_init): __Dispatch_Table.prepare()V
    //#post(net.sourceforge.pebble.web.view.impl.BlogsView__static_init): __Descendant_Table[net/sourceforge/pebble/web/view/impl/BlogsView] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.web.view.impl.BlogsView__static_init): __Dispatch_Table.getTitle()Ljava/lang/String; == &getTitle
    //#post(net.sourceforge.pebble.web.view.impl.BlogsView__static_init): __Dispatch_Table.getUri()Ljava/lang/String; == &getUri
    //#post(net.sourceforge.pebble.web.view.impl.BlogsView__static_init): __Dispatch_Table.prepare()V == &prepare
    //#blogsview.java:: end of method: net.sourceforge.pebble.web.view.impl.BlogsView.net.sourceforge.pebble.web.view.impl.BlogsView__static_init
    //#blogsview.java:: end of class: net.sourceforge.pebble.web.view.impl.BlogsView
