Rule Execution Server API

ilog.rules.studio.res.generator.impl
Class IlrPOJOGenerator

java.lang.Object
  extended by ilog.rules.studio.res.generator.IlrFileGenerator
      extended by ilog.rules.studio.res.generator.IlrVelocityGenerator
          extended by ilog.rules.studio.res.generator.IlrTraceFileGenerator
              extended by ilog.rules.studio.res.generator.impl.IlrPOJOGenerator
All Implemented Interfaces:
org.eclipse.jface.wizard.IWizardNode
Direct Known Subclasses:
IlrWebServiceGenerator

public class IlrPOJOGenerator
extends IlrTraceFileGenerator

This class manages templates for a Java project for RuleApps. The template generates a Java project for Ruleapps, with a bean class that executes a RuleApp on J2SE using either file or database persistence.

Since:
JRules 6.0

Nested Class Summary
 class IlrPOJOGenerator.PojoRulesetArchive
          Stores a ruleset archive name and version with two lists of parameters: an in ruleset parameters list ( the in and inout ruleset parameters) an out ruleset parameters list ( the inout and out ruleset parameters)
 
Nested classes/interfaces inherited from class ilog.rules.studio.res.generator.IlrFileGenerator
IlrFileGenerator.Parameter, IlrFileGenerator.RuleApp, IlrFileGenerator.RulesetArchive
 
Field Summary
 
Fields inherited from class ilog.rules.studio.res.generator.IlrFileGenerator
contentCreated
 
Constructor Summary
IlrPOJOGenerator()
          Constructs a new generator.
 
Method Summary
protected  String getAntDefaultTarget()
           
protected  String getAntJVMArguments()
           
protected  String getAntRunnerClassFullyQualifiedName()
           
protected  String getFileHeader()
          Gets the header so that it can be added to the beginning of each generated file.
protected  String getFilePrefix()
          Gets the file prefix so that it can be added to the beginning of each class and file name.
 String getJavaSuffixClass()
          Returns the Java suffix used for interface name
 String getJavaSuffixClassImpl()
          Returns the Java suffix used for implementation name
 String getNotAllowedDescription()
          Returns the message to display in the 'Client Project for RuleApps' wizard if the generator is not allowed to display the reason why.
protected  String getPackagePrefix()
          Gets the package prefix where the classes are generated.
 void initialize(IlrRuleAppProject ruleappProject)
          Initializes the generator with the data specified in the wizard.
 boolean isAllowed()
          Returns true if the execution server module is installed.
 
Methods inherited from class ilog.rules.studio.res.generator.IlrTraceFileGenerator
generateProjectContent, getInfoAllRules, getInfoAllTasks, getInfoBoundObjectByRule, getInfoExecutionDate, getInfoExecutionDuration, getInfoExecutionEvents, getInfoNumRulesFired, getInfoNumRulesNotFired, getInfoNumTasksExecuted, getInfoNumTasksNotExecuted, getInfoOutputParameters, getInfoOutputString, getInfoRulesFired, getInfoRulesNotFired, getInfoSystemProperties, getInfoTasksFired, getInfoTasksNotExecuted, getInfoWorkingMemory, getTemplateDirectory, getWorkingMemoryFilter, initializeContext, isGeneratedTraceFile, setGeneratedTraceFile, setInfoAllRules, setInfoAllTasks, setInfoBoundObjectByRule, setInfoExecutionDate, setInfoExecutionDuration, setInfoExecutionEvents, setInfoNumRulesFired, setInfoNumRulesNotFired, setInfoNumTasksExecuted, setInfoNumTasksNotExecuted, setInfoOutputParameters, setInfoOutputString, setInfoRulesFired, setInfoRulesNotFired, setInfoSystemProperties, setInfoTasksFired, setInfoTasksNotExecuted, setInfoWorkingMemory, setWorkingMemoryFilter
 
Methods inherited from class ilog.rules.studio.res.generator.IlrVelocityGenerator
generateVelocityFile, generateVelocityFile, generateVelocityFileInSrc, generateVelocityFileInSrc, getGeneratedExtension, getGeneratedFileName, getGeneratedName
 
Methods inherited from class ilog.rules.studio.res.generator.IlrFileGenerator
addContainerEntryInClasspath, addLibraryEntryInClasspath, addProjectEntryInClasspath, addVariableEntryInClasspath, changeInClassName, changeInMethodName, completeProjectFromTemplate, copyFile, createPackage, createProjectFromTemplate, generateLaunchConfigurationFile, generateProjectContent, generateProjectContent, generateProjectContent, getCompletionWizard, getCreationWizard, getExecutionServerHome, getInParameters, getInParameters, getInParameters, getInParameters, getInParametersImports, getInParametersImports, getJavaProject, getJavaProjectNameAsClassName, getLaunchConfigurationName, getNewParameter, getNewRulesetArchive, getOutParameters, getOutParameters, getOutParametersImports, getParameters, getParameters, getParametersImports, getProject, getRuleAppProject, getRulesetArchives, getRulesetArchives, getRuleStudioHome, getSignatures, getUTF8CharsetAsString, getWizard, getXOMPath, isJavaProject, setJavaNature, setSignatures
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.wizard.IWizardNode
dispose, getExtent, isContentCreated
 

Constructor Detail

IlrPOJOGenerator

public IlrPOJOGenerator()
Constructs a new generator. The class that extends this class must declare a public default constructor that calls this constructor. The default constructor is the only one called to create a generator.

Since:
JRules 6.6
Method Detail

isAllowed

public boolean isAllowed()
Returns true if the execution server module is installed. Returns code>false otherwise.

Overrides:
isAllowed in class IlrFileGenerator
Since:
JRules 6.5.1
Returns:
code>true if the generator is allowed to run, otherwise returns code>false.

getNotAllowedDescription

public String getNotAllowedDescription()
Returns the message to display in the 'Client Project for RuleApps' wizard if the generator is not allowed to display the reason why. The method isAllowed() controls if this message must be displayed or not. The message will be displayed instead of the generator description.

Overrides:
getNotAllowedDescription in class IlrFileGenerator
Since:
JRules 6.5.1
Returns:
The message to display if the generator is not allowed.

initialize

public void initialize(IlrRuleAppProject ruleappProject)
Initializes the generator with the data specified in the wizard.

Overrides:
initialize in class IlrFileGenerator
Parameters:
ruleappProject - The RuleApp project selected in the wizard.

getPackagePrefix

protected String getPackagePrefix()
Gets the package prefix where the classes are generated.

The default value is the RuleApp project name.

Returns:
The package prefix name.

getFilePrefix

protected String getFilePrefix()
Gets the file prefix so that it can be added to the beginning of each class and file name.

The default value is an empty string.

Returns:
The file prefix.

getFileHeader

protected String getFileHeader()
Gets the header so that it can be added to the beginning of each generated file.

The default value returned is an IBM copyright statement.

Returns:
The header to put at the beginning of each generated file.

getJavaSuffixClass

public String getJavaSuffixClass()
Returns the Java suffix used for interface name

Returns:
String

getJavaSuffixClassImpl

public String getJavaSuffixClassImpl()
Returns the Java suffix used for implementation name

Returns:
String

getAntDefaultTarget

protected String getAntDefaultTarget()

getAntRunnerClassFullyQualifiedName

protected String getAntRunnerClassFullyQualifiedName()

getAntJVMArguments

protected String getAntJVMArguments()

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013