org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.templates
Class TemplateCollection

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.templates.TemplateCollection
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DefaultTemplateCollection, TemplateCollector

public class TemplateCollection
extends Object
implements Serializable

A template collection.

Author:
Thomas Morgner
See Also:
Serialized Form

Constructor Summary
TemplateCollection()
          Creates a new collection.
 
Method Summary
 void addTemplate(TemplateDescription template)
          Adds a template.
 void configure(org.pentaho.reporting.libraries.base.config.Configuration config)
          Configures this factory.
 boolean equals(Object o)
          Indicated whether an other object is equal to this one.
 org.pentaho.reporting.libraries.base.config.Configuration getConfig()
          Returns the currently set configuration or null, if none was set.
 TemplateDescription getDescription(Template template)
          Returns a template description.
 String[] getNames()
          Returns the names of all defined templates.
 TemplateDescription getTemplate(String name)
          Returns a template.
 int hashCode()
          Computes an hashcode for this factory.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateCollection

public TemplateCollection()
Creates a new collection.

Method Detail

addTemplate

public void addTemplate(TemplateDescription template)
Adds a template.

Parameters:
template - the template.

getTemplate

public TemplateDescription getTemplate(String name)
Returns a template.

Parameters:
name - the template name.
Returns:
The template description.

getDescription

public TemplateDescription getDescription(Template template)
Returns a template description.

Parameters:
template - the template.
Returns:
The description.

configure

public void configure(org.pentaho.reporting.libraries.base.config.Configuration config)
Configures this factory. The configuration contains several keys and their defined values. The given reference to the configuration object will remain valid until the report parsing or writing ends.

The configuration contents may change during the reporting.

Parameters:
config - the configuration, never null

getConfig

public org.pentaho.reporting.libraries.base.config.Configuration getConfig()
Returns the currently set configuration or null, if none was set.

Returns:
the configuration.

equals

public boolean equals(Object o)
Indicated whether an other object is equal to this one.

Overrides:
equals in class Object
Parameters:
o - the other object.
Returns:
true, if the object is equal, false otherwise.
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Computes an hashcode for this factory.

Overrides:
hashCode in class Object
Returns:
the hashcode.
See Also:
Object.hashCode()

getNames

public String[] getNames()
Returns the names of all defined templates.

Returns:
the template names.