Search in sources :

Example 1 with TrashRenderer

use of com.liferay.portal.kernel.trash.TrashRenderer in project liferay-ide by liferay.

the class JukeBoxBaseTrashHandler method getTrashContainedModelTrashRenderers.

@Override
public List<TrashRenderer> getTrashContainedModelTrashRenderers(long classPK, int start, int end) throws PortalException, SystemException {
    List<TrashRenderer> trashRenderers = new ArrayList<TrashRenderer>();
    List<Song> songs = SongLocalServiceUtil.getSongsByAlbumId(classPK, start, end);
    for (Song song : songs) {
        TrashHandler trashHandler = TrashHandlerRegistryUtil.getTrashHandler(Song.class.getName());
        TrashRenderer trashRenderer = trashHandler.getTrashRenderer(song.getSongId());
        trashRenderers.add(trashRenderer);
    }
    return trashRenderers;
}
Also used : Song(org.liferay.jukebox.model.Song) TrashRenderer(com.liferay.portal.kernel.trash.TrashRenderer) BaseTrashHandler(com.liferay.portal.kernel.trash.BaseTrashHandler) TrashHandler(com.liferay.portal.kernel.trash.TrashHandler) ArrayList(java.util.ArrayList)

Example 2 with TrashRenderer

use of com.liferay.portal.kernel.trash.TrashRenderer in project liferay-ide by liferay.

the class SongTrashHandler method getTrashContainedModelTrashRenderers.

@Override
public List<TrashRenderer> getTrashContainedModelTrashRenderers(long classPK, int start, int end) throws PortalException, SystemException {
    List<TrashRenderer> trashRenderers = new ArrayList<TrashRenderer>();
    List<Song> songs = SongLocalServiceUtil.getSongsByAlbumId(classPK, start, end);
    for (Song song : songs) {
        TrashHandler trashHandler = TrashHandlerRegistryUtil.getTrashHandler(Song.class.getName());
        TrashRenderer trashRenderer = trashHandler.getTrashRenderer(song.getSongId());
        trashRenderers.add(trashRenderer);
    }
    return trashRenderers;
}
Also used : Song(org.liferay.jukebox.model.Song) TrashRenderer(com.liferay.portal.kernel.trash.TrashRenderer) TrashHandler(com.liferay.portal.kernel.trash.TrashHandler) ArrayList(java.util.ArrayList)

Aggregations

TrashHandler (com.liferay.portal.kernel.trash.TrashHandler)2 TrashRenderer (com.liferay.portal.kernel.trash.TrashRenderer)2 ArrayList (java.util.ArrayList)2 Song (org.liferay.jukebox.model.Song)2 BaseTrashHandler (com.liferay.portal.kernel.trash.BaseTrashHandler)1