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     * Defines a service extension point. Corresponds to the <service-point> element of the module
024     * descriptor.
025     * 
026     * @author Howard Lewis Ship
027     */
028    public final class ServicePointDescriptor extends AbstractServiceDescriptor
029    {
030        private String _id;
031    
032        private String _interfaceClassName;
033    
034        private SchemaImpl _parametersSchema;
035    
036        /** @since 1.1 */
037        private String _parametersSchemaId;
038    
039        private Occurances _parametersCount = Occurances.REQUIRED;
040    
041        /** @since 1.1 */
042        private Visibility _visibility = Visibility.PUBLIC;
043    
044        public String getId()
045        {
046            return _id;
047        }
048    
049        public String getInterfaceClassName()
050        {
051            return _interfaceClassName;
052        }
053    
054        public void setId(String string)
055        {
056            _id = string;
057        }
058    
059        public void setInterfaceClassName(String string)
060        {
061            _interfaceClassName = string;
062        }
063    
064        protected void extendDescription(ToStringBuilder builder)
065        {
066            builder.append("id", _id);
067            builder.append("interfaceClassName", _interfaceClassName);
068            builder.append("parametersSchema", _parametersSchema);
069            builder.append("parametersSchemaId", _parametersSchemaId);
070            builder.append("parametersCount", _parametersCount);
071            builder.append("visibility", _visibility);
072        }
073    
074        public SchemaImpl getParametersSchema()
075        {
076            return _parametersSchema;
077        }
078    
079        public void setParametersSchema(SchemaImpl schema)
080        {
081            _parametersSchema = schema;
082        }
083    
084        /** @since 1.1 */
085        public String getParametersSchemaId()
086        {
087            return _parametersSchemaId;
088        }
089    
090        /** @since 1.1 */
091        public void setParametersSchemaId(String schemaId)
092        {
093            _parametersSchemaId = schemaId;
094        }
095    
096        public Occurances getParametersCount()
097        {
098            return _parametersCount;
099        }
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    }