001
014
015 package com.liferay.portlet.asset.model;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.exception.SystemException;
019 import com.liferay.portal.kernel.portlet.LiferayPortletRequest;
020 import com.liferay.portal.kernel.portlet.LiferayPortletResponse;
021 import com.liferay.portal.kernel.util.WebKeys;
022 import com.liferay.portal.security.permission.PermissionChecker;
023 import com.liferay.portal.theme.ThemeDisplay;
024
025 import javax.portlet.PortletRequest;
026 import javax.portlet.PortletURL;
027
028
031 public abstract class BaseAssetRenderer implements AssetRenderer {
032
033 public String[] getAvailableLocales() {
034 return _EMPTY_ARRAY;
035 }
036
037 public String getDiscussionPath() {
038 return null;
039 }
040
041 public String getIconPath(PortletRequest portletRequest) {
042 ThemeDisplay themeDisplay = (ThemeDisplay)portletRequest.getAttribute(
043 WebKeys.THEME_DISPLAY);
044
045 return getIconPath(themeDisplay);
046 }
047
048 public PortletURL getURLEdit(
049 LiferayPortletRequest liferayPortletRequest,
050 LiferayPortletResponse liferayPortletResponse)
051 throws Exception {
052
053 return null;
054 }
055
056 public PortletURL getURLExport(
057 LiferayPortletRequest liferayPortletRequest,
058 LiferayPortletResponse liferayPortletResponse)
059 throws Exception {
060
061 return null;
062 }
063
064 public String getUrlTitle() {
065 return null;
066 }
067
068 public String getURLViewInContext(
069 LiferayPortletRequest liferayPortletRequest,
070 LiferayPortletResponse liferayPortletResponse,
071 String noSuchEntryRedirect)
072 throws Exception {
073
074 return null;
075 }
076
077 public String getViewInContextMessage() {
078 return "view-in-context";
079 }
080
081
085 public boolean hasEditPermission(PermissionChecker permissionChecker)
086 throws PortalException, SystemException {
087
088 return false;
089 }
090
091
095 public boolean hasViewPermission(PermissionChecker permissionChecker)
096 throws PortalException, SystemException {
097
098 return true;
099 }
100
101 public boolean isConvertible() {
102 return false;
103 }
104
105 public boolean isLocalizable() {
106 return false;
107 }
108
109 public boolean isPrintable() {
110 return false;
111 }
112
113 protected String getIconPath(ThemeDisplay themeDisplay) {
114 return themeDisplay.getPathThemeImages() + "/common/page.png";
115 }
116
117 private static final String[] _EMPTY_ARRAY = new String[0];
118
119 }