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.portlet;
16  
17  import com.liferay.portal.kernel.util.Base64;
18  
19  import java.io.Serializable;
20  
21  import javax.portlet.Event;
22  
23  import javax.xml.namespace.QName;
24  
25  /**
26   * <a href="EventImpl.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   */
30  public class EventImpl implements Event {
31  
32      public EventImpl(String name, QName qName, Serializable value) {
33          _name = name;
34          _qName = qName;
35          _value = value;
36      }
37  
38      public String getBase64Value() {
39          if (_base64Value != null) {
40              return _base64Value;
41          }
42          else {
43              _base64Value = Base64.objectToString(_value);
44  
45              return _base64Value;
46          }
47      }
48  
49      public String getName() {
50          return _name;
51      }
52  
53      public QName getQName() {
54          return _qName;
55      }
56  
57      public Serializable getValue() {
58          return _value;
59      }
60  
61      private String _base64Value;
62      private String _name;
63      private QName _qName;
64      private Serializable _value;
65  
66  }