All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.liferay.journal.web.internal.asset.model.JournalFeedAssetRenderer Maven / Gradle / Ivy

There is a newer version: 5.0.181
Show newest version
/**
 * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
 * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
 */

package com.liferay.journal.web.internal.asset.model;

import com.liferay.asset.kernel.model.BaseAssetRenderer;
import com.liferay.journal.model.JournalFeed;

import java.util.Locale;

import javax.portlet.PortletRequest;
import javax.portlet.PortletResponse;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author Georgel Pop
 */
public class JournalFeedAssetRenderer extends BaseAssetRenderer {

	public JournalFeedAssetRenderer(JournalFeed feed) {
		_feed = feed;
	}

	@Override
	public JournalFeed getAssetObject() {
		return _feed;
	}

	@Override
	public String getClassName() {
		return JournalFeed.class.getName();
	}

	@Override
	public long getClassPK() {
		return _feed.getId();
	}

	@Override
	public long getGroupId() {
		return _feed.getGroupId();
	}

	@Override
	public String getSummary(
		PortletRequest portletRequest, PortletResponse portletResponse) {

		return _feed.getDescription();
	}

	@Override
	public String getTitle(Locale locale) {
		return _feed.getName();
	}

	@Override
	public long getUserId() {
		return _feed.getUserId();
	}

	@Override
	public String getUserName() {
		return _feed.getUserName();
	}

	@Override
	public String getUuid() {
		return _feed.getUuid();
	}

	@Override
	public boolean include(
			HttpServletRequest httpServletRequest,
			HttpServletResponse httpServletResponse, String template)
		throws Exception {

		return false;
	}

	private final JournalFeed _feed;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy