01: /**
02: * Copyright 2004-2005 jManage.org
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */package org.jmanage.core.management;
16:
17: /**
18: *
19: * date: Aug 13, 2004
20: * @author Rakesh Kalra
21: */
22: public class ObjectAttributeInfo extends ObjectFeatureInfo {
23:
24: private String attributeType;
25: private boolean isWrite;
26: private boolean isRead;
27: private boolean isIs;
28:
29: public ObjectAttributeInfo(String name, String description,
30: String attributeType, boolean isWrite, boolean isRead,
31: boolean isIs) {
32: super (name, description);
33: this .attributeType = attributeType;
34: this .isWrite = isWrite;
35: this .isRead = isRead;
36: this .isIs = isIs;
37: }
38:
39: public String getType() {
40: return attributeType;
41: }
42:
43: public String getDisplayType() {
44: return getDisplayType(attributeType);
45: }
46:
47: public boolean isIs() {
48: return isIs;
49: }
50:
51: public boolean isReadable() {
52: return isRead;
53: }
54:
55: public boolean isWritable() {
56: return isWrite;
57: }
58:
59: public String getReadWrite() {
60: String readWrite = "";
61: if (isReadable()) {
62: readWrite += "R";
63: }
64: if (isWritable()) {
65: readWrite += "W";
66: }
67: return readWrite;
68: }
69: }
|