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    import com.liferay.portal.security.permission.PermissionChecker;
022    
023    import javax.portlet.PortletRequest;
024    import javax.portlet.PortletURL;
025    import javax.portlet.RenderRequest;
026    import javax.portlet.RenderResponse;
027    
028    /**
029     * @author Jorge Ferrer
030     * @author Juan Fernández
031     */
032    public interface AssetRenderer {
033    
034            public static final String TEMPLATE_ABSTRACT = "abstract";
035    
036            public static final String TEMPLATE_FULL_CONTENT = "full_content";
037    
038            public String[] getAvailableLocales() throws Exception;
039    
040            public long getClassPK();
041    
042            public String getDiscussionPath();
043    
044            public long getGroupId();
045    
046            public String getIconPath(PortletRequest portletRequest);
047    
048            public String getSummary();
049    
050            public String getTitle();
051    
052            public PortletURL getURLEdit(
053                            LiferayPortletRequest liferayPortletRequest,
054                            LiferayPortletResponse liferayPortletResponse)
055                    throws Exception;
056    
057            public PortletURL getURLExport(
058                            LiferayPortletRequest liferayPortletRequest,
059                            LiferayPortletResponse liferayPortletResponse)
060                    throws Exception;
061    
062            public String getUrlTitle();
063    
064            public String getUuid();
065    
066            public String getURLViewInContext(
067                            LiferayPortletRequest liferayPortletRequest,
068                            LiferayPortletResponse liferayPortletResponse,
069                            String noSuchEntryRedirect)
070                    throws Exception;
071    
072            public long getUserId();
073    
074            public String getViewInContextMessage();
075    
076            public boolean hasEditPermission(PermissionChecker permissionChecker)
077                    throws PortalException, SystemException;
078    
079            public boolean hasViewPermission(PermissionChecker permissionChecker)
080                    throws PortalException, SystemException;
081    
082            public boolean isConvertible();
083    
084            public boolean isLocalizable();
085    
086            public boolean isPrintable();
087    
088            public String render(
089                            RenderRequest renderRequest, RenderResponse renderResponse,
090                            String template)
091                    throws Exception;
092    
093    }