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
064 @Deprecated
065 public Tuple getClassTypeFieldName(
066 long classTypeId, String fieldName, Locale locale)
067 throws Exception;
068
069
073 @Deprecated
074 public List<Tuple> getClassTypeFieldNames(
075 long classTypeId, Locale locale, int start, int end)
076 throws Exception;
077
078
082 @Deprecated
083 public int getClassTypeFieldNamesCount(long classTypeId, Locale locale)
084 throws Exception;
085
086 public ClassTypeReader getClassTypeReader();
087
088
092 @Deprecated
093 public Map<Long, String> getClassTypes(long[] groupIds, Locale locale)
094 throws Exception;
095
096 public String getIconCssClass();
097
098 public String getIconPath(PortletRequest portletRequest);
099
100 public String getPortletId();
101
102 public String getType();
103
104 public String getTypeName(Locale locale);
105
106
109 @Deprecated
110 public String getTypeName(Locale locale, boolean hasSubtypes);
111
112 public String getTypeName(Locale locale, long subtypeId);
113
114 public PortletURL getURLAdd(
115 LiferayPortletRequest liferayPortletRequest,
116 LiferayPortletResponse liferayPortletResponse)
117 throws PortalException;
118
119 public PortletURL getURLView(
120 LiferayPortletResponse liferayPortletResponse,
121 WindowState windowState)
122 throws PortalException;
123
124 public boolean hasAddPermission(
125 PermissionChecker permissionChecker, long groupId, long classTypeId)
126 throws Exception;
127
128
132 @Deprecated
133 public boolean hasClassTypeFieldNames(long classTypeId, Locale locale)
134 throws Exception;
135
136 public boolean hasPermission(
137 PermissionChecker permissionChecker, long entryClassPK,
138 String actionId)
139 throws Exception;
140
141 public boolean isActive(long companyId);
142
143 public boolean isCategorizable();
144
145 public boolean isLinkable();
146
147 public boolean isListable(long classPK);
148
149 public boolean isSelectable();
150
151 public boolean isSupportsClassTypes();
152
153 public void setClassName(String className);
154
155 public void setPortletId(String portletId);
156
157 }