Class AllRuleSets

All Implemented Interfaces:
Serializable, Cloneable, Map<String,RuleSet>

public class AllRuleSets extends HashMap<String,RuleSet>
Stores rule sets, and allows lookup by name. FIXME: need a web UI for calling clear() on this table, whenever a new version of the same rule set file is created.
See Also:
  • Constructor Details

    • AllRuleSets

      public AllRuleSets()
  • Method Details

    • read

      public static RuleSet read(File f) throws IOException, RuleParseException
      Parameters:
      f - The rule set file. if null is given (for the convenience of the command-line random-board generator), we create an all-permissive rule set.
      Throws:
      IOException
      RuleParseException
    • obtain

      public static RuleSet obtain(String ruleSetName) throws IOException, RuleParseException
      Parameters:
      ruleSetName - Either a name with no path or extension (which will be mapped to a rule set file in the tomcat directory), or a full file path name (beginning with a "/" and ending in ".txt").
      Throws:
      IOException
      RuleParseException
    • clearAll

      public static void clearAll()
      Can be used to ensure that the rule sets will be reloaded