org.apache.uima.pear.tools

## Class SimplePackageSelector

- java.lang.Object
- - org.apache.uima.pear.tools.SimplePackageSelector

- All Implemented Interfaces:
    InstallationController.PackageSelector

      public class SimplePackageSelector
      extends Object
      implements InstallationController.PackageSelector

  The `SimplePackageSelector` class provides simple command line dialog for selecting root directories of installed PEAR packages, as well as PEAR package files, which contain components that need to be installed.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimplePackageSelector()` Default constructor.
    `SimplePackageSelector(PrintWriter stdOut, PrintWriter stdErr)` Constructor that takes given standard console streams writers.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `File` | `selectPackageDirectory(String componentId)` Allows entering the installation directory path for a given component from the console window.
    `File` | `selectPackageFile(String componentId)` Allows entering the PEAR file path for a given component from the console window.
    `URL` | `selectPackageUrl(String componentId)` Allows entering the PEAR package URL for a given component from the console window.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SimplePackageSelector

          public SimplePackageSelector(PrintWriter stdOut,
                                       PrintWriter stdErr)

      Constructor that takes given standard console streams writers.
      Parameters:
        `stdOut` - The given standard output stream writer.
        `stdErr` - The given standard error stream writer.

    - #### SimplePackageSelector

          public SimplePackageSelector()

      Default constructor.

  - ### Method Detail

    - #### selectPackageDirectory

          public File selectPackageDirectory(String componentId)

      Allows entering the installation directory path for a given component from the console window.
      Specified by:
        `selectPackageDirectory` in interface `InstallationController.PackageSelector`
      Parameters:
        `componentId` - The given component ID.
      Returns:
        The installation directory for the given component or `null`, if the entered string is empty.

    - #### selectPackageFile

          public File selectPackageFile(String componentId)

      Allows entering the PEAR file path for a given component from the console window.
      Specified by:
        `selectPackageFile` in interface `InstallationController.PackageSelector`
      Parameters:
        `componentId` - The given component ID.
      Returns:
        The PEAR file for the given component or `null`, if the entered string is empty.

    - #### selectPackageUrl

          public URL selectPackageUrl(String componentId)

      Allows entering the PEAR package URL for a given component from the console window.
      Specified by:
        `selectPackageUrl` in interface `InstallationController.PackageSelector`
      Parameters:
        `componentId` - The given component ID.
      Returns:
        The PEAR package URL for the given component or `null`, if the entered string is empty.

Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.