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.security.permission.PermissionChecker;
022
023 import java.util.Locale;
024
025 import javax.portlet.PortletRequest;
026 import javax.portlet.PortletURL;
027 import javax.portlet.RenderRequest;
028 import javax.portlet.RenderResponse;
029 import javax.portlet.WindowState;
030
031
035 public interface AssetRenderer {
036
037 public static final String TEMPLATE_ABSTRACT = "abstract";
038
039 public static final String TEMPLATE_FULL_CONTENT = "full_content";
040
041 public String[] getAvailableLocales() throws Exception;
042
043 public long getClassPK();
044
045 public String getDiscussionPath();
046
047 public long getGroupId();
048
049 public String getIconPath(PortletRequest portletRequest);
050
051 public String getSearchSummary(Locale locale);
052
053 public String getSummary(Locale locale);
054
055 public String getTitle(Locale locale);
056
057 public PortletURL getURLEdit(
058 LiferayPortletRequest liferayPortletRequest,
059 LiferayPortletResponse liferayPortletResponse)
060 throws Exception;
061
062 public PortletURL getURLEdit(
063 LiferayPortletRequest liferayPortletRequest,
064 LiferayPortletResponse liferayPortletResponse,
065 WindowState windowState, PortletURL redirectURL)
066 throws Exception;
067
068 public PortletURL getURLExport(
069 LiferayPortletRequest liferayPortletRequest,
070 LiferayPortletResponse liferayPortletResponse)
071 throws Exception;
072
073 public String getUrlTitle();
074
075 public PortletURL getURLView(
076 LiferayPortletResponse liferayPortletResponse,
077 WindowState windowState)
078 throws Exception;
079
080 public String getURLViewInContext(
081 LiferayPortletRequest liferayPortletRequest,
082 LiferayPortletResponse liferayPortletResponse,
083 String noSuchEntryRedirect)
084 throws Exception;
085
086 public long getUserId();
087
088 public String getUserName();
089
090 public String getUuid();
091
092 public String getViewInContextMessage();
093
094 public boolean hasEditPermission(PermissionChecker permissionChecker)
095 throws PortalException, SystemException;
096
097 public boolean hasViewPermission(PermissionChecker permissionChecker)
098 throws PortalException, SystemException;
099
100 public boolean isConvertible();
101
102 public boolean isDisplayable();
103
104 public boolean isLocalizable();
105
106 public boolean isPreviewInContext();
107
108 public boolean isPrintable();
109
110 public String render(
111 RenderRequest renderRequest, RenderResponse renderResponse,
112 String template)
113 throws Exception;
114
115 }