KickJava   Java API By Example, From Geeks To Geeks.

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


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 ObjectOperationInfo extends ObjectFeatureInfo {
24
25     public static final int INFO = 0;
26     public static final int ACTION = 1;
27     public static final int ACTION_INFO = 2;
28     public static final int UNKNOWN = 3;
29
30     private String JavaDoc type;
31     private ObjectParameterInfo[] signature;
32     private int impact;
33
34     public ObjectOperationInfo(String JavaDoc name,
35                                String JavaDoc description,
36                                ObjectParameterInfo[] signature,
37                                String JavaDoc returnType,
38                                int impact) {
39         super(name, description);
40         this.signature = signature;
41         this.type = returnType;
42         this.impact = impact;
43     }
44
45     public int getImpact() {
46         return impact;
47     }
48
49     public String JavaDoc getReturnType() {
50         return type;
51     }
52
53     public String JavaDoc getDisplayReturnType(){
54         return getDisplayType(type);
55     }
56
57     public ObjectParameterInfo[] getSignature() {
58         return signature;
59     }
60
61     public String JavaDoc[] getParameters(){
62         String JavaDoc[] parameters = new String JavaDoc[signature.length];
63         for(int i=0; i<signature.length; i++){
64             parameters[i] = signature[i].getType();
65         }
66         return parameters;
67     }
68 }
69
Popular Tags