1
14
15 package com.liferay.portlet.asset.model;
16
17 import com.liferay.portal.kernel.exception.PortalException;
18 import com.liferay.portal.kernel.exception.SystemException;
19 import com.liferay.portal.kernel.portlet.LiferayPortletRequest;
20 import com.liferay.portal.kernel.portlet.LiferayPortletResponse;
21 import com.liferay.portal.kernel.util.WebKeys;
22 import com.liferay.portal.security.permission.PermissionChecker;
23 import com.liferay.portal.theme.ThemeDisplay;
24
25 import javax.portlet.PortletRequest;
26 import javax.portlet.PortletURL;
27
28
33 public abstract class BaseAssetRenderer implements AssetRenderer {
34
35 public String[] getAvailableLocales() {
36 return _EMPTY_ARRAY;
37 }
38
39 public String getDiscussionPath() {
40 return null;
41 }
42
43 public String getIconPath(PortletRequest portletRequest) {
44 ThemeDisplay themeDisplay = (ThemeDisplay)portletRequest.getAttribute(
45 WebKeys.THEME_DISPLAY);
46
47 return getIconPath(themeDisplay);
48 }
49
50 public PortletURL getURLEdit(
51 LiferayPortletRequest liferayPortletRequest,
52 LiferayPortletResponse liferayPortletResponse)
53 throws Exception {
54
55 return null;
56 }
57
58 public PortletURL getURLExport(
59 LiferayPortletRequest liferayPortletRequest,
60 LiferayPortletResponse liferayPortletResponse)
61 throws Exception {
62
63 return null;
64 }
65
66 public String getUrlTitle() {
67 return null;
68 }
69
70 public String getURLViewInContext(
71 LiferayPortletRequest liferayPortletRequest,
72 LiferayPortletResponse liferayPortletResponse,
73 String noSuchEntryRedirect)
74 throws Exception {
75
76 return null;
77 }
78
79 public String getViewInContextMessage() {
80 return "view-in-context";
81 }
82
83 @SuppressWarnings("unused")
84 public boolean hasEditPermission(PermissionChecker permissionChecker)
85 throws PortalException, SystemException {
86
87 return false;
88 }
89
90 @SuppressWarnings("unused")
91 public boolean hasViewPermission(PermissionChecker permissionChecker)
92 throws PortalException, SystemException {
93
94 return true;
95 }
96
97 public boolean isConvertible() {
98 return false;
99 }
100
101 public boolean isLocalizable() {
102 return false;
103 }
104
105 public boolean isPrintable() {
106 return false;
107 }
108
109 protected String getIconPath(ThemeDisplay themeDisplay) {
110 return themeDisplay.getPathThemeImages() + "/common/page.png";
111 }
112
113 private static final String[] _EMPTY_ARRAY = new String[0];
114
115 }