ilog.rules.studio.model.brl

Class IlrStudioBRLPlugin

  • java.lang.Object
    • org.eclipse.core.runtime.Plugin
      • org.eclipse.ui.plugin.AbstractUIPlugin
        • ilog.rules.studio.shared.util.IlrAbstractUIPlugin
          • ilog.rules.studio.model.brl.IlrStudioBRLPlugin
  • All Implemented Interfaces:
    ilog.rules.studio.model.builder.IlrRuleBuilderListener, ilog.rules.studio.model.vocabulary.IlrVocabularyUsageProvider, org.osgi.framework.BundleActivator


    public class IlrStudioBRLPlugin
    extends ilog.rules.studio.shared.util.IlrAbstractUIPlugin
    implements ilog.rules.studio.model.vocabulary.IlrVocabularyUsageProvider, ilog.rules.studio.model.builder.IlrRuleBuilderListener
    The Plug-in class that enables support of BRL feature in Rule Designer. BRL regroups all functionnalities related to the edition and the management of Business Rules in Rule Designer. This includes the Business Rules Language Development Framework that allows creation of custom business rule languages and the support of the Business Action Language. This plug-in class provides utility methods that allow manipulation of BRL rules in Rule Designer. You can retrieve the only instance of this plug-in by calling the IlrStudioBRLPlugin.getDefault() static method.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String PLUGIN_ID
      The plug-in identifier of the business rule language Rule Designer supports (value "ilog.rules.studio.model.brl").
      • Fields inherited from class org.eclipse.core.runtime.Plugin

        PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      static IlrBRLRule getBRLRule(org.eclipse.core.resources.IFile file)
      This helper methods returns a BRL Rule object from the given file, if the file represents a Business Rule.
      static IlrBRLService getBRLService(IlrRuleProject ruleProject)
      This helper method returns the BRLService associated to the given rule project.
      static IlrBRLService getBRLService(org.eclipse.core.resources.IProject project)
      This helper method return the BRLService associated to the given Eclipse project, provided that it corresponds to a valid Rule Project.
      static IlrStudioBRLPlugin getDefault()
      Returns the shared instance of StudioBRLPlugin.
      static java.lang.String getLanguage(org.eclipse.emf.ecore.EClass ruleClass)
      This method returns the BRL language associated to the given rule class.
      IlrBRLDefinition getLanguageDefinition(java.lang.String definitionName, java.util.Locale locale)
      This method returns the language definition identified by the given definition name, for the given Locale.
      static java.lang.String getPluginId()
      This method returns the symbolic name of this plugin
      static org.eclipse.core.resources.IWorkspace getWorkspace()
      Returns the workspace instance.
      • Methods inherited from class ilog.rules.studio.shared.util.IlrAbstractUIPlugin

        getActivePage, getActiveWorkbenchShell, getActiveWorkbenchWindow, getBundleLocalizationString, getDebugOption, getErrorString, getExceptionHandler, getFormattedErrorString, getFormattedString, getFormattedString, getFormattedString, getLogger, getMessages, getString, getString, printToMessageConsole, registerMessages, start, stop, unregisterMessages
      • Methods inherited from class org.eclipse.ui.plugin.AbstractUIPlugin

        createImageRegistry, getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, initializeDefaultPluginPreferences, initializeDefaultPreferences, initializeImageRegistry, loadDialogSettings, loadPreferenceStore, refreshPluginActions, saveDialogSettings, savePreferenceStore, shutdown, startup
      • Methods inherited from class org.eclipse.core.runtime.Plugin

        find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, toString
      • Methods inherited from class java.lang.Object

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

      • PLUGIN_ID

        public static final java.lang.String PLUGIN_ID
        The plug-in identifier of the business rule language Rule Designer supports (value "ilog.rules.studio.model.brl").
        See Also:
        Constant Field Values
    • Method Detail

      • getDefault

        public static IlrStudioBRLPlugin getDefault()
        Returns the shared instance of StudioBRLPlugin.
        Returns:
        The plug-in instance, or null if the plug-in has not been loaded correctly.
      • getBRLRule

        public static IlrBRLRule getBRLRule(org.eclipse.core.resources.IFile file)
        This helper methods returns a BRL Rule object from the given file, if the file represents a Business Rule. Note that this method loads the corresponding Rule Model object if it has not been loaded before.
        Parameters:
        file - The Eclipse resource file.
        Returns:
        The BRL rule if the given file is a .brl file corresponding to a BRL Rule, or null otherwise.
      • getLanguageDefinition

        public IlrBRLDefinition getLanguageDefinition(java.lang.String definitionName,
                                             java.util.Locale locale)
        This method returns the language definition identified by the given definition name, for the given Locale. The language must have been registered though the Business Rule Language Extension Point.
        Parameters:
        definitionName - The name of the BRL language.
        locale - The locale.
        Returns:
        The BRL Definition object, or null if the language is not registered.
      • getLanguage

        public static java.lang.String getLanguage(org.eclipse.emf.ecore.EClass ruleClass)
        This method returns the BRL language associated to the given rule class.
        Parameters:
        ruleClass - The rule class.
        Returns:
        The name of the BRL language associated to this class or null if none or if the given class is not a rule class.
      • getWorkspace

        public static org.eclipse.core.resources.IWorkspace getWorkspace()
        Returns the workspace instance.
      • getPluginId

        public static java.lang.String getPluginId()
        This method returns the symbolic name of this plugin
        Returns:
        the symbolic name of this plugin
      • getBRLService

        public static IlrBRLService getBRLService(IlrRuleProject ruleProject)
        This helper method returns the BRLService associated to the given rule project.
        Parameters:
        ruleProject - The rule project for which the BRL service is requested.
        Returns:
        The BRLService associated of this rule project.
      • getBRLService

        public static IlrBRLService getBRLService(org.eclipse.core.resources.IProject project)
        This helper method return the BRLService associated to the given Eclipse project, provided that it corresponds to a valid Rule Project.
        Parameters:
        project - The Eclipse project for which the BRL service is requested.
        Returns:
        The BRLService associated to this rule project or null if the given project is not a rule project.

© Copyright IBM Corp. 1987, 2017