001 // Copyright 2004, 2005 The Apache Software Foundation
002 //
003 // Licensed under the Apache License, Version 2.0 (the "License");
004 // you may not use this file except in compliance with the License.
005 // You may obtain a copy of the License at
006 //
007 // http://www.apache.org/licenses/LICENSE-2.0
008 //
009 // Unless required by applicable law or agreed to in writing, software
010 // distributed under the License is distributed on an "AS IS" BASIS,
011 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012 // See the License for the specific language governing permissions and
013 // limitations under the License.
014
015 package org.apache.hivemind.parse;
016
017 import org.apache.hivemind.Occurances;
018 import org.apache.hivemind.internal.Visibility;
019 import org.apache.hivemind.schema.impl.SchemaImpl;
020 import org.apache.hivemind.util.ToStringBuilder;
021
022 /**
023 * Descriptor for the <configuration-point> element, which defines a configuration extension
024 * point.
025 *
026 * @author Howard Lewis Ship
027 */
028 public final class ConfigurationPointDescriptor extends BaseAnnotationHolder
029 {
030 private String _id;
031
032 private Occurances _count = Occurances.UNBOUNDED;
033
034 private SchemaImpl _contributionsSchema;
035
036 /** @since 1.1 */
037 private String _contributionsSchemaId;
038
039 /** @since 1.1 */
040 private Visibility _visibility = Visibility.PUBLIC;
041
042 public String toString()
043 {
044 ToStringBuilder builder = new ToStringBuilder(this);
045
046 builder.append("id", _id);
047 builder.append("count", _count);
048 builder.append("contributionsSchema", _contributionsSchema);
049 builder.append("contributionsSchemaId", _contributionsSchemaId);
050 builder.append("visibility", _visibility);
051
052 return builder.toString();
053 }
054
055 public Occurances getCount()
056 {
057 return _count;
058 }
059
060 public void setCount(Occurances occurances)
061 {
062 _count = occurances;
063 }
064
065 public String getId()
066 {
067 return _id;
068 }
069
070 public void setId(String string)
071 {
072 _id = string;
073 }
074
075 public SchemaImpl getContributionsSchema()
076 {
077 return _contributionsSchema;
078 }
079
080 public void setContributionsSchema(SchemaImpl schema)
081 {
082 _contributionsSchema = schema;
083 }
084
085 /** @since 1.1 */
086 public String getContributionsSchemaId()
087 {
088 return _contributionsSchemaId;
089 }
090
091 /** @since 1.1 */
092 public void setContributionsSchemaId(String schemaId)
093 {
094 _contributionsSchemaId = schemaId;
095 }
096
097 /**
098 * @since 1.1
099 */
100 public Visibility getVisibility()
101 {
102 return _visibility;
103 }
104
105 /**
106 * @since 1.1
107 */
108 public void setVisibility(Visibility visibility)
109 {
110 _visibility = visibility;
111 }
112 }