tbennett 2004/04/17 10:37:28
Added: merlin/composition/api/src/java/org/apache/avalon/composition/model
FileSelector.java FilesetModel.java
Log:
Interfaces of a fully featured fileset resolution model for classpath creation
Revision Changes Path
1.1
avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/FileSelector.java
Index: FileSelector.java
===================================================================
/*
* Copyright 2002-2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.avalon.composition.model;
import java.io.File;
/**
* Interface used by implementations to filter files from candidate lists.
*
* @author Apache Ant Development Team (Bruce Atherton)
* @author <a href="mailto:[EMAIL PROTECTED]">Avalon Development Team</a>
* @version $Revision: 1.1 $ $Date: 2004/04/17 17:37:28 $
*/
public interface FileSelector {
/**
* Method that each selector will implement to create their
* selection behaviour.
*
* @param basedir A java.io.File object for the base directory
* @param filename The name of the file to check
* @param file A File object for this filename
* @return whether the file should be selected or not
*/
boolean isSelected(File basedir, String filename, File file);
}
1.1
avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/FilesetModel.java
Index: FilesetModel.java
===================================================================
/*
* Copyright 2002-2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.avalon.composition.model;
import java.io.File;
import org.apache.avalon.composition.data.ExcludeDirective;
import org.apache.avalon.composition.data.IncludeDirective;
/**
* <p>Specification of a fileset model from which a
* a set of included and excluded file directives can be resolved
* into set of fully qualifed filenames for purposes of establishing
* a classpath.</p>
*
* @author <a href="mailto:[EMAIL PROTECTED]">Avalon Development Team</a>
* @version $Revision: 1.1 $ $Date: 2004/04/17 17:37:28 $
*/
public interface FilesetModel {
/**
* Establishes the base directory anchor for the fileset resolution.
*
* @param anchor the base directory anchor
*/
void setBaseDirectory(File anchor);
/**
* Establishes the set of <code>IncludeDirective</code> objects
* to use during fileset resolution.
*
* @param includes array of <code>IncludeDirective</code> objects
*/
void setIncludeDirectives(IncludeDirective[] includes);
/**
* Establishes the set of <code>ExcludeDirective</code> objects
* to use during fileset resolution.
*
* @param excludes array of <code>ExcludeDirectives</code>
*/
void setExcludeDirectives(ExcludeDirective[] excludes);
/**
* Establishes a set of default includes to use during fileset
* resolution in lieu of an explicit specification of a set
* of <code>IncludeDirective</code> objects.
*
* @param defaultIncludes array of <code>String</code> objects
* representing a set of default fileset includes
*/
void setDefaultIncludes(String[] defaultIncludes);
/**
* Establishes a set of default excludes to use during fileset
* resolution in lieu of an explicit specification of a set
* of <code>ExcludeDirective</code> objects.
*
* @param defaultExcludes array of <code>String</code> objects
* representing a set of default fileset excludes
*/
void setDefaultExcludes(String[] defaultExcludes);
/**
* Returns a set of <code>File</code> objects representing the
* results of the fileset resolution. This array will contain
* fully qualified filenames based on the base directory anchor.
*
* @return an array of files to include in the classpath
*/
File[] getIncludes();
/**
* Resolves the specified include and exclude directives from
* the base directory anchor and produces an array of files
* to include in the classpath.
*/
void resolveFileset();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]