| EventImpl.java |
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.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 }