/** * This is a factory method for this DefaultDialect configuration. * The factory method is a best practice for the case where the * actual object construction is changed in the future. * * @param name the name of the dialect to be configured as default * * @return the actual type safe default dialect configuration. */ public static DefaultDialectOption get( String name ) { return new DefaultDialectOption( name ); }
public static KBuilderSeverityOption get( String key, ResultSeverity severity ) { return new KBuilderSeverityOption( key, severity ); }
/** * This is a factory method for this DefaultPackageName configuration. * The factory method is a best practice for the case where the * actual object construction is changed in the future. * * @param packageName the name of the package to be configured as default * * @return the actual type safe default package name configuration. */ public static DefaultPackageNameOption get( String packageName ) { return new DefaultPackageNameOption( packageName ); }
/** * This is a factory method for this DumpDirectoryOption configuration. * The factory method is a best practice for the case where the * actual object construction is changed in the future. * * @param dir the directory to which drools will dump files * * @return the actual type safe dump directory configuration. */ public static DumpDirOption get( File dir ) { return new DumpDirOption( dir ); }
/** * This is a factory method for this AccumulateFunction configuration. * The factory method is a best practice for the case where the * actual object construction is changed in the future. * * @param name the name of the function to be configured * * @return the actual type safe accumulate function configuration. */ public static AccumulateFunctionOption get( final String name, final AccumulateFunction function ) { return new AccumulateFunctionOption( name, function ); }
/** * This is a factory method for this EvaluatorOption configuration. * The factory method is a best practice for the case where the * actual object construction is changed in the future. * * @param key the key of the evaluator to be configured * @param evaluator the evaluator definition * * @return the actual type safe default dialect configuration. */ public static EvaluatorOption get( final String key, final EvaluatorDefinition evaluator ) { return new EvaluatorOption( key, evaluator ); }
@SuppressWarnings("unchecked") public <T extends SingleValueKnowledgeBuilderOption> T getOption(Class<T> option) { if ( DefaultDialectOption.class.equals( option ) ) { return (T) this.defaultDialect; } else if ( DumpDirOption.class.equals( option ) ) { return (T) DumpDirOption.get( this.dumpDirectory ); } else if ( ProcessStringEscapesOption.class.equals( option ) ) { return (T) (this.processStringEscapes ? ProcessStringEscapesOption.YES : ProcessStringEscapesOption.NO); } else if ( DefaultPackageNameOption.class.equals( option ) ) { return (T) DefaultPackageNameOption.get( this.defaultPackageName ); } else if ( ClassLoaderCacheOption.class.equals( option ) ) { return (T) (this.classLoaderCache ? ClassLoaderCacheOption.ENABLED : ClassLoaderCacheOption.DISABLED); } else if ( PropertySpecificOption.class.equals( option ) ) { return (T)propertySpecificOption; } return null; }
public String getDefaultDialect() { return this.defaultDialect.getName(); }
public void setDefaultDialect(String defaultDialect) { this.defaultDialect = DefaultDialectOption.get( defaultDialect ); }
/** * This is a factory method for this DefaultDialect configuration. * The factory method is a best practice for the case where the * actual object construction is changed in the future. * * @param name the name of the dialect to be configured as default * * @return the actual type safe default dialect configuration. */ public static DefaultDialectOption get( String name ) { return new DefaultDialectOption( name ); }
/** * This is a factory method for this DefaultPackageName configuration. * The factory method is a best practice for the case where the * actual object construction is changed in the future. * * @param packageName the name of the package to be configured as default * * @return the actual type safe default package name configuration. */ public static DefaultPackageNameOption get( String packageName ) { return new DefaultPackageNameOption( packageName ); }
/** * This is a factory method for this DumpDirectoryOption configuration. * The factory method is a best practice for the case where the * actual object construction is changed in the future. * * @param dir the directory to which drools will dump files * * @return the actual type safe dump directory configuration. */ public static DumpDirOption get( File dir ) { return new DumpDirOption( dir ); }
/** * This is a factory method for this AccumulateFunction configuration. * The factory method is a best practice for the case where the * actual object construction is changed in the future. * * @param name the name of the function to be configured * * @return the actual type safe accumulate function configuration. */ public static AccumulateFunctionOption get( final String name, final AccumulateFunction function ) { return new AccumulateFunctionOption( name, function ); }
/** * This is a factory method for this EvaluatorOption configuration. * The factory method is a best practice for the case where the * actual object construction is changed in the future. * * @param key the key of the evaluator to be configured * @param evaluator the evaluator definition * * @return the actual type safe default dialect configuration. */ public static EvaluatorOption get( final String key, final EvaluatorDefinition evaluator ) { return new EvaluatorOption( key, evaluator ); }
public static KBuilderSeverityOption get( String key, ResultSeverity severity ) { return new KBuilderSeverityOption( key, severity ); }
/** * This is a factory method for this DefaultDialect configuration. * The factory method is a best practice for the case where the * actual object construction is changed in the future. * * @param name the name of the dialect to be configured as default * * @return the actual type safe default dialect configuration. */ public static DefaultDialectOption get( String name ) { return new DefaultDialectOption( name ); }
/** * This is a factory method for this DefaultPackageName configuration. * The factory method is a best practice for the case where the * actual object construction is changed in the future. * * @param packageName the name of the package to be configured as default * * @return the actual type safe default package name configuration. */ public static DefaultPackageNameOption get( String packageName ) { return new DefaultPackageNameOption( packageName ); }
/** * This is a factory method for this DumpDirectoryOption configuration. * The factory method is a best practice for the case where the * actual object construction is changed in the future. * * @param dir the directory to which drools will dump files * * @return the actual type safe dump directory configuration. */ public static DumpDirOption get( File dir ) { return new DumpDirOption( dir ); }
/** * This is a factory method for this AccumulateFunction configuration. * The factory method is a best practice for the case where the * actual object construction is changed in the future. * * @param name the name of the function to be configured * * @return the actual type safe accumulate function configuration. */ public static AccumulateFunctionOption get( final String name, final AccumulateFunction function ) { return new AccumulateFunctionOption( name, function ); }
/** * This is a factory method for this EvaluatorOption configuration. * The factory method is a best practice for the case where the * actual object construction is changed in the future. * * @param key the key of the evaluator to be configured * @param evaluator the evaluator definition * * @return the actual type safe default dialect configuration. */ public static EvaluatorOption get( final String key, final EvaluatorDefinition evaluator ) { return new EvaluatorOption( key, evaluator ); }