Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tools.ant.taskdefs.optional.ide
Class VAJImport

    java.lang.Object
      |
      +--org.apache.tools.ant.Task
            |
            +--org.apache.tools.ant.taskdefs.optional.ide.VAJImport

public class VAJImport
extends Task

Import source, class files, and resources to the Visual Age for Java workspace using FileSets.

Example:

     <vajimport project="MyVAProject">
       <fileset dir="src">
         <include name="org/foo/subsystem1/**" />
         <exclude name="/org/foo/subsystem1/test/**" />
      </fileset>
     </vajexport>

import all source and resource files from the "src" directory which start with 'org.foo.subsystem1', except of these starting with 'org.foo.subsystem1.test' into the project MyVAProject.

If MyVAProject isn't loaded into the Workspace, a new edition is created in the repository and automatically loaded into the Workspace. There has to be at least one nested FileSet element.

There are attributes to choose which items to export:

Attribute | Description | Required
vajproject | the name of the Project to import to | Yes
importSources | import Java sources, defaults to "yes" | No
importResources | import resource files (anything that doesn't end with .java or .class), defaults to "yes" | No
importClasses | import class files, defaults to "no" | No

Field Summary
`protected java.util.Vector` | `filesets`
`protected boolean` | `importClasses`
`protected java.lang.String` | `importProject`
`protected boolean` | `importResources`
`protected boolean` | `importSources`
`protected com.ibm.ivj.util.base.Project` | `vajproject`

Fields inherited from class org.apache.tools.ant.Task
`description, location, project, target, taskName, taskType, wrapper`

Constructor Summary
`VAJImport()`

Method Summary
`void` | `addFileset(FileSet set)` Adds a set of files (nested fileset attribute).
`void` | `execute()` Do the import.
`protected com.ibm.ivj.util.base.Project` | `getVAJProject()` Try to get the project we want from the Workspace.
`protected void` | `importFileset(FileSet fileset)` Import all files from the fileset into the Project in the Workspace.
`protected void` | `logFiles(java.util.Vector fileNames, java.lang.String fileType)` Logs a list of file names to the message log
`protected void` | `scan(java.io.File dir, java.lang.String[] files, java.util.Vector classes, java.util.Vector sources, java.util.Vector resources)` Sort the files into classes, sources, and resources.
`void` | `setImportClasses(boolean importClasses)` Import .class files.
`void` | `setImportResources(boolean importResources)` Import resource files (anything that doesn't end in .class or .java)
`void` | `setImportSources(boolean importSources)` Import .java files
`void` | `setVajproject(java.lang.String projectName)` The VisualAge for Java Project name to import into.

Methods inherited from class org.apache.tools.ant.Task
`getDescription, getLocation, getOwningTarget, getProject, getRuntimeConfigurableWrapper, getTaskName, init, log, log, maybeConfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### filesets

    protected java.util.Vector filesets

### importSources

    protected boolean importSources

### importResources

    protected boolean importResources

### importClasses

    protected boolean importClasses

### importProject

    protected java.lang.String importProject

### vajproject

    protected com.ibm.ivj.util.base.Project vajproject

Constructor Detail

### VAJImport

    public VAJImport()

Method Detail

### setVajproject

    public void setVajproject(java.lang.String projectName)

  The VisualAge for Java Project name to import into.

### addFileset

    public void addFileset(FileSet set)

  Adds a set of files (nested fileset attribute).

### setImportClasses

    public void setImportClasses(boolean importClasses)

  Import .class files.

### setImportResources

    public void setImportResources(boolean importResources)

  Import resource files (anything that doesn't end in .class or .java)

### setImportSources

    public void setImportSources(boolean importSources)

  Import .java files

### execute

    public void execute()
                 throws BuildException

  Do the import.
  Overrides:
    `execute` in class `Task`
  Following copied from class: `org.apache.tools.ant.Task`
  Throws:
    `BuildException` - if someting goes wrong with the build

### getVAJProject

    protected com.ibm.ivj.util.base.Project getVAJProject()

  Try to get the project we want from the Workspace.

### importFileset

    protected void importFileset(FileSet fileset)

  Import all files from the fileset into the Project in the Workspace.

### scan

    protected void scan(java.io.File dir,
                        java.lang.String[] files,
                        java.util.Vector classes,
                        java.util.Vector sources,
                        java.util.Vector resources)

  Sort the files into classes, sources, and resources.

### logFiles

    protected void logFiles(java.util.Vector fileNames,
                            java.lang.String fileType)

  Logs a list of file names to the message log
  Parameters:
    `fileNames` - java.util.Vector file names to be logged
    `type` - java.lang.String file type

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 Apache Software Foundation. All Rights Reserved.