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.impl; 016 017 import org.apache.hivemind.internal.ServiceModelFactory; 018 019 /** 020 * Defines a name and a service model factory. The default service model, 021 * primitive, is hard coded into the framework, but additional 022 * service models are provided in the 023 * <code>hivemind.ServiceModels</code> configuration point. 024 * 025 * @author Howard Lewis Ship 026 */ 027 public class ServiceModelContribution 028 { 029 private String _name; 030 private ServiceModelFactory _factory; 031 032 public ServiceModelContribution() 033 { 034 } 035 036 public ServiceModelContribution(String name, ServiceModelFactory factory) 037 { 038 _name = name; 039 _factory = factory; 040 } 041 042 public ServiceModelFactory getFactory() 043 { 044 return _factory; 045 } 046 047 public String getName() 048 { 049 return _name; 050 } 051 052 public void setFactory(ServiceModelFactory factory) 053 { 054 _factory = factory; 055 } 056 057 public void setName(String string) 058 { 059 _name = string; 060 } 061 062 }