View Javadoc
1   package org.exoplatform.services.bench;
2   /*
3    * Copyright (C) 2003-2011 eXo Platform SAS.
4    *
5    * This program is free software; you can redistribute it and/or
6    * modify it under the terms of the GNU Affero General Public License
7    * as published by the Free Software Foundation; either version 3
8    * of the License, or (at your option) any later version.
9    *
10   * This program is distributed in the hope that it will be useful,
11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   * GNU General Public License for more details.
14   *
15   * You should have received a copy of the GNU General Public License
16   * along with this program; if not, see<http://www.gnu.org/licenses/>.
17   */
18  
19  
20  import java.util.HashMap;
21  
22  import org.exoplatform.services.log.Log;
23  
24  /**
25   * Created by The eXo Platform SAS
26   * Author : eXoPlatform
27   *          exo@exoplatform.com
28   * Aug 2, 2011  
29   */
30  public class FakeDataInjector extends DataInjector {
31    
32    private boolean isInjected = false;
33    
34    
35    
36    @Override
37    public String getName() {
38      return FakeDataInjector.class.getName();
39    }
40  
41    @Override
42    public Log getLog() {
43      return null;
44    }
45  
46    public boolean isInitialized() {
47      return isInjected;
48    }
49  
50    @Override
51    public Object execute(HashMap<String, String> params) throws Exception {
52      // TODO Auto-generated method stub
53      return new Object();
54    }
55  
56    @Override
57    public void inject(HashMap<String, String> params) throws Exception {
58      isInjected = true;
59    }
60  
61    @Override
62    public void reject(HashMap<String, String> params) throws Exception {
63      isInjected = false;
64    }
65    
66    
67    
68  }