eu.scape_project.xa.tw.tmpl
Class ServiceCode

java.lang.Object
  extended by eu.scape_project.xa.tw.tmpl.Code
      extended by eu.scape_project.xa.tw.tmpl.ServiceCode

public class ServiceCode
extends Code

Template-based service code generator. The service code can be evaluated by the Velocity template engine. Evaluation is performed by applying the Velocity context to the source code content.

Version:
0.3
Author:
shsdev https://github.com/shsdev

Constructor Summary
ServiceCode(String filePath)
          Constructor for a service code instance
 
Method Summary
 void addOperation(OperationCode operationSnippet)
           
 void create(String targetFilePath)
           
 List<OperationCode> getOperations()
           
 void put(String string, List<OperationCode> operations)
          Add a list of operations to the Velocity context
 
Methods inherited from class eu.scape_project.xa.tw.tmpl.Code
evaluate, getCode, getCtx, put, put, setCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceCode

public ServiceCode(String filePath)
            throws IOException
Constructor for a service code instance

Parameters:
filePath - Path to template file
Throws:
IOException - Exception while reading the template file
Method Detail

getOperations

public List<OperationCode> getOperations()
Returns:
the operationSnippets

addOperation

public void addOperation(OperationCode operationSnippet)
Parameters:
operationSnippet - the operationSnippets to add

put

public void put(String string,
                List<OperationCode> operations)
Add a list of operations to the Velocity context

Parameters:
string - Key
operations - List of operations

create

public void create(String targetFilePath)
            throws IOException
Parameters:
targetFilePath -
Throws:
IOException


Copyright © 2013. All Rights Reserved.