Search in sources :

Example 16 with PortletURL

use of javax.portlet.PortletURL in project liferay-ide by liferay.

the class SongAssetRenderer method getURLEdit.

@Override
public PortletURL getURLEdit(LiferayPortletRequest liferayPortletRequest, LiferayPortletResponse liferayPortletResponse) throws Exception {
    PortletURL portletURL = liferayPortletResponse.createLiferayPortletURL(getControlPanelPlid(liferayPortletRequest), SongsPortlet.PORTLET_ID, PortletRequest.RENDER_PHASE);
    portletURL.setParameter("jspPage", "/html/songs/edit_song.jsp");
    portletURL.setParameter("songId", String.valueOf(_song.getSongId()));
    return portletURL;
}
Also used : PortletURL(javax.portlet.PortletURL)

Example 17 with PortletURL

use of javax.portlet.PortletURL in project liferay-ide by liferay.

the class SongAssetRenderer method getURLViewInContext.

@Override
public String getURLViewInContext(LiferayPortletRequest liferayPortletRequest, LiferayPortletResponse liferayPortletResponse, String noSuchEntryRedirect) {
    try {
        long plid = PortalUtil.getPlidFromPortletId(_song.getGroupId(), PortletKeys.SONGS);
        if (plid == LayoutConstants.DEFAULT_PLID) {
            return StringPool.BLANK;
        }
        PortletURL portletURL = PortletURLFactoryUtil.create(liferayPortletRequest, PortletKeys.SONGS, plid, PortletRequest.RENDER_PHASE);
        portletURL.setParameter("jspPage", "/html/songs/view_song.jsp");
        portletURL.setParameter("songId", String.valueOf(_song.getSongId()));
        return portletURL.toString();
    } catch (Exception e) {
    }
    return StringPool.BLANK;
}
Also used : PortletURL(javax.portlet.PortletURL) PortalException(com.liferay.portal.kernel.exception.PortalException) SystemException(com.liferay.portal.kernel.exception.SystemException)

Example 18 with PortletURL

use of javax.portlet.PortletURL in project liferay-ide by liferay.

the class AlbumTrashHandler method getRestoreURL.

protected PortletURL getRestoreURL(PortletRequest portletRequest, long classPK) throws PortalException, SystemException {
    String portletId = PortletKeys.ALBUMS;
    Album album = AlbumLocalServiceUtil.getAlbum(classPK);
    long plid = PortalUtil.getPlidFromPortletId(album.getGroupId(), PortletKeys.ALBUMS);
    PortletURL portletURL = PortletURLFactoryUtil.create(portletRequest, portletId, plid, PortletRequest.RENDER_PHASE);
    portletURL.setParameter("jspPage", "/html/albums/view_album.jsp");
    return portletURL;
}
Also used : Album(org.liferay.jukebox.model.Album) PortletURL(javax.portlet.PortletURL)

Example 19 with PortletURL

use of javax.portlet.PortletURL in project liferay-ide by liferay.

the class SongTrashHandler method getRestoreURL.

protected PortletURL getRestoreURL(PortletRequest portletRequest, long classPK) throws PortalException, SystemException {
    String portletId = PortletKeys.SONGS;
    Song song = SongLocalServiceUtil.getSong(classPK);
    long plid = PortalUtil.getPlidFromPortletId(song.getGroupId(), PortletKeys.SONGS);
    PortletURL portletURL = PortletURLFactoryUtil.create(portletRequest, portletId, plid, PortletRequest.RENDER_PHASE);
    portletURL.setParameter("jspPage", "/html/songs/view_song.jsp");
    return portletURL;
}
Also used : Song(org.liferay.jukebox.model.Song) PortletURL(javax.portlet.PortletURL)

Example 20 with PortletURL

use of javax.portlet.PortletURL in project liferay-ide by liferay.

the class KBArticleAssetRenderer method getURLEdit.

@Override
public PortletURL getURLEdit(LiferayPortletRequest liferayPortletRequest, LiferayPortletResponse liferayPortletResponse) throws Exception {
    PortletURL portletURL = liferayPortletResponse.createLiferayPortletURL(getControlPanelPlid(liferayPortletRequest), PortletKeys.KNOWLEDGE_BASE_ADMIN, PortletRequest.RENDER_PHASE);
    portletURL.setParameter("mvcPath", "/admin/edit_article.jsp");
    portletURL.setParameter("resourcePrimKey", String.valueOf(_kbArticle.getResourcePrimKey()));
    return portletURL;
}
Also used : PortletURL(javax.portlet.PortletURL)

Aggregations

PortletURL (javax.portlet.PortletURL)26 ThemeDisplay (com.liferay.portal.theme.ThemeDisplay)6 KBArticle (com.liferay.knowledgebase.model.KBArticle)5 PortalException (com.liferay.portal.kernel.exception.PortalException)5 KBFolder (com.liferay.knowledgebase.model.KBFolder)4 SystemException (com.liferay.portal.kernel.exception.SystemException)3 WindowStateException (javax.portlet.WindowStateException)3 PortletPreferences (javax.portlet.PortletPreferences)2 Album (org.liferay.jukebox.model.Album)2 Song (org.liferay.jukebox.model.Song)2 JSONObject (com.liferay.portal.kernel.json.JSONObject)1 LiferayPortletURL (com.liferay.portal.kernel.portlet.LiferayPortletURL)1 FileEntry (com.liferay.portal.kernel.repository.model.FileEntry)1 FileVersion (com.liferay.portal.kernel.repository.model.FileVersion)1 ThemeDisplay (com.liferay.portal.kernel.theme.ThemeDisplay)1 Layout (com.liferay.portal.model.Layout)1 LayoutTypePortlet (com.liferay.portal.model.LayoutTypePortlet)1 Portlet (com.liferay.portal.model.Portlet)1 PortalPreferences (com.liferay.portlet.PortalPreferences)1 BlogsEntry (com.liferay.portlet.blogs.model.BlogsEntry)1