001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
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    
022    import javax.portlet.PortletRequest;
023    import javax.portlet.PortletURL;
024    
025    /**
026     * @author Jorge Ferrer
027     * @author Juan Fernández
028     */
029    public interface AssetRendererFactory {
030    
031            public static int TYPE_LATEST = 0;
032    
033            public static int TYPE_LATEST_APPROVED = 1;
034    
035            public AssetRenderer getAssetRenderer(long classPK)
036                    throws PortalException, SystemException;
037    
038            public AssetRenderer getAssetRenderer(long classPK, int type)
039                    throws PortalException, SystemException;
040    
041            public AssetRenderer getAssetRenderer(long groupId, String urlTitle)
042                    throws PortalException, SystemException;
043    
044            public String getClassName();
045    
046            public long getClassNameId();
047    
048            public String getIconPath(PortletRequest portletRequest);
049    
050            public String getPortletId();
051    
052            public String getType();
053    
054            public PortletURL getURLAdd(
055                    LiferayPortletRequest liferayPortletRequest,
056                    LiferayPortletResponse liferayPortletResponse);
057    
058            public boolean isSelectable();
059    
060            public void setClassNameId(long classNameId);
061    
062            public void setPortletId(String portletId);
063    
064    }