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 public String getIconPath(PortletRequest portletRequest);
100
101 public String getPortletId();
102
103 public String getSubtypeTitle(Locale locale);
104
105 public String getType();
106
107 public String getTypeName(Locale locale);
108
109
112 @Deprecated
113 public String getTypeName(Locale locale, boolean hasSubtypes);
114
115 public String getTypeName(Locale locale, long subtypeId);
116
117
122 @Deprecated
123 public PortletURL getURLAdd(
124 LiferayPortletRequest liferayPortletRequest,
125 LiferayPortletResponse liferayPortletResponse)
126 throws PortalException;
127
128 public PortletURL getURLAdd(
129 LiferayPortletRequest liferayPortletRequest,
130 LiferayPortletResponse liferayPortletResponse, long classTypeId)
131 throws PortalException;
132
133 public PortletURL getURLView(
134 LiferayPortletResponse liferayPortletResponse,
135 WindowState windowState)
136 throws PortalException;
137
138 public boolean hasAddPermission(
139 PermissionChecker permissionChecker, long groupId, long classTypeId)
140 throws Exception;
141
142
146 @Deprecated
147 public boolean hasClassTypeFieldNames(long classTypeId, Locale locale)
148 throws Exception;
149
150 public boolean hasPermission(
151 PermissionChecker permissionChecker, long entryClassPK,
152 String actionId)
153 throws Exception;
154
155 public boolean isActive(long companyId);
156
157 public boolean isCategorizable();
158
159 public boolean isLinkable();
160
161 public boolean isListable(long classPK);
162
163 public boolean isSearchable();
164
165 public boolean isSelectable();
166
167 public boolean isSupportsClassTypes();
168
169 public void setClassName(String className);
170
171 public void setPortletId(String portletId);
172
173 }