avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/metainfo DependencyDescriptor.java
Date Fri, 14 Jun 2002 07:49:31 GMT
donaldp     2002/06/14 00:49:31

  Modified:    containerkit/src/java/org/apache/excalibur/containerkit/metainfo
                        DependencyDescriptor.java
  Log:
  Add optional flag into DependencyDescriptor
  
  Revision  Changes    Path
  1.14      +19 -2     jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/metainfo/DependencyDescriptor.java
  
  Index: DependencyDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/metainfo/DependencyDescriptor.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DependencyDescriptor.java	9 Jun 2002 01:07:15 -0000	1.13
  +++ DependencyDescriptor.java	14 Jun 2002 07:49:30 -0000	1.14
  @@ -48,12 +48,17 @@
       private final ServiceDesignator m_service;
   
       /**
  +     * True if dependency is optional, false otherwise.
  +     */
  +    private final boolean m_optional;
  +
  +    /**
        * Constructor a dependency sans Attributes.
        */
       public DependencyDescriptor( final String role,
                                    final ServiceDesignator service )
       {
  -        this( role, service, null );
  +        this( role, service, false, null );
       }
   
       /**
  @@ -61,6 +66,7 @@
        */
       public DependencyDescriptor( final String role,
                                    final ServiceDesignator service,
  +                                 final boolean optional,
                                    final Properties attributes )
       {
           super( attributes );
  @@ -77,6 +83,7 @@
   
           m_role = role;
           m_service = service;
  +        m_optional = optional;
       }
   
       /**
  @@ -99,5 +106,15 @@
       public ServiceDesignator getService()
       {
           return m_service;
  +    }
  +
  +    /**
  +     * Return true if dependency is optional, false otherwise.
  +     *
  +     * @return true if dependency is optional, false otherwise.
  +     */
  +    public boolean isOptional()
  +    {
  +        return m_optional;
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message