KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > hivemind > parse > ServicePointDescriptor


1 // Copyright 2004, 2005 The Apache Software Foundation
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14

15 package org.apache.hivemind.parse;
16
17 import org.apache.hivemind.definition.Occurances;
18 import org.apache.hivemind.definition.Visibility;
19 import org.apache.hivemind.schema.impl.SchemaImpl;
20 import org.apache.hivemind.util.ToStringBuilder;
21
22 /**
23  * Defines a service extension point. Corresponds to the <service-point> element of the module
24  * descriptor.
25  *
26  * @author Howard Lewis Ship
27  */

28 public final class ServicePointDescriptor extends AbstractServiceDescriptor
29 {
30     private String JavaDoc _id;
31
32     private String JavaDoc _interfaceClassName;
33
34     private SchemaImpl _parametersSchema;
35
36     /** @since 1.1 */
37     private String JavaDoc _parametersSchemaId;
38
39     private Occurances _parametersCount = Occurances.REQUIRED;
40
41     /** @since 1.1 */
42     private Visibility _visibility = Visibility.PUBLIC;
43
44     public String JavaDoc getId()
45     {
46         return _id;
47     }
48
49     public String JavaDoc getInterfaceClassName()
50     {
51         return _interfaceClassName;
52     }
53
54     public void setId(String JavaDoc string)
55     {
56         _id = string;
57     }
58
59     public void setInterfaceClassName(String JavaDoc string)
60     {
61         _interfaceClassName = string;
62     }
63
64     protected void extendDescription(ToStringBuilder builder)
65     {
66         builder.append("id", _id);
67         builder.append("interfaceClassName", _interfaceClassName);
68         builder.append("parametersSchema", _parametersSchema);
69         builder.append("parametersSchemaId", _parametersSchemaId);
70         builder.append("parametersCount", _parametersCount);
71         builder.append("visibility", _visibility);
72     }
73
74     public SchemaImpl getParametersSchema()
75     {
76         return _parametersSchema;
77     }
78
79     public void setParametersSchema(SchemaImpl schema)
80     {
81         _parametersSchema = schema;
82     }
83
84     /** @since 1.1 */
85     public String JavaDoc getParametersSchemaId()
86     {
87         return _parametersSchemaId;
88     }
89
90     /** @since 1.1 */
91     public void setParametersSchemaId(String JavaDoc schemaId)
92     {
93         _parametersSchemaId = schemaId;
94     }
95
96     public Occurances getParametersCount()
97     {
98         return _parametersCount;
99     }
100
101     public void setParametersCount(Occurances occurances)
102     {
103         _parametersCount = occurances;
104     }
105
106     /**
107      * @since 1.1
108      */

109     public Visibility getVisibility()
110     {
111         return _visibility;
112     }
113
114     /**
115      * @since 1.1
116      */

117     public void setVisibility(Visibility visibility)
118     {
119         _visibility = visibility;
120     }
121 }
Popular Tags