1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
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 unregisterEvent(String key, Object event) {
63          _instance.unregisterEvent(key, event);
64      }
65  
66      private static EventsProcessor _instance = new EventsProcessorImpl();
67  
68  }