Class App

  • All Implemented Interfaces:
    Comparable<App>

    public class App
    extends Object
    implements Comparable<App>
    App is a delegate for an XAL application to run. The XAL application should be available as an executable script. The App instance includes the path to the executable and notes to display describing the application. The instance is capable of launching the executable.
    Author:
    tap
    • Constructor Detail

      • App

        public App​(File file,
                   Rule rule)
        Constructor
        Parameters:
        file - The file of the executable.
        rule - the rule used to generate the app
    • Method Detail

      • getRule

        public Rule getRule()
        get the rule
      • getCommands

        public List<String> getCommands()
        get the command to run the application in a local environment
      • getFile

        public File getFile()
        get the file to which the app refers
      • getPath

        public String getPath()
        Get the path to the application
        Returns:
        the path to the application
      • getLabel

        public String getLabel()
        Get the label to display identifying this application
        Returns:
        the short name of the file path of the executable
      • getVersion

        public String getVersion()
        Get the version of this application
        Returns:
        the application version
      • getAuthor

        public String getAuthor()
        Get the authors of this application
        Returns:
        authors of the application
      • getLastLaunchTime

        public Date getLastLaunchTime()
        get the time of the last run for this app
      • setLastLaunchTime

        public void setLastLaunchTime​(Date runTime)
        set the last run time
      • exists

        public boolean exists()
        Test if the executable exists
        Returns:
        true if the executable exists and false if not
      • getNotes

        public String getNotes()
        Get the notes associated with the application
        Returns:
        The notes associated with the application
      • toString

        public String toString()
        Get the string representation of this instance
        Overrides:
        toString in class Object
        Returns:
        the label
        See Also:
        getLabel()
      • compareTo

        public int compareTo​(App app)
        Compare two instances. The two instances are compared by label and the comparison is based on alphebetical sorting.
        Specified by:
        compareTo in interface Comparable<App>
        Parameters:
        app - the other App against which to compare
        Returns:
        a positive number if this comes after the argument, negative if this comes before and 0 if they are equal
        See Also:
        getLabel()