org.kie.internal.definition.rule.InternalRule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kie-internal Show documentation
Show all versions of kie-internal Show documentation
The Drools and jBPM internal API which is NOT backwards compatible between releases.
/*
* Copyright 2015 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.kie.internal.definition.rule;
import java.util.Calendar;
import org.kie.api.definition.rule.Rule;
import org.kie.api.io.Resource;
/**
* Internal Rule interface for runtime rule inspection.
*/
public interface InternalRule extends Rule {
/**
* Returns the {@link Resource} of this rule.
*
* @return the {@link Resource}.
*/
Resource getResource();
/**
* Returns the dialect property of this rule.
*
* @return the dialect.
*/
String getDialect();
/**
* Determine if this rule is internally consistent and valid. This will include checks to make sure the rules semantic components
* (actions and predicates) are valid.
*
* No exception is thrown.
*
* A Rule
must include at least one parameter declaration and one condition.
*
*
* @return true
if this rule is valid, else false
.
*/
boolean isValid();
/**
* Returns the value of the salience
attribute.
*
* @return the salience
property value.
*/
int getSalienceValue();
/**
* Returns true
if the rule uses dynamic salience, false
otherwise.
*
* @return true
if the rule uses dynamic salience, else false
.
*/
boolean isSalienceDynamic();
/**
* Returns the agenda-group
rule property.
*
* @return the agenda-group
property value.
*/
String getAgendaGroup();
/**
* Returns the no-loop
rule property.
*
* @return the no-loop
property value.
*/
boolean isNoLoop();
/**
* Returns the auto-focus
rule property.
*
* @return the auto-focus
property value.
*/
boolean getAutoFocus();
/**
* Returns the activation-group
rule property.
*
* @return the activation-group
property value.
*/
String getActivationGroup();
/**
* Returns the ruleflow-group
rule property.
*
* @return the ruleflow-group
property value.
*/
String getRuleFlowGroup();
/**
* Returns the lock-on-active
rule property.
*
* @return the lock-on-active
property value.
*/
boolean isLockOnActive();
/**
* Returns the date-effective
rule property as a {@link Calendar}.
*
* @return the date-effective
property value.
*/
Calendar getDateEffective();
/**
* Returns the date-expires
rule property as a {@link Calendar}.
*
* @return the date-expires
property value.
*/
Calendar getDateExpires();
/**
* Returns the fully qualified name of the rule (package + rule name)
*
* @return the fully qualified name of the rule
*/
String getFullyQualifiedName();
/**
* Returns true if the rule is part of default agenda group. False otherwise
* @return
*/
boolean isMainAgendaGroup();
}