public class ThrottlePolicyGenerator extends Object
| Constructor and Description |
|---|
ThrottlePolicyGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
generate(String outPath,
List<ApplicationThrottlePolicyDTO> applicationPolicies,
List<SubscriptionThrottlePolicyDTO> subscriptionPolicies) |
void |
generate(String outPath,
String projectName)
Generate ballerina and stream source for a given app and subs policies
|
void |
writeBallerina(Object object,
String templateDir,
String templateName,
String outPath)
Deprecated.
|
public void generate(String outPath, List<ApplicationThrottlePolicyDTO> applicationPolicies, List<SubscriptionThrottlePolicyDTO> subscriptionPolicies) throws IOException
IOExceptionpublic void generate(String outPath, String projectName) throws IOException
outPath - Destination file path to save generated source files. If not provided
definitionPath will be used as the default destination pathprojectName - Project nameIOException - when file operations fail@Deprecated public void writeBallerina(Object object, String templateDir, String templateName, String outPath) throws IOException
object to a file as described by template.object - Context object to be used by the template parsertemplateDir - Directory with all the templates required for generating the source filetemplateName - Name of the parent template to be usedoutPath - Destination path for writing the resulting source fileIOException - when file operations fail
file write functionality your self, if you need to customize file writing steps.
to a ballerina package.Copyright © 2019 WSO2. All rights reserved.