avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly ContainerManager.java
Date Thu, 22 Aug 2002 05:50:50 GMT
mcconnell    2002/08/21 22:50:50

  Modified:    assembly/src/java/org/apache/excalibur/merlin/assembly
                        ContainerManager.java
  Log:
  checkstyle ok
  
  Revision  Changes    Path
  1.24      +50 -17    jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/ContainerManager.java
  
  Index: ContainerManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/ContainerManager.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- ContainerManager.java	22 Aug 2002 05:34:31 -0000	1.23
  +++ ContainerManager.java	22 Aug 2002 05:50:50 -0000	1.24
  @@ -241,7 +241,7 @@
      /**
       * Declaration of the logging manager.
       * @param context the context object containing the inital parameters
  -    * @param ContextException if the context criterai is not met
  +    * @exception ContextException if the context criterai is not met
       */
       public void contextualize( Context context ) throws ContextException
       {
  @@ -267,7 +267,7 @@
       * lifecycle helper, deployment helper, and type registry are established
       * and packaged and implicit profiles are built.
       *
  -    * @param Exception if an intilization error occurs
  +    * @exception Exception if an intilization error occurs
       */
       public void initialize() throws Exception
       {
  @@ -355,6 +355,7 @@
       * all components.  This method may be invoked multiple times during a 
       * the life of the manager.
       * 
  +    * @param profiles the profiles to start
       * @exception Exception if a start related error occurs
       */
       public void start( Profile[] profiles ) throws Exception
  @@ -413,7 +414,9 @@
           {
               final Profile profile = shutdown[i];
               if( isLocal( profile ) )
  -              local.add( profile );
  +            {
  +                local.add( profile );
  +            }
           }
           Profile[] profiles = (Profile[]) local.toArray( new Profile[0] );
           if( profiles.length == 0 )
  @@ -475,6 +478,7 @@
       * @param descriptor the containr descriptor that the child will manage
       * @param classpath the classpath to add to the child manager
       * @param lifestyles the lifestyle manager to use
  +    * @return the subsidiary container manager
       */
       public ContainerManager createContainerManager( 
                                    ContainerDescriptor descriptor,
  @@ -483,7 +487,9 @@
       {
   
           if( m_lifestyles == null )
  -          m_lifestyles = lifestyles;
  +        {
  +            m_lifestyles = lifestyles;
  +        }
   
           //
           // bootstrap the creation of logging categories here because
  @@ -515,7 +521,9 @@
               DefaultContext context = new DefaultContext( m_context );
               context.put( TypeManager.CLASSPATH_DESCRIPTOR_KEY, classpath );
               if( lifestyles != null )
  -              context.put( LIFESTYLES_KEY, lifestyles );
  +            {
  +                context.put( LIFESTYLES_KEY, lifestyles );
  +            }
   
               context.makeReadOnly();
               if( this instanceof KernelManager )
  @@ -575,7 +583,9 @@
       protected LifestyleManager getLifestyleManager()
       {
           if( m_lifestyles != null )
  -          return m_lifestyles;
  +        {
  +            return m_lifestyles;
  +        }
   
           ContainerManager parent = getParentManager();
           if( parent != null )
  @@ -641,6 +651,7 @@
   
      /**
       * Returns TRUE if the supplied profile is local to this manager.
  +    * @param profile the profile to test
       * @return the local status of th e profile
       */
       public boolean isLocal( Profile profile )
  @@ -749,7 +760,9 @@
       public Profile getProfile( ReferenceDescriptor reference, Selector selector )
       {
           if( selector == null )
  -          throw new NullPointerException("selector");
  +        {
  +            throw new NullPointerException("selector");
  +        }
   
           Profile[] profiles = getProfiles( reference );
           return selector.select( profiles );
  @@ -818,11 +831,14 @@
       * @param context the deployment context
       * @return a new resource 
       */
  -    private Resource createResource( Profile profile, Context context ) throws ResourceException
  +    private Resource createResource( Profile profile, Context context ) 
  +      throws ResourceException
       {
           Resource resource = getLocalResource( profile );
           if( resource != null )
  -          return resource;
  +        {
  +           return resource;
  +        }
   
           //
           // add some Phoenix specific stuff so we can work around context expected
  @@ -831,7 +847,8 @@
   
           DefaultContext c = new DefaultContext( context );
           c.put("name", profile.getName() );
  -        c.put("block.name", getPath().replace('/','.').substring(1) + "." + profile.getName()
);
  +        c.put("block.name", getPath().replace('/','.').substring(1) 
  +          + "." + profile.getName() );
           c.put("app.home", m_home );
   
           //
  @@ -866,6 +883,7 @@
       * @param profile the target profile to assemble
       * @param context the assembly context
       * @return the assembled resource
  +    * @exception AssemblyException if an assembly failure is detected
       */
       public Resource assemble( Profile profile, Context context ) throws AssemblyException
       {
  @@ -886,8 +904,10 @@
       * @param profile the target profile to assemble
       * @param context the assembly context
       * @return the containter manager's updated assembly graph
  +    * @exception Exception if an install failure is detected
       */
  -    public DependencyGraph install( Profile profile, Context context ) throws Exception
  +    public DependencyGraph install( Profile profile, Context context ) 
  +      throws Exception
       {
           return install( new Profile[]{ profile }, context );
       }
  @@ -900,6 +920,7 @@
       * @param profiles the set of profiles constituting the core components
       *    from which the associations between components will be based
       * @return the containter manager's updated assembly graph
  +    * @exception Exception if an install failure is detected
       */
       public DependencyGraph install( Profile[] profiles ) throws Exception
       {
  @@ -915,11 +936,14 @@
       *    from which the associations between components will be based
       * @param context the assembly context
       * @return the containter manager's updated assembly graph
  +    * @exception Exception if an install failure is detected
       */
       public DependencyGraph install( Profile[] profiles, Context context ) throws Exception
       {
           if( profiles.length == 0 )
  -          return m_map;
  +        {
  +            return m_map;
  +        }
   
           m_registry.assemble( m_map, profiles, context );
           logDependency( getLocalLogger(), "install: ", m_map.getStartupGraph() );
  @@ -1014,7 +1038,8 @@
               }
               catch( Throwable e )
               {
  -                final String warning = "Missing resource for profile: " + profile;
  +                final String warning = 
  +                  "Missing resource for profile: " + profile;
                   getLocalLogger().warn( warning );
               }
           }
  @@ -1074,7 +1099,8 @@
       {
           for( int i=0; i<extensions.length; i++ )
           {
  -            getLocalLogger().debug("adding profile against extension: " + extensions[i].getReference()
);
  +            getLocalLogger().debug("adding profile against extension: " 
  +              + extensions[i].getReference() );
               ProfileTable table = getTable( extensions[i].getReference() );
               table.add( profile );
           }
  @@ -1091,7 +1117,9 @@
           {
               table = (ProfileTable) iterator.next();
               if( table.matches( service ) )
  -              return table;
  +            {
  +                return table;
  +            }
           }
   
           // otherwise create a new table
  @@ -1105,7 +1133,10 @@
   
           String selectorName = selectorClassName;
           if( selectorName == null )
  -          selectorName = reference.getClassname() + "Selector";
  +        {
  +            selectorName = reference.getClassname() + "Selector";
  +        }
  +
           try
           {
               Class clazz = loadClass( selectorName );
  @@ -1162,7 +1193,9 @@
                           buffer.append( "[" + result[i].getName() + "]" );
                       }
                       if( i<(result.length-1) )
  -                      buffer.append(", ");
  +                    {
  +                        buffer.append(", ");
  +                    }
                   }
                   logger.info( lead + buffer.toString() );
               }
  
  
  

--
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