1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.asset.model;
16  
17  import com.liferay.portal.kernel.exception.PortalException;
18  import com.liferay.portal.kernel.exception.SystemException;
19  import com.liferay.portal.kernel.portlet.LiferayPortletRequest;
20  import com.liferay.portal.kernel.portlet.LiferayPortletResponse;
21  import com.liferay.portal.security.permission.PermissionChecker;
22  
23  import javax.portlet.PortletRequest;
24  import javax.portlet.PortletURL;
25  import javax.portlet.RenderRequest;
26  import javax.portlet.RenderResponse;
27  
28  /**
29   * <a href="AssetRenderer.java.html"><b><i>View Source</i></b></a>
30   *
31   * @author Jorge Ferrer
32   * @author Juan Fernández
33   */
34  public interface AssetRenderer {
35  
36      public static final String TEMPLATE_ABSTRACT = "abstract";
37  
38      public static final String TEMPLATE_FULL_CONTENT = "full_content";
39  
40      public String[] getAvailableLocales() throws Exception;
41  
42      public long getClassPK();
43  
44      public String getDiscussionPath();
45  
46      public long getGroupId();
47  
48      public String getIconPath(PortletRequest portletRequest);
49  
50      public String getSummary();
51  
52      public String getTitle();
53  
54      public PortletURL getURLEdit(
55              LiferayPortletRequest liferayPortletRequest,
56              LiferayPortletResponse liferayPortletResponse)
57          throws Exception;
58  
59      public PortletURL getURLExport(
60              LiferayPortletRequest liferayPortletRequest,
61              LiferayPortletResponse liferayPortletResponse)
62          throws Exception;
63  
64      public String getUrlTitle();
65  
66      public String getURLViewInContext(
67              LiferayPortletRequest liferayPortletRequest,
68              LiferayPortletResponse liferayPortletResponse,
69              String noSuchEntryRedirect)
70          throws Exception;
71  
72      public long getUserId();
73  
74      public String getViewInContextMessage();
75  
76      public boolean hasEditPermission(PermissionChecker permissionChecker)
77          throws PortalException, SystemException;
78  
79      public boolean hasViewPermission(PermissionChecker permissionChecker)
80          throws PortalException, SystemException;
81  
82      public boolean isConvertible();
83  
84      public boolean isLocalizable();
85  
86      public boolean isPrintable();
87  
88      public String render(
89              RenderRequest renderRequest, RenderResponse renderResponse,
90              String template)
91          throws Exception;
92  
93  }