KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jmanage > core > management > ObjectAttributeInfo


1 /**
2  * Copyright 2004-2005 jManage.org
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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  */

16 package org.jmanage.core.management;
17
18 /**
19  *
20  * date: Aug 13, 2004
21  * @author Rakesh Kalra
22  */

23 public class ObjectAttributeInfo extends ObjectFeatureInfo {
24
25     private String JavaDoc attributeType;
26     private boolean isWrite;
27     private boolean isRead;
28     private boolean isIs;
29
30     public ObjectAttributeInfo(String JavaDoc name,
31                                String JavaDoc description,
32                                String JavaDoc attributeType,
33                                boolean isWrite,
34                                boolean isRead,
35                                boolean isIs) {
36         super(name, description);
37         this.attributeType = attributeType;
38         this.isWrite = isWrite;
39         this.isRead = isRead;
40         this.isIs = isIs;
41     }
42
43     public String JavaDoc getType() {
44         return attributeType;
45     }
46
47     public String JavaDoc getDisplayType(){
48         return getDisplayType(attributeType);
49     }
50
51     public boolean isIs() {
52         return isIs;
53     }
54
55     public boolean isReadable() {
56         return isRead;
57     }
58
59     public boolean isWritable() {
60         return isWrite;
61     }
62
63     public String JavaDoc getReadWrite(){
64         String JavaDoc readWrite = "";
65         if(isReadable()){
66             readWrite += "R";
67         }
68         if(isWritable()){
69             readWrite += "W";
70         }
71         return readWrite;
72     }
73 }
Popular Tags