01: /* Copyright 2004 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal.container.om.common;
07:
08: import java.io.Serializable;
09: import java.util.Locale;
10:
11: import org.apache.pluto.om.common.Description;
12: import org.apache.pluto.om.common.DescriptionSet;
13: import org.apache.pluto.om.common.Parameter;
14: import org.apache.pluto.om.common.ParameterCtrl;
15:
16: /**
17: * Implementation of Apache Pluto object model.
18: * @author Ken Weiner, kweiner@unicon.net
19: * @version $Revision: 34757 $
20: */
21: public class ParameterImpl implements Parameter, ParameterCtrl,
22: Serializable {
23:
24: private String name = null;
25: private String value = null;
26: private DescriptionSet descriptions = null;
27:
28: public ParameterImpl() {
29: descriptions = new DescriptionSetImpl();
30: }
31:
32: public ParameterImpl(String name, String value) {
33: this ();
34: this .name = name;
35: this .value = value;
36: }
37:
38: public ParameterImpl(String name, String value,
39: DescriptionSet descriptions) {
40: this (name, value);
41: this .descriptions = descriptions;
42: }
43:
44: // Parameter methods
45:
46: public String getName() {
47: return name;
48: }
49:
50: public String getValue() {
51: return value;
52: }
53:
54: public Description getDescription(Locale locale) {
55: return descriptions.get(locale);
56: }
57:
58: // ParameterCrtl methods
59:
60: public void setName(String name) {
61: this .name = name;
62: }
63:
64: public void setValue(String value) {
65: this .value = value;
66: }
67:
68: public void setDescriptionSet(DescriptionSet descriptions) {
69: this .descriptions = (descriptions != null) ? descriptions
70: : new DescriptionSetImpl();
71: }
72:
73: }
|