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
015package org.apache.hivemind.lib.factory;
016
017import java.util.List;
018
019/**
020 * Parameter object passed to {@link org.apache.hivemind.lib.factory.BeanFactoryBuilder}.
021 *
022 * @author Howard Lewis Ship
023 */
024public class BeanFactoryParameter
025{
026    private Class _vendClass = Object.class;
027    private boolean _defaultCacheable = true;
028    private List _contributions;
029
030    /**
031     * The contributions to the list (assigned from the companion
032     * configuration point).
033     */
034    public List getContributions()
035    {
036        return _contributions;
037    }
038
039    /**
040     * Default value for cacheable in contributions that do not explicitly
041     * set a value.  Default is <code>true</code>.
042     */
043
044    public boolean getDefaultCacheable()
045    {
046        return _defaultCacheable;
047    }
048
049    /**
050     * The class or interface to be vended by the factory (all contributed
051     * classes must be assigneble). Defaults to <code>Object</code>. 
052     */
053    public Class getVendClass()
054    {
055        return _vendClass;
056    }
057
058    public void setContributions(List list)
059    {
060        _contributions = list;
061    }
062
063    public void setDefaultCacheable(boolean b)
064    {
065        _defaultCacheable = b;
066    }
067
068    public void setVendClass(Class class1)
069    {
070        _vendClass = class1;
071    }
072
073}