ibspan.tss.layout
Class TemplatesRegister

java.lang.Object
  extended by ibspan.tss.layout.TemplatesRegister

public class TemplatesRegister
extends Object

This class stores templates used by ModelConstructor and PersonalModelConstructor objects to prepare layout of system response returned to the user.

All templates are described in db/templates.owl file.

Author:
Maciej Gawinecki
See Also:
ModelConstructor, PersonalModelConstructor

Constructor Summary
TemplatesRegister()
           
 
Method Summary
 LayoutStructure get(String actionName)
          Returns template for the given action.
 LayoutStructure getCopy(String actionName)
          Creates copy of registered template.
 void register(String actionName, LayoutStructure template)
          Registers template under the given name of action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplatesRegister

public TemplatesRegister()
Method Detail

register

public void register(String actionName,
                     LayoutStructure template)
Registers template under the given name of action.

Parameters:
actionName - is the name of action
template - is the template to be registered.

get

public LayoutStructure get(String actionName)
Returns template for the given action.

Parameters:
actionName - is the name of action under which the required template has been registered
Returns:
registered template; null if no template for the given action

getCopy

public LayoutStructure getCopy(String actionName)
                        throws TemplateNotRegistered
Creates copy of registered template.

Parameters:
actionName - is the name of action under which the required template has been registered
Returns:
copy of required template
Throws:
TemplateNotRegistered - when there is not template for the given action