View Javadoc
1   /*
2    * Copyright (C) 2003-2013 eXo Platform SAS.
3    *
4    * This program is free software: you can redistribute it and/or modify
5    * it under the terms of the GNU Affero General Public License as published by
6    * the Free Software Foundation, either version 3 of the License, or
7    * (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 Affero General Public License for more details.
13   *
14   * You should have received a copy of the GNU Affero General Public License
15   * along with this program. If not, see <http://www.gnu.org/licenses/>.
16   */
17  package org.exoplatform.commons.search.service;
18  
19  import java.util.List;
20  
21  import org.exoplatform.portal.mop.SiteKey;
22  import org.exoplatform.portal.mop.SiteType;
23  import org.exoplatform.portal.mop.navigation.NavigationContext;
24  import org.exoplatform.portal.mop.navigation.NavigationService;
25  import org.exoplatform.portal.mop.navigation.NavigationServiceException;
26  import org.exoplatform.portal.mop.navigation.NodeChangeListener;
27  import org.exoplatform.portal.mop.navigation.NodeContext;
28  import org.exoplatform.portal.mop.navigation.NodeModel;
29  import org.exoplatform.portal.mop.navigation.Scope;
30  
31  /**
32   * Created by The eXo Platform SAS
33   * Author : Canh Pham Van
34   *          canhpv@exoplatform.com
35   * Mar 29, 2013  
36   */
37  public class MockNavigationService implements NavigationService {
38  
39    /* (non-Javadoc)
40     * @see org.exoplatform.portal.mop.navigation.NavigationService#loadNavigation(org.exoplatform.portal.mop.SiteKey)
41     */
42    @Override
43    public NavigationContext loadNavigation(SiteKey key) throws NullPointerException, NavigationServiceException {
44      return null;
45    }
46  
47    /* (non-Javadoc)
48     * @see org.exoplatform.portal.mop.navigation.NavigationService#saveNavigation(org.exoplatform.portal.mop.navigation.NavigationContext)
49     */
50    @Override
51    public void saveNavigation(NavigationContext navigation) throws NullPointerException,
52                                                            IllegalArgumentException,
53                                                            NavigationServiceException {
54  
55    }
56  
57    /* (non-Javadoc)
58     * @see org.exoplatform.portal.mop.navigation.NavigationService#destroyNavigation(org.exoplatform.portal.mop.navigation.NavigationContext)
59     */
60    @Override
61    public boolean destroyNavigation(NavigationContext navigation) throws NullPointerException,
62                                                                  IllegalArgumentException,
63                                                                  NavigationServiceException {
64      return false;
65    }
66  
67    /* (non-Javadoc)
68     * @see org.exoplatform.portal.mop.navigation.NavigationService#loadNode(org.exoplatform.portal.mop.navigation.NodeModel, org.exoplatform.portal.mop.navigation.NavigationContext, org.exoplatform.portal.mop.navigation.Scope, org.exoplatform.portal.mop.navigation.NodeChangeListener)
69     */
70    @Override
71    public <N> NodeContext<N> loadNode(NodeModel<N> model,
72                                       NavigationContext navigation,
73                                       Scope scope,
74                                       NodeChangeListener<NodeContext<N>> listener) throws NullPointerException,
75                                                                                   NavigationServiceException {
76      return null;
77    }
78  
79    /* (non-Javadoc)
80     * @see org.exoplatform.portal.mop.navigation.NavigationService#saveNode(org.exoplatform.portal.mop.navigation.NodeContext, org.exoplatform.portal.mop.navigation.NodeChangeListener)
81     */
82    @Override
83    public <N> void saveNode(NodeContext<N> context, NodeChangeListener<NodeContext<N>> listener) throws NullPointerException,
84                                                                                                 NavigationServiceException {
85  
86    }
87  
88    /* (non-Javadoc)
89     * @see org.exoplatform.portal.mop.navigation.NavigationService#updateNode(org.exoplatform.portal.mop.navigation.NodeContext, org.exoplatform.portal.mop.navigation.Scope, org.exoplatform.portal.mop.navigation.NodeChangeListener)
90     */
91    @Override
92    public <N> void updateNode(NodeContext<N> context, Scope scope, NodeChangeListener<NodeContext<N>> listener) throws NullPointerException,
93                                                                                                                IllegalArgumentException,
94                                                                                                                NavigationServiceException {
95  
96    }
97  
98    /* (non-Javadoc)
99     * @see org.exoplatform.portal.mop.navigation.NavigationService#rebaseNode(org.exoplatform.portal.mop.navigation.NodeContext, org.exoplatform.portal.mop.navigation.Scope, org.exoplatform.portal.mop.navigation.NodeChangeListener)
100    */
101   @Override
102   public <N> void rebaseNode(NodeContext<N> context, Scope scope, NodeChangeListener<NodeContext<N>> listener) throws NullPointerException,
103                                                                                                               NavigationServiceException {
104 
105   }
106 
107   @Override
108   public List<NavigationContext> loadNavigations(SiteType type)
109       throws NullPointerException, NavigationServiceException {
110     // TODO Auto-generated method stub
111     return null;
112   }
113 
114 }