01 /*
02 *
03 * Licensed to the Apache Software Foundation (ASF) under one
04 * or more contributor license agreements. See the NOTICE file
05 * distributed with this work for additional information
06 * regarding copyright ownership. The ASF licenses this file
07 * to you under the Apache License, Version 2.0 (the
08 * "License"); you may not use this file except in compliance
09 * with the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 */
21 package org.apache.qpid.management.ui.model;
22
23 public class AttributeData
24 {
25 String name = "";
26 String description = "";
27 String dataType = "";
28 Object value = "";
29 boolean readable = true;
30 boolean writable = false;
31
32
33 public String getDataType()
34 {
35 return dataType;
36 }
37 public void setDataType(String dataType)
38 {
39 this.dataType = dataType;
40 }
41
42 public String getDescription()
43 {
44 return description;
45 }
46 public void setDescription(String description)
47 {
48 this.description = description;
49 }
50
51 public String getName()
52 {
53 return name;
54 }
55 public void setName(String name)
56 {
57 this.name = name;
58 }
59
60 public Object getValue()
61 {
62 return value;
63 }
64 public void setValue(Object value)
65 {
66 if (value != null)
67 this.value = value;
68 }
69 public boolean isReadable()
70 {
71 return readable;
72 }
73 public void setReadable(boolean readable)
74 {
75 this.readable = readable;
76 }
77 public boolean isWritable()
78 {
79 return writable;
80 }
81 public void setWritable(boolean writable)
82 {
83 this.writable = writable;
84 }
85
86 public boolean isNumber()
87 {
88 if ("int".equals(dataType) || "java.lang.Integer".equals(dataType) ||
89 "long".equals(dataType) || "java.lang.Long".equals(dataType) )
90 {
91 return true;
92 }
93 else
94 return false;
95 }
96 }
|