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.portlet.LiferayPortletRequest;
18  import com.liferay.portal.kernel.portlet.LiferayPortletResponse;
19  
20  import javax.portlet.PortletURL;
21  import javax.portlet.RenderRequest;
22  import javax.portlet.RenderResponse;
23  
24  /**
25   * <a href="AssetRenderer.java.html"><b><i>View Source</i></b></a>
26   *
27   * @author Jorge Ferrer
28   */
29  public interface AssetRenderer {
30  
31      public static final String TEMPLATE_ABSTRACT = "abstract";
32  
33      public static final String TEMPLATE_FULL_CONTENT = "full_content";
34  
35      public String[] getAvailableLocales() throws Exception;
36  
37      public long getClassPK();
38  
39      public String getDiscussionPath();
40  
41      public long getGroupId();
42  
43      public String getSummary();
44  
45      public String getTitle();
46  
47      public PortletURL getURLEdit(
48              LiferayPortletRequest liferayPortletRequest,
49              LiferayPortletResponse liferayPortletResponse)
50          throws Exception;
51  
52      public PortletURL getURLExport(
53              LiferayPortletRequest liferayPortletRequest,
54              LiferayPortletResponse liferayPortletResponse)
55          throws Exception;
56  
57      public String getUrlTitle();
58  
59      public String getURLViewInContext(
60              LiferayPortletRequest liferayPortletRequest,
61              LiferayPortletResponse liferayPortletResponse,
62              String noSuchEntryRedirect)
63          throws Exception;
64  
65      public long getUserId();
66  
67      public String getViewInContextMessage();
68  
69      public boolean isConvertible();
70  
71      public boolean isLocalizable();
72  
73      public boolean isPrintable();
74  
75      public String render(
76              RenderRequest renderRequest, RenderResponse renderResponse,
77              String template)
78          throws Exception;
79  
80  }