Package net.tinyportal.portlet

Source Code of net.tinyportal.portlet.ListAllPortlet

/*
    This file is part of tPortal.

    tPortal is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    tPortal is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with tPortal.  If not, see <http://www.gnu.org/licenses/>.

    The original code was written by Sebastien Bettinger <sebastien.bettinger@gmail.com>

*/

package net.tinyportal.portlet;

import java.io.IOException;
import java.util.Set;

import javax.portlet.GenericPortlet;
import javax.portlet.PortletException;
import javax.portlet.PortletRequestDispatcher;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;

import net.tinyportal.servlet.Portal;

import org.apache.log4j.Logger;

public class ListAllPortlet extends GenericPortlet {
  private static final Logger logger = Logger.getLogger(ListAllPortlet.class);

  public void doView(RenderRequest request,RenderResponse response)
      throws PortletException,IOException {
    Set<String> portlets = Portal.getPortletSet();

    request.setAttribute("portlets", portlets);
    PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/WEB-INF/jsp/view.jsp");
    dispatcher.include(request, response);
  }
}
TOP

Related Classes of net.tinyportal.portlet.ListAllPortlet

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.