org.springframework.roo.addon.surf.template
Class TemplateCommands

java.lang.Object
  extended by org.springframework.roo.addon.surf.template.TemplateCommands
All Implemented Interfaces:
org.springframework.roo.shell.CommandMarker

public class TemplateCommands
extends Object
implements org.springframework.roo.shell.CommandMarker

Commands for template and template instance related operations.

Since:
1.0
Author:
Yong Qu

Constructor Summary
TemplateCommands(TemplateOperations templateOperations)
           
 
Method Summary
 boolean isTemplateOperationAvailable()
          Check availability of template related commands.
 SortedSet<String> listSurfTemplateInstances()
          Lists all Surf template instances.
 Collection<RegionConfig> listSurfTemplateRegions(String templatePath)
          Shows list of regions belong to this template.
 SortedSet<String> listSurfTemplates()
          Lists all Surf templates.
 void newTemplate(String path)
          Creates a template (ftl) at the specified path.
 void newTemplateInstance(String id, String path, String templatePath)
          Creates a Template Instance with the given id that maps to the given template path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateCommands

public TemplateCommands(TemplateOperations templateOperations)
Parameters:
templateOperations -
Method Detail

isTemplateOperationAvailable

public boolean isTemplateOperationAvailable()
Check availability of template related commands.

Returns:
true if template related commands are available at this moment.

listSurfTemplates

public SortedSet<String> listSurfTemplates()
Lists all Surf templates.

Returns:
List of all Surf templates.

listSurfTemplateInstances

public SortedSet<String> listSurfTemplateInstances()
Lists all Surf template instances.

Returns:
List of Surf template instances.

newTemplate

public void newTemplate(String path)
Creates a template (ftl) at the specified path.

Parameters:
path - Path of the new template.

newTemplateInstance

public void newTemplateInstance(String id,
                                String path,
                                String templatePath)
Creates a Template Instance with the given id that maps to the given template path.

Parameters:
id - Id of the new template instance.
path - Path of the new template instance.
templatePath - Template for the new template instance.

listSurfTemplateRegions

public Collection<RegionConfig> listSurfTemplateRegions(String templatePath)
Shows list of regions belong to this template.

Parameters:
templatePath - Template path.
Returns:
List of regions belong to this template.


Copyright © 2009 SpringSource, Inc. All Rights Reserved.