org.apache.avalon.composition.model.impl
Class DefaultFilesetModel

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.avalon.composition.model.impl.DefaultFilesetModel
All Implemented Interfaces:
FilesetModel, LogEnabled

public class DefaultFilesetModel
extends AbstractLogEnabled
implements FilesetModel

Implementation of a FilesetModel in which a set of IncludeDirective objects, a set of ExcludeDirective objects, a set of default includes and excludes, and a base directory anchor are used to resolve and build a set of files specified by a FilesetDirective.

Version:
$Revision: 1.7 $ $Date: 2004/04/21 17:56:25 $
Author:
Avalon Development Team

Constructor Summary
DefaultFilesetModel(File anchor, IncludeDirective[] includes, ExcludeDirective[] excludes, String[] defaultIncludes, String[] defaultExcludes, Logger logger)
          Constructs a new default fileset model.
 
Method Summary
 ArrayList getIncludes()
          Returns a set of File objects representing the results of the fileset resolution.
 void resolveFileset()
          Resolves the specified include and exclude directives from the base directory anchor and produces an array of files to include in the classpath.
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFilesetModel

public DefaultFilesetModel(File anchor,
                           IncludeDirective[] includes,
                           ExcludeDirective[] excludes,
                           String[] defaultIncludes,
                           String[] defaultExcludes,
                           Logger logger)
Constructs a new default fileset model.

Parameters:
anchor - base directory anchor from which to begin fileset resolution
includes - array of IncludeDirective objects to use during fileset resolution
excludes - array of ExcludeDirective objects to use during fileset resolution
defaultIncludes - array of String objects to use as a default set of fileset includes
defaultExcludes - array of String objects to use as a default set of fileset excludes
logger - Logger for the fileset model to use
Method Detail

getIncludes

public ArrayList getIncludes()
Returns a set of File objects representing the results of the fileset resolution. This array will contain fully qualified filenames based on the base directory anchor.

Returns:
an array of files to include in the classpath

resolveFileset

public void resolveFileset()
                    throws IOException,
                           IllegalStateException
Resolves the specified include and exclude directives from the base directory anchor and produces an array of files to include in the classpath.

Specified by:
resolveFileset in interface FilesetModel
Throws:
IOException
IllegalStateException


Copyright © The Apache Software Foundation. All Rights Reserved.