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.tapestry.spec;
016    
017    import java.util.List;
018    
019    import org.apache.hivemind.Locatable;
020    import org.apache.hivemind.LocationHolder;
021    import org.apache.tapestry.bean.IBeanInitializer;
022    import org.apache.tapestry.util.IPropertyHolder;
023    
024    /**
025     * A specification of a helper bean for a component.
026     * 
027     * @author glongman@intelligentworks.com
028     */
029    public interface IBeanSpecification extends IPropertyHolder, LocationHolder,
030            Locatable, PropertyInjectable
031    {
032    
033        String getClassName();
034    
035        BeanLifecycle getLifecycle();
036    
037        /**
038         * @since 1.0.5
039         */
040        void addInitializer(IBeanInitializer initializer);
041    
042        /**
043         * Returns the {@link List} of {@link IBeanInitializer}s. The caller should
044         * not modify this value!. May return null if there are no initializers.
045         * 
046         * @since 1.0.5
047         */
048        List getInitializers();
049    
050        String toString();
051    
052        String getDescription();
053    
054        void setDescription(String desc);
055    
056        /** @since 3.0 * */
057        void setClassName(String className);
058    
059        /** @since 3.0 * */
060        void setLifecycle(BeanLifecycle lifecycle);
061    
062    }