public class RulesListener extends DefaultEventListener implements org.springframework.beans.factory.DisposableBean
availableDuringPublish, operationTypes, propertiesToIgnore, workspace| Constructor and Description |
|---|
RulesListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
addGlobalObject(String key,
Object value) |
void |
addRules(File dsrlFile) |
void |
addRules(org.springframework.core.io.Resource dsrlFile,
JahiaTemplatesPackage aPackage) |
void |
addRulesDescriptor(File file) |
void |
addRulesDescriptor(org.springframework.core.io.Resource resource) |
void |
addRulesDescriptor(org.springframework.core.io.Resource resource,
JahiaTemplatesPackage aPackage) |
void |
destroy() |
void |
executeRules(Collection<?> facts,
Map<String,Object> globals) |
void |
executeRules(Object[] facts,
Map<String,Object> globals) |
void |
executeRules(Object fact,
Map<String,Object> globals) |
int |
getEventTypes() |
List<String> |
getFilesAccepted() |
Map<String,Object> |
getGlobals(String username,
String userRealm,
List<Updateable> delayedUpdates) |
static RulesListener |
getInstance(String workspace) |
static List<RulesListener> |
getInstances() |
Map<String,String> |
getModulePackageNameMap() |
org.drools.core.RuleBase |
getRuleBase()
Returns the rule base, used by this listener.
|
void |
onEvent(javax.jcr.observation.EventIterator eventIterator) |
void |
removeGlobalObject(String key) |
void |
removeRules(JahiaTemplatesPackage module) |
boolean |
removeRulesDescriptor(org.springframework.core.io.Resource resource) |
void |
setDisabledRules(String rulesToDisable)
Sets the configuration for rules to be disabled.
|
void |
setFilesAccepted(List<String> fileAccepted) |
void |
setGlobalObjects(Map<String,Object> globalObjects) |
void |
setRuleFiles(Set<String> ruleFiles) |
void |
start() |
getMoveFilteredEvents, getNodeTypes, getOperationTypes, getPath, getUuids, getWorkspace, isAvailableDuringPublish, isDeep, isExternal, isSupportedOperationType, setAvailableDuringPublish, setOperationTypes, setWorkspacepublic static RulesListener getInstance(String workspace)
public int getEventTypes()
getEventTypes in class DefaultEventListenerpublic void executeRules(Collection<?> facts, Map<String,Object> globals)
public void addRules(File dsrlFile)
public void addRules(org.springframework.core.io.Resource dsrlFile,
JahiaTemplatesPackage aPackage)
public void onEvent(javax.jcr.observation.EventIterator eventIterator)
onEvent in interface javax.jcr.observation.EventListenerpublic Map<String,Object> getGlobals(String username, String userRealm, List<Updateable> delayedUpdates)
public void addRulesDescriptor(File file)
public void addRulesDescriptor(org.springframework.core.io.Resource resource)
public void addRulesDescriptor(org.springframework.core.io.Resource resource,
JahiaTemplatesPackage aPackage)
public void removeGlobalObject(String key)
public static List<RulesListener> getInstances()
public void destroy()
throws Exception
destroy in interface org.springframework.beans.factory.DisposableBeanExceptionpublic void removeRules(JahiaTemplatesPackage module)
public boolean removeRulesDescriptor(org.springframework.core.io.Resource resource)
public void setDisabledRules(String rulesToDisable)
["<workspace>".]"<package-name-1>"."<rule-name-1>",["<workspace>".]"<package-name-2>"."<rule-name-2>"...The workspace part is optional. For example the following configuration:
"org.jahia.modules.rules"."Image update","live"."org.jahia.modules.dm.thumbnails"."Automatically generate thumbnail for the document"will disable rule
Image update (from package org.jahia.modules.rules) in rules for all workspaces (live and
default) and the rule Automatically generate thumbnail for the document (package
org.jahia.modules.dm.thumbnails) will be disabled in rules for live workspace only.rulesToDisable - the configuration for rules to be disabledpublic org.drools.core.RuleBase getRuleBase()
Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.