ilog.rules.studio.res.generator.impl
Class IlrPOJOGenerator
- java.lang.Object
-
- ilog.rules.studio.res.generator.IlrFileGenerator
-
- ilog.rules.studio.res.generator.IlrVelocityGenerator
-
- ilog.rules.studio.res.generator.IlrTraceFileGenerator
-
- 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
Nested Classes Modifier and Type Class and Description 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, JAR_EXTENSION
-
-
Constructor Summary
Constructors Constructor and Description IlrPOJOGenerator()
Constructs a new generator.
-
Method Summary
Methods Modifier and Type Method and Description protected java.lang.String
getAntDefaultTarget()
protected java.lang.String
getAntJVMArguments()
protected java.lang.String
getAntRunnerClassFullyQualifiedName()
protected java.lang.String
getFileHeader()
Gets the header so that it can be added to the beginning of each generated file.protected java.lang.String
getFilePrefix()
Gets the file prefix so that it can be added to the beginning of each class and file name.java.lang.String
getJavaSuffixClass()
Returns the Java suffix used for interface namejava.lang.String
getJavaSuffixClassImpl()
Returns the Java suffix used for implementation namejava.lang.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 java.lang.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()
Returnstrue
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, getTemplateBundle, 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
-
-
-
-
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()
Returnstrue
if the execution server module is installed. Returns code>false otherwise.- Overrides:
isAllowed
in classIlrFileGenerator
- Since:
- JRules 6.5.1
- Returns:
- code>true if the generator is allowed to run, otherwise returns code>false.
-
getNotAllowedDescription
public java.lang.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 methodisAllowed()
controls if this message must be displayed or not. The message will be displayed instead of the generator description.- Overrides:
getNotAllowedDescription
in classIlrFileGenerator
- 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 classIlrFileGenerator
- Parameters:
ruleappProject
- The RuleApp project selected in the wizard.
-
getPackagePrefix
protected java.lang.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 java.lang.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 java.lang.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 java.lang.String getJavaSuffixClass()
Returns the Java suffix used for interface name- Returns:
- String
-
getJavaSuffixClassImpl
public java.lang.String getJavaSuffixClassImpl()
Returns the Java suffix used for implementation name- Returns:
- String
-
getAntDefaultTarget
protected java.lang.String getAntDefaultTarget()
-
getAntRunnerClassFullyQualifiedName
protected java.lang.String getAntRunnerClassFullyQualifiedName()
-
getAntJVMArguments
protected java.lang.String getAntJVMArguments()
-
-