001: /*
002: * The contents of this file are subject to the Sapient Public License
003: * Version 1.0 (the "License"); you may not use this file except in compliance
004: * with the License. You may obtain a copy of the License at
005: * http://carbon.sf.net/License.html.
006: *
007: * Software distributed under the License is distributed on an "AS IS" basis,
008: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
009: * the specific language governing rights and limitations under the License.
010: *
011: * The Original Code is The Carbon Component Framework.
012: *
013: * The Initial Developer of the Original Code is Sapient Corporation
014: *
015: * Copyright (C) 2003 Sapient Corporation. All Rights Reserved.
016: */
017:
018: package org.sape.carbon.core.component;
019:
020: import org.sape.carbon.core.config.Configuration;
021:
022: /**
023: * <p>This configuration is meant to be the base configurations needed for
024: * a Carbon Component. It provides the base configuration sub-system with the
025: * necessary configurations to enable the component to be started.
026: * </p>
027: *
028: * Copyright 2001 Sapient
029: * @since carbon 1.0
030: * @author Greg Hinkle, January 2001
031: * @version $Revision: 1.14 $($Author: dvoet $ / $Date: 2003/05/05 21:21:11 $)
032: */
033: public interface ComponentConfiguration extends Configuration {
034:
035: /**
036: * This method returns the class of the implemented interface for this
037: * service. The Component Class must be an implementation of this interface.
038: *
039: * @return Class The class object of the interface implemented by this
040: * component.
041: */
042: Class getFunctionalInterface();
043:
044: /**
045: * Sets the interface class that this component is providing.
046: * @param functionalInterfaceClass the Class object for the interface that
047: * the component is providing an implementation for.
048: */
049: void setFunctionalInterface(Class functionalInterfaceClass);
050:
051: /**
052: * The method returns the Class object for the class that implements this
053: * component's service. This Class object must not be abstract and must
054: * be public. This class must also have a public default constructor to
055: * allow the ComponentBuilder to instantiate it.
056: *
057: * @return Class The class object that implements this component
058: */
059: Class getFunctionalImplementationClass();
060:
061: /**
062: * Sets the Class object of the type that is
063: * providing the implementation of this component.
064: * @param functionalImplementationClass The Class object that implements
065: * this component.
066: */
067: void setFunctionalImplementationClass(
068: Class functionalImplementationClass);
069:
070: /**
071: * The name of the default component template configuration
072: * used to build components. The component template
073: * configuration object is used define the assistants and
074: * their relationship to the component.
075: */
076: String ComponentTemplateName = "/core/ComponentTemplate";
077:
078: /**
079: * Provides access to the component template
080: * configuration name.
081: * @return the name of the component template configuration for
082: * this component configuration
083: */
084: String getComponentTemplateName();
085:
086: /**
087: * Sets the name of the component Template.
088: * @param configurationName The name of the configuration that defines
089: * the template construction of this component.
090: */
091: void setComponentTemplateName(String configurationName);
092:
093: /**
094: * Provides access to the optional description for the configured
095: * component.
096: * @return the description of this component
097: */
098: String getComponentDescription();
099:
100: /**
101: * Set the Component's Description.
102: * @param description a user readable note describing this component and
103: * its purpose
104: */
105: void setComponentDescription(String description);
106: }
|