Class SimplePackageSelector

  • All Implemented Interfaces:
    InstallationController.PackageSelector

    public class SimplePackageSelector
    extends java.lang.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.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.PrintWriter _stdErr  
      private java.io.BufferedReader _stdIn  
      private java.io.PrintWriter _stdOut  
    • Constructor Summary

      Constructors 
      Constructor Description
      SimplePackageSelector()
      Default constructor.
      SimplePackageSelector​(java.io.PrintWriter stdOut, java.io.PrintWriter stdErr)
      Constructor that takes given standard console streams writers.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.File selectPackageDirectory​(java.lang.String componentId)
      Allows entering the installation directory path for a given component from the console window.
      java.io.File selectPackageFile​(java.lang.String componentId)
      Allows entering the PEAR file path for a given component from the console window.
      java.net.URL selectPackageUrl​(java.lang.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
    • Field Detail

      • _stdOut

        private java.io.PrintWriter _stdOut
      • _stdErr

        private java.io.PrintWriter _stdErr
      • _stdIn

        private java.io.BufferedReader _stdIn
    • Constructor Detail

      • SimplePackageSelector

        public SimplePackageSelector​(java.io.PrintWriter stdOut,
                                     java.io.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 java.io.File selectPackageDirectory​(java.lang.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 java.io.File selectPackageFile​(java.lang.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 java.net.URL selectPackageUrl​(java.lang.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.