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.kernel.util.Tuple;
022 import com.liferay.portal.security.permission.PermissionChecker;
023
024 import java.util.List;
025 import java.util.Locale;
026 import java.util.Map;
027
028 import javax.portlet.PortletRequest;
029 import javax.portlet.PortletURL;
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)
044 throws PortalException, SystemException;
045
046 public AssetEntry getAssetEntry(String classNameId, long classPK)
047 throws PortalException, SystemException;
048
049 public AssetRenderer getAssetRenderer(long classPK)
050 throws PortalException, SystemException;
051
052 public AssetRenderer getAssetRenderer(long classPK, int type)
053 throws PortalException, SystemException;
054
055 public AssetRenderer getAssetRenderer(long groupId, String urlTitle)
056 throws PortalException, SystemException;
057
058 public String getClassName();
059
060 public long getClassNameId();
061
062 public List<Tuple> getClassTypeFieldNames(long classTypeId, Locale locale)
063 throws Exception;
064
065 public Map<Long, String> getClassTypes(long[] groupIds, Locale locale)
066 throws Exception;
067
068 public String getIconPath(PortletRequest portletRequest);
069
070 public String getPortletId();
071
072 public String getType();
073
074 public String getTypeName(Locale locale, boolean hasSubtypes);
075
076 public PortletURL getURLAdd(
077 LiferayPortletRequest liferayPortletRequest,
078 LiferayPortletResponse liferayPortletResponse)
079 throws PortalException, SystemException;
080
081 public boolean hasClassTypeFieldNames(long classTypeId, Locale locale)
082 throws Exception;
083
084 public boolean hasPermission(
085 PermissionChecker permissionChecker, long entryClassPK,
086 String actionId)
087 throws Exception;
088
089 public boolean isCategorizable();
090
091 public boolean isLinkable();
092
093 public boolean isSelectable();
094
095 public void setClassName(String className);
096
097 public void setPortletId(String portletId);
098
099 }