View Javadoc
1   /*
2    * Copyright (C) 2003-2007 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.cms.actions;
18  
19  import java.util.Collection;
20  import java.util.Map;
21  
22  import javax.jcr.Node;
23  
24  public interface ActionPlugin {
25  
26    public boolean isActionTypeSupported(String actionType);
27  
28    public String getExecutableDefinitionName();
29  
30    public String getActionExecutableLabel();
31    
32    public Collection<String> getActionExecutables() throws Exception;
33  
34    public String getActionExecutable(String actionTypeName) throws Exception;
35  
36    public boolean isVariable(String variable) throws Exception;
37  
38    public Collection<String> getVariableNames(String actionTypeName) throws Exception;
39  
40    public void removeObservation(String repository, String moveName) throws Exception;
41    
42  
43    public void removeActivationJob(String jobName, String jobGroup, String jobClass) throws Exception;
44  
45    public void addAction(String actionType,
46                          String srcWorkspace,
47                          String srcPath,
48                          Map mappings) throws Exception;
49    
50    public void addAction(String actionType,
51                          String srcWorkspace,
52                          String srcPath,
53                          boolean isDeep,
54                          String[] uuid,
55                          String[] nodeTypeNames,
56                          Map mappings) throws Exception;  
57  
58    public void initiateActionObservation(Node actionNode) throws Exception;
59  
60    public void reScheduleActivations(Node actionNode) throws Exception;
61  
62    public void executeAction(String userId, Node actionNode, Map variables) throws Exception;
63  
64    public void executeAction(String userId, String executable, Map variables) throws Exception;
65    
66    public void activateAction(String userId, String executable, Map variables) throws Exception;  
67  
68  }