View Javadoc
1   /**
2    * Copyright (C) 2003-2008 eXo Platform SAS.
3    *
4    * This program is free software; you can redistribute it and/or
5    * modify it under the terms of the GNU Affero General Public License
6    * as published by the Free Software Foundation; either version 3
7    * of the License, or (at your option) any later version.
8    *
9    * This program is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   * GNU General Public License for more details.
13   *
14   * You should have received a copy of the GNU General Public License
15   * along with this program; if not, see<http://www.gnu.org/licenses/>.
16   */
17  package org.exoplatform.services.wcm.core;
18  
19  import javax.jcr.Node;
20  
21  import org.exoplatform.services.jcr.ext.common.SessionProvider;
22  
23  /**
24   * Created by The eXo Platform SAS.
25   *
26   * @author Benjamin Paillereau
27   * benjamin.paillereau@exoplatform.com
28   * Apr 30, 2009
29   */
30  
31  public interface WCMService {
32  
33    /**
34     * This method returns a jcr Node based on the given identifier.
35     *
36     * @param sessionProvider the session provider
37     * @param workspace the workspace name
38     * @param nodeIdentifier the node identifier
39     *
40     * @return a jcr Node
41     *
42     * @throws Exception the exception
43     *
44     * @see javax.jcr.Node
45     */
46    public Node getReferencedContent(SessionProvider sessionProvider,
47                                     String workspace,
48                                     String nodeIdentifier) throws Exception;  
49  
50    /**
51     * This method checks if the given portal is the default shared portal.
52     *
53     * @param portalName the portal name
54     * @param sessionProvider the session provider
55     *
56     * @return true if portal is shared portal
57     *
58     * @throws Exception the exception
59     */
60    public boolean isSharedPortal(SessionProvider sessionProvider, String portalName) throws Exception ;
61  
62  
63    /**
64     * Sets the expiration time in seconds for WCM portlets.
65     * <P>
66     * If the expiration value is set to <code>0</code>, caching is disabled for these
67     * portlet; if the value is set to <code>-1</code>, the cache does not expire.
68     * <p>
69     */
70    public void setPortletExpirationCache(int expirationCache) throws Exception ;
71  
72    /**
73     * Gets the expiration time in seconds for WCM portlets.
74     * <P>
75     * If the expiration value is set to <code>0</code>, caching is disabled for these
76     * portlet; if the value is set to <code>-1</code>, the cache does not expire.
77     * <p>
78     */
79    public int getPortletExpirationCache() throws Exception ;
80  
81  }