![JAR search and dependency download from the Maven repository](/logo.png)
de.tsl2.nano.specification.rules.RuledEnabler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tsl2.nano.specification Show documentation
Show all versions of tsl2.nano.specification Show documentation
TSL2 Framework Specification (Pools of descripted and runnable Actions and Rules, Generic Tree)
The newest version!
package de.tsl2.nano.specification.rules;
import org.simpleframework.xml.Attribute;
import de.tsl2.nano.action.IActivable;
import de.tsl2.nano.bean.def.BeanValue;
import de.tsl2.nano.bean.def.IAttributeDefinition;
import de.tsl2.nano.core.ENV;
import de.tsl2.nano.core.util.Util;
import de.tsl2.nano.specification.Pool;
/**
* NOT FINISHED YET! The injection of beanvalue after deserialization must be implemented!
*
* @author ts
*/
public class RuledEnabler implements IActivable {
transient BeanValue> context;
@Attribute
String ruleName;
RuledEnabler() {
}
public RuledEnabler(IAttributeDefinition attr, String ruleName) {
this.ruleName = ruleName;
}
@Override
public boolean isActive() {
return Util.isTrue(ENV.get(Pool.class).get(ruleName).run(context));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy