001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
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.security.permission.PermissionChecker;
022    
023    import javax.portlet.PortletRequest;
024    import javax.portlet.PortletURL;
025    
026    /**
027     * @author Jorge Ferrer
028     * @author Juan Fernández
029     * @author Raymond Augé
030     */
031    public interface AssetRendererFactory {
032    
033            public static int TYPE_LATEST = 0;
034    
035            public static int TYPE_LATEST_APPROVED = 1;
036    
037            public AssetRenderer getAssetRenderer(long classPK)
038                    throws PortalException, SystemException;
039    
040            public AssetRenderer getAssetRenderer(long classPK, int type)
041                    throws PortalException, SystemException;
042    
043            public AssetRenderer getAssetRenderer(long groupId, String urlTitle)
044                    throws PortalException, SystemException;
045    
046            public String getClassName();
047    
048            public long getClassNameId();
049    
050            public String getIconPath(PortletRequest portletRequest);
051    
052            public String getPortletId();
053    
054            public String getType();
055    
056            public PortletURL getURLAdd(
057                    LiferayPortletRequest liferayPortletRequest,
058                    LiferayPortletResponse liferayPortletResponse);
059    
060            public boolean hasPermission(
061                            PermissionChecker permissionChecker, long entryClassPK,
062                            String actionId)
063                    throws Exception;
064    
065            public boolean isSelectable();
066    
067            public void setClassNameId(long classNameId);
068    
069            public void setPortletId(String portletId);
070    
071    }