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