ilog.rules.studio.model.archive

Class IlrRulesetArchiveExporter

  • java.lang.Object
    • ilog.rules.studio.model.archive.IlrRulesetArchiveExporter


  • public class IlrRulesetArchiveExporter
    extends java.lang.Object
    Creates a Ruleset Archive from a Rule Project, optionally using an Extractor for classic rule projects or an Operation for Decision Service projects. The archive is created in memory and may be optionally persisted to disk.

    Note that before creating the ruleset archive this class performs an incremental build on the rule project to ensure that the contents of the output directory is up to date.

    The Eclipse scheduling rule for this utility class is the workspace root (because a build is triggered). This class must therefore not be called with a scheduling rule that can not be contained by the workspace root.

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      IlrRulesetArchive export(org.eclipse.core.runtime.IProgressMonitor monitor, boolean useJob, boolean user, java.lang.String filePath)
      Creates an archive file at a given path.
      IlrRulesetArchive export(java.lang.String filePath)
      Creates an archive file pointed at a given path.
      void exportAsync(org.eclipse.core.runtime.IProgressMonitor monitor, boolean user, java.lang.String filePath)
      Creates the archive file at a given.
      • Methods inherited from class java.lang.Object

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

      • IlrRulesetArchiveExporter

        public IlrRulesetArchiveExporter(IlrRuleProject ruleProject)
        Creates an exporter for this rule project.
        Parameters:
        ruleProject -
      • IlrRulesetArchiveExporter

        @Deprecated
        public IlrRulesetArchiveExporter(IlrExtractor extractor)
        Deprecated. This method is not applicable to decision service projects. Use IlrRulesetArchiveExporter(IlrRuleProject,String) instead.
        Creates an exporter for the given extractor (which corresponds to a rule project).
        Parameters:
        extractor -
      • IlrRulesetArchiveExporter

        public IlrRulesetArchiveExporter(IlrRuleProject ruleProject,
                                 java.lang.String selectorName)
        Creates an exporter for this rule project and an extractor or an operation name (respectively for classic rule projects or decision service projects).
        Throws:
        java.lang.IllegalArgumentException - if there is no extractor or operation with the given selector name.
        Parameters:
        ruleProject -
        selectorName - name of a ruleset extractor defined on the given classic rule project, or name of an operation if the given rule project is a decision service.
    • Method Detail

      • export

        public IlrRulesetArchive export(java.lang.String filePath)
                                 throws java.lang.Exception

        Creates an archive file pointed at a given path. If filePath is null, no file is created, but the IlrRulesetArchive object is still returned.

        Note that this method will trigger an incremental build prior to exporting the project contents.

        An Eclipse Job is not created using this method.

        Throws:
        java.io.IOException
        java.lang.Exception
        Parameters:
        filePath - Path to the archive file. This path can be absolute, or relative to the current rule project.
      • export

        public IlrRulesetArchive export(org.eclipse.core.runtime.IProgressMonitor monitor,
                               boolean useJob,
                               boolean user,
                               java.lang.String filePath)
                                 throws java.lang.Exception

        Creates an archive file at a given path. If filePath is null, no file is created, but the IlrRulesetArchive object is still returned. The methods blocks until the export is complete.

        Note that this method will trigger an incremental build prior to exporting the project contents.

        IMPORTANT:
        An Eclipse Job may optionally be created for the ruleset export operation. Note that Eclipse will hang if an Eclipse Job is created while a modal dialog is being displayed.

        Throws:
        java.io.IOException
        java.lang.Exception
        Parameters:
        monitor - the progress monitor to use
        useJob - if true an Eclipse Job is created for the archive export operation.
        user - whether the Job created for ruleset export should be a user initiated job. Ignored if useJob is false.
        filePath - Path to the archive file. This path can be absolute, or relative to the current rule project.
      • exportAsync

        public void exportAsync(org.eclipse.core.runtime.IProgressMonitor monitor,
                       boolean user,
                       java.lang.String filePath)
                         throws java.lang.Exception
        Creates the archive file at a given. This method exports the ruleset archive asynchronously and hence does not block the calling thread. Note that this method will trigger an incremental build prior to exporting the project contents.
        Throws:
        java.lang.Exception
        Parameters:
        monitor - the progress monitor to use
        user - whether the Job created for ruleset export should be a user initiated job
        filePath - Path to the archive file. This path can be absolute, or relative to the current rule project. Must not be bull.

© Copyright IBM Corp. 1987, 2017