ilog.rules.studio.automation

Class IlrAutomator

  • java.lang.Object
    • ilog.rules.studio.automation.IlrAutomator
  • All Implemented Interfaces:
    org.eclipse.equinox.app.IApplication


    public class IlrAutomator
    extends java.lang.Object
    implements org.eclipse.equinox.app.IApplication

    A class intended for command line project automation. It can import a list of projects into a workspace, apply an extension model and clean/build them to generate ruleset archives.

    The class supports command line arguments defined in the IlrBuildCommandLineArguments class. See the details of IlrBuildCommandLineArguments for a description of each command line argument.

    The example below (for Linux) imports two projects into the workspace (the Java project rulesetextraction_xom and the Rule Project rulesetextraction_rules). The rulesetextraction_rules project is then cleaned and built, using the build options BUILD_CHECK_IRL and BUILD_INCLUDES_RULE_VALIDATION before the ruleset archive is generated.

    -os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -importPath /sample/workspace/rulesetextraction_xom:/sample/workspace/rulesetextraction_rules -cleanBuild -buildOptions BUILD_CHECK_IRL|BUILD_INCLUDES_RULE_VALIDATION rulesetextraction_rules

    This class implements the IApplication Eclipse interface and can be automatically invoked when Eclipse starts (in either GUI or headless mode) by specifying the -application argument.

    See Also:
    IlrBuildCommandLineArguments
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int ERROR_BAD_ARGUMENTS
      A return value (2) indicating that the arguments to the IApplication are invalid
      static int ERROR_BUILD_FAILED
      A return value (4) indicating that one of the projects failed to build and the build was stopped because the failFast flag had been set
      static int ERROR_EXCEPTION
      A return value (1) indicating that an exception was thrown while running the IApplication
      static int USAGE_REQUESTED
      A return value (3) indicating that the user requested usage information to be printed
      • Fields inherited from interface org.eclipse.equinox.app.IApplication

        EXIT_OK, EXIT_RELAUNCH, EXIT_RESTART
    • Constructor Summary

      Constructors 
      Constructor and Description
      IlrAutomator() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.lang.Object run(java.lang.String[] args)
      Executes the build cycle on the list of rule projects specified in the args.
      java.lang.Object start(org.eclipse.equinox.app.IApplicationContext context)
      The entry point for Eclipse IApplication implementations.
      void stop()
      Stop method for the IApplication, called by the framework.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ERROR_EXCEPTION

        public static final int ERROR_EXCEPTION
        A return value (1) indicating that an exception was thrown while running the IApplication
        See Also:
        Constant Field Values
      • ERROR_BAD_ARGUMENTS

        public static final int ERROR_BAD_ARGUMENTS
        A return value (2) indicating that the arguments to the IApplication are invalid
        See Also:
        Constant Field Values
      • USAGE_REQUESTED

        public static final int USAGE_REQUESTED
        A return value (3) indicating that the user requested usage information to be printed
        See Also:
        Constant Field Values
      • ERROR_BUILD_FAILED

        public static final int ERROR_BUILD_FAILED
        A return value (4) indicating that one of the projects failed to build and the build was stopped because the failFast flag had been set
        See Also:
        Constant Field Values
    • Constructor Detail

      • IlrAutomator

        public IlrAutomator()
    • Method Detail

      • start

        public java.lang.Object start(org.eclipse.equinox.app.IApplicationContext context)
                               throws java.lang.Exception
        The entry point for Eclipse IApplication implementations.
        Specified by:
        start in interface org.eclipse.equinox.app.IApplication
        Throws:
        java.lang.Exception
      • run

        public java.lang.Object run(java.lang.String[] args)
                             throws java.lang.Exception
        Executes the build cycle on the list of rule projects specified in the args. A -? argument prints usage information.
        Throws:
        java.lang.Exception
        Parameters:
        args - the command line arguments
        Returns:
        IApplication.EXIT_OK (0) on success
      • stop

        public void stop()
        Stop method for the IApplication, called by the framework.
        Specified by:
        stop in interface org.eclipse.equinox.app.IApplication

© Copyright IBM Corp. 1987, 2017