nl.pbemengine.engine.ng.blueprint
Class Ruleset

java.lang.Object
  extended by nl.pbemengine.engine.ng.blueprint.Ruleset

public abstract class Ruleset
extends java.lang.Object

Basic game class - describes all information required to run a PBEM.

Author:
Jeroen Steenbeeke

Constructor Summary
Ruleset(java.lang.String name, java.lang.String context, java.lang.Class<? extends TurnProcessor> turnProcessor, java.lang.Class<? extends ReportMailGenerator> reportMailGenerator)
          Creates a new ruleset with the indicated settings
 
Method Summary
 java.lang.String getContext()
          Returns the context path of this ruleset
abstract  java.lang.Class<? extends MailProcessor> getMailProcessor(Mail m)
          A MailProcessor class appropriate for a given mail
 java.lang.String getName()
          Get the name of this Ruleset
 java.lang.Class<? extends ReportMailGenerator> getReportMailGenerator()
          A ReportMailGenerator class for creating reports
 freemarker.template.Configuration getReportTemplateConfiguration()
          Returns the Hibernate configuration object for reports for this Ruleset
 java.lang.Class<? extends TurnProcessor> getTurnProcessor()
          Get the class used for processing a Turn, which can be autowired
 void setReportTemplateConfiguration(freemarker.template.Configuration reportTemplateConfiguration)
          Sets the Freemarker Configuration object for this Ruleset, used by the Engine to create a TemplateConvertor for ReportMailGenerator objects
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ruleset

public Ruleset(java.lang.String name,
               java.lang.String context,
               java.lang.Class<? extends TurnProcessor> turnProcessor,
               java.lang.Class<? extends ReportMailGenerator> reportMailGenerator)
Creates a new ruleset with the indicated settings

Parameters:
name - The name of the Ruleset
context - The web-context path of the Ruleset
turnProcessor - The class used for processing turns
reportMailGenerator - The class used for generating reports
Method Detail

getName

public java.lang.String getName()
Get the name of this Ruleset

Returns:
The name of this ruleset

getContext

public java.lang.String getContext()
Returns the context path of this ruleset

Returns:
The context path of the ruleset

getReportTemplateConfiguration

public freemarker.template.Configuration getReportTemplateConfiguration()
Returns the Hibernate configuration object for reports for this Ruleset

Returns:
A Configuration object

setReportTemplateConfiguration

public void setReportTemplateConfiguration(freemarker.template.Configuration reportTemplateConfiguration)
Sets the Freemarker Configuration object for this Ruleset, used by the Engine to create a TemplateConvertor for ReportMailGenerator objects

Parameters:
reportTemplateConfiguration - The Configuration

getTurnProcessor

public java.lang.Class<? extends TurnProcessor> getTurnProcessor()
Get the class used for processing a Turn, which can be autowired

Returns:
The class of which to make a TurnProcessor

getMailProcessor

public abstract java.lang.Class<? extends MailProcessor> getMailProcessor(Mail m)
A MailProcessor class appropriate for a given mail

Parameters:
m - The mail to check for an appropriate processor
Returns:
A class that is an extension of MailProcessor

getReportMailGenerator

public java.lang.Class<? extends ReportMailGenerator> getReportMailGenerator()
A ReportMailGenerator class for creating reports

Returns:
A class that is an extension of ReportMailGenerator


Copyright © 2008. All Rights Reserved.