if(newTransformSet == null || newTransformSet.isInstalled()) { if(oldTransformSet.isInstalled()) { if(oldTransformSet.isInstalled()) {
if(newTransformSet == null || newTransformSet.isInstalled()) { if(oldTransformSet.isInstalled()) { if(oldTransformSet.isInstalled()) {
if(newTransformSet == null || newTransformSet.isInstalled()) { if(oldTransformSet.isInstalled()) {
if(newTransformSet == null || newTransformSet.isInstalled()) { if(oldTransformSet.isInstalled()) {
/** * record the fact that a rule has been compiled with or without success * @param triggerClass the name of the trigger class to which the rule is attached * @param loader the classloader of the trigger class * @param successful true if the rule compiled successfully and false if it suffered from parse, * type or compile errors * @param detail text describing more details of the compilation outcome * @return true if the rule needs to be installed otherwise false */ public synchronized boolean recordCompile(Rule rule, String triggerClass, ClassLoader loader, boolean successful, String detail) { if(deleted) { return false; } // find an existing transform set or create a new one TransformSet transformSet = ensureTransformSet(loader, triggerClass, null); for (Transform transform : transformSet.getTransforms()) { if(transform.getRule() == rule) { transform.setCompiled(successful, detail); boolean isInstalled = transformSet.isInstalled(); // record this as the latest rule to be installed transformSet.setInstalled(rule); // if this is the first installed rule then // we need to perform lifecycle processing return !isInstalled; } } // no such rule so no lifecycle processing return false; }
/** * record the fact that a rule has been compiled with or without success * @param triggerClass the name of the trigger class to which the rule is attached * @param loader the classloader of the trigger class * @param successful true if the rule compiled successfully and false if it suffered from parse, * type or compile errors * @param detail text describing more details of the compilation outcome * @return true if the rule needs to be installed otherwise false */ public synchronized boolean recordCompile(Rule rule, String triggerClass, ClassLoader loader, boolean successful, String detail) { if(deleted) { return false; } // find an existing transform set or create a new one TransformSet transformSet = ensureTransformSet(loader, triggerClass, null); for (Transform transform : transformSet.getTransforms()) { if(transform.getRule() == rule) { transform.setCompiled(successful, detail); boolean isInstalled = transformSet.isInstalled(); // record this as the latest rule to be installed transformSet.setInstalled(rule); // if this is the first installed rule then // we need to perform lifecycle processing return !isInstalled; } } // no such rule so no lifecycle processing return false; }