Method Summary |
|
public Rule | XMLToRule(File ruleXMLFile) From a given XML document it reconstructs a Rule object.
Parameters: ruleXMLFile - the XML file containing a Rule. |
public synchronized void | addRule(Rule newRule) Adds a Rule into the system. |
public ArrayList<Process> | getProcessList() Convenience method to get the list of running (con:cern) Processes. |
public synchronized List<Rule> | getPublicRulesOfOthers(String notThisUser) Gets the all published Rules from other users but the one specified.
Parameters: notThisUser - the user that is to be avoided. |
public synchronized List<Rule> | getRules() Returns all Rules in the system. |
public synchronized List<Rule> | getRulesForUser(String user) Gets the Rules that a given user has created.
Parameters: user - the user-id. |
protected synchronized List<Rule> | getRulesForUser(String userId, boolean avoidUser) Either gets the Rules for one user, or all the Rules except for that user.
Parameters: userId - the user-id. Parameters: avoidUser - whether to avoid that user or not. |
public static AgentSystem | getSingletonInstance() Gets the singleton instance. |
protected void | loadRules() Loads all Rules from the persistent store. |
protected void | populateProcessList() Populates the (con:cern) Process list. |
public synchronized void | removeRule(Rule ruleToDelete) Removes a Rule from the system. |
public String | ruleAsXML(Rule rule) Provides an XML-serialized version of a Rule.
Parameters: rule - the Rule to be serialized. |
protected void | saveRules() Save the Rules to a persistent store. |
public File | tempRuleFile(Rule rule) Provides a temporary file with an exported Rule.
Parameters: rule - the Rule for which the file is to be generated. |
public synchronized void | updateRules() In case Rules are indirectly modified (outside this class, which is very common)
and the client wants to make sure that those changes are persistent and reflected
across the system, it should call this method. |