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 {
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 getAssetRenderer(long classPK) throws PortalException;
049
050 public AssetRenderer getAssetRenderer(long classPK, int type)
051 throws PortalException;
052
053 public AssetRenderer getAssetRenderer(long groupId, String urlTitle)
054 throws PortalException;
055
056 public String getClassName();
057
058 public long getClassNameId();
059
060
063 @Deprecated
064 public Tuple getClassTypeFieldName(
065 long classTypeId, String fieldName, Locale locale)
066 throws Exception;
067
068
071 @Deprecated
072 public List<Tuple> getClassTypeFieldNames(
073 long classTypeId, Locale locale, int start, int end)
074 throws Exception;
075
076
079 @Deprecated
080 public int getClassTypeFieldNamesCount(long classTypeId, Locale locale)
081 throws Exception;
082
083 public ClassTypeReader getClassTypeReader();
084
085
088 @Deprecated
089 public Map<Long, String> getClassTypes(long[] groupIds, Locale locale)
090 throws Exception;
091
092 public String getIconCssClass();
093
094 public String getIconPath(PortletRequest portletRequest);
095
096 public String getPortletId();
097
098 public String getType();
099
100 public String getTypeName(Locale locale);
101
102
105 @Deprecated
106 public String getTypeName(Locale locale, boolean hasSubtypes);
107
108 public String getTypeName(Locale locale, long subtypeId);
109
110 public PortletURL getURLAdd(
111 LiferayPortletRequest liferayPortletRequest,
112 LiferayPortletResponse liferayPortletResponse)
113 throws PortalException;
114
115 public PortletURL getURLView(
116 LiferayPortletResponse liferayPortletResponse,
117 WindowState windowState)
118 throws PortalException;
119
120 public boolean hasAddPermission(
121 PermissionChecker permissionChecker, long groupId, long classTypeId)
122 throws Exception;
123
124
127 @Deprecated
128 public boolean hasClassTypeFieldNames(long classTypeId, Locale locale)
129 throws Exception;
130
131 public boolean hasPermission(
132 PermissionChecker permissionChecker, long entryClassPK,
133 String actionId)
134 throws Exception;
135
136 public boolean isActive(long companyId);
137
138 public boolean isCategorizable();
139
140 public boolean isLinkable();
141
142 public boolean isSelectable();
143
144 public boolean isSupportsClassTypes();
145
146 public void setClassName(String className);
147
148 public void setPortletId(String portletId);
149
150 }