mcconnell 2002/07/06 21:31:01 Added: assembly/src/java/org/apache/excalibur/meta/data Association.java Log: was Assignment.java (renamed to Association for API clarity) Revision Changes Path 1.1 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/meta/data/Association.java Index: Association.java =================================================================== /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.excalibur.meta.data; /** * The Association is the mapping of a component as a dependency * of another component. Each component declares dependencies (via Type) * and for each dependency there must be a coressponding Association which * has a matching role. The name value in Association object must refer * to another Component that implements a service as specified in DependencyInfo. * * <p>Note that it is invalid to have circular dependencies.</p> * * @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a> * @author <a href="mailto:[EMAIL PROTECTED]">Stephen McConnell</a> * @version $Revision: 1.1 $ $Date: 2002/07/07 04:31:01 $ */ public final class Association { /** * The name that the client component will use to access a dependency. */ private final String m_role; /** * the name of the component metadata instance that represents a component * type that is capable of fullfilling the dependency. */ private final Profile m_provider; /** * Create Profile with specified name and role. * * @param role the name client uses to access component * @param providerName the name of <code>ComponentProfile</code> instance * that is associated as a service provider */ public Association( final String role, final Profile provider ) { m_role = role; m_provider = provider; } /** * Return the name that will be used by a component instance to access a * dependent service. * * @return the name that the client component will use to access dependency. * @see org.apache.avalon.framework.service.ServiceManager#lookup( String ) */ public String getRole() { return m_role; } /** * Return the name of a <code>ComponentProfile</code> instance that will used to * fulfill the dependency. * * @return the name of the Component that will provide the dependency. */ public Profile getProvider() { return m_provider; } }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>