001
014
015 package com.liferay.portlet.asset.model;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.portlet.LiferayPortletRequest;
019 import com.liferay.portal.kernel.portlet.LiferayPortletResponse;
020 import com.liferay.portal.kernel.util.Tuple;
021 import com.liferay.portal.security.permission.PermissionChecker;
022
023 import java.util.List;
024 import java.util.Locale;
025 import java.util.Map;
026
027 import javax.portlet.PortletRequest;
028 import javax.portlet.PortletURL;
029 import javax.portlet.WindowState;
030
031
037 public interface AssetRendererFactory<T> {
038
039 public static final int TYPE_LATEST = 0;
040
041 public static final int TYPE_LATEST_APPROVED = 1;
042
043 public AssetEntry getAssetEntry(long assetEntryId) throws PortalException;
044
045 public AssetEntry getAssetEntry(String classNameId, long classPK)
046 throws PortalException;
047
048 public AssetRenderer<T> getAssetRenderer(long classPK)
049 throws PortalException;
050
051 public AssetRenderer<T> getAssetRenderer(long classPK, int type)
052 throws PortalException;
053
054 public AssetRenderer<T> getAssetRenderer(long groupId, String urlTitle)
055 throws PortalException;
056
057 public String getClassName();
058
059 public long getClassNameId();
060
061
065 @Deprecated
066 public Tuple getClassTypeFieldName(
067 long classTypeId, String fieldName, Locale locale)
068 throws Exception;
069
070
074 @Deprecated
075 public List<Tuple> getClassTypeFieldNames(
076 long classTypeId, Locale locale, int start, int end)
077 throws Exception;
078
079
083 @Deprecated
084 public int getClassTypeFieldNamesCount(long classTypeId, Locale locale)
085 throws Exception;
086
087 public ClassTypeReader getClassTypeReader();
088
089
093 @Deprecated
094 public Map<Long, String> getClassTypes(long[] groupIds, Locale locale)
095 throws Exception;
096
097 public String getIconCssClass();
098
099
102 @Deprecated
103 public String getIconPath(PortletRequest portletRequest);
104
105 public String getPortletId();
106
107 public String getSubtypeTitle(Locale locale);
108
109 public String getType();
110
111 public String getTypeName(Locale locale);
112
113
116 @Deprecated
117 public String getTypeName(Locale locale, boolean hasSubtypes);
118
119 public String getTypeName(Locale locale, long subtypeId);
120
121
126 @Deprecated
127 public PortletURL getURLAdd(
128 LiferayPortletRequest liferayPortletRequest,
129 LiferayPortletResponse liferayPortletResponse)
130 throws PortalException;
131
132 public PortletURL getURLAdd(
133 LiferayPortletRequest liferayPortletRequest,
134 LiferayPortletResponse liferayPortletResponse, long classTypeId)
135 throws PortalException;
136
137 public PortletURL getURLView(
138 LiferayPortletResponse liferayPortletResponse,
139 WindowState windowState)
140 throws PortalException;
141
142 public boolean hasAddPermission(
143 PermissionChecker permissionChecker, long groupId, long classTypeId)
144 throws Exception;
145
146
150 @Deprecated
151 public boolean hasClassTypeFieldNames(long classTypeId, Locale locale)
152 throws Exception;
153
154 public boolean hasPermission(
155 PermissionChecker permissionChecker, long entryClassPK,
156 String actionId)
157 throws Exception;
158
159 public boolean isActive(long companyId);
160
161 public boolean isCategorizable();
162
163 public boolean isLinkable();
164
165 public boolean isListable(long classPK);
166
167 public boolean isSearchable();
168
169 public boolean isSelectable();
170
171 public boolean isSupportsClassTypes();
172
173 public void setClassName(String className);
174
175 public void setPortletId(String portletId);
176
177 }