1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.events;
16  
17  import com.liferay.portal.kernel.events.ActionException;
18  
19  import javax.servlet.http.HttpServletRequest;
20  import javax.servlet.http.HttpServletResponse;
21  import javax.servlet.http.HttpSession;
22  
23  /**
24   * <a href="EventsProcessorUtil.java.html"><b><i>View Source</i></b></a>
25   *
26   * @author Brian Wing Shun Chan
27   * @author Michael Young
28   */
29  public class EventsProcessorUtil {
30  
31      public static void process(String key, String[] classes)
32          throws ActionException {
33  
34          _instance.process(key, classes, null, null, null, null);
35      }
36  
37      public static void process(String key, String[] classes, String[] ids)
38          throws ActionException {
39  
40          _instance.process(key, classes, ids, null, null, null);
41      }
42  
43      public static void process(
44              String key, String[] classes, HttpSession session)
45          throws ActionException {
46  
47          _instance.process(key, classes, null, null, null, session);
48      }
49  
50      public static void process(
51              String key, String[] classes, HttpServletRequest request,
52              HttpServletResponse response)
53          throws ActionException {
54  
55          _instance.process(key, classes, null, request, response, null);
56      }
57  
58      public static void registerEvent(String key, Object event) {
59          _instance.registerEvent(key, event);
60      }
61  
62      public static void setEventsProcessor(EventsProcessor eventsProcessor) {
63          _instance = eventsProcessor;
64      }
65  
66      public static void unregisterEvent(String key, Object event) {
67          _instance.unregisterEvent(key, event);
68      }
69  
70      private static EventsProcessor _instance = new EventsProcessorImpl();
71  
72  }