Package com.dotmarketing.business.portal

Examples of com.dotmarketing.business.portal.PortletAPI


   * @throws DotRuntimeException
   * @throws PortalException
   */
  public List<Map<String, Object>> getAllAvailablePortletInfoList() throws SystemException, LanguageException, DotRuntimeException, PortalException {

    PortletAPI portletAPI = APILocator.getPortletAPI();
    UserWebAPI uWebAPI = WebAPILocator.getUserWebAPI();
    WebContext ctx = WebContextFactory.get();
    HttpServletRequest request = ctx.getHttpServletRequest();

    List<Map<String, Object>> listOfPortletsInfo = new ArrayList<Map<String,Object>>();

    List<Portlet> portlets = portletAPI.findAllPortlets();
    for(Portlet p: portlets) {
      if(portletAPI.canAddPortletToLayout(p)) {
        Map<String, Object> portletMap = new HashMap<String, Object>();
        String portletTitle = LanguageUtil.get(uWebAPI.getLoggedInUser(request),"com.dotcms.repackage.javax.portlet.title." + p.getPortletId());
        portletMap.put("title", portletTitle);
        portletMap.put("id", p.getPortletId());
        listOfPortletsInfo.add(portletMap);
View Full Code Here

TOP

Related Classes of com.dotmarketing.business.portal.PortletAPI

Copyright © 2018 www.massapicom. 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.