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    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    }