Package org.bndly.schema.beans
Class AbstractSchemaBasedBeanGeneratorMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.bndly.schema.beans.AbstractSchemaBasedBeanGeneratorMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
ClientModelBeanGeneratorMojo,SchemaBeanGeneratorMojo,SchemaServiceImplGeneratorMojo,SchemaServiceInterfaceGeneratorMojo,XmlSchemaBeanGeneratorMojo
public abstract class AbstractSchemaBasedBeanGeneratorMojo extends org.apache.maven.plugin.AbstractMojo- Author:
- cybercon <bndly@cybercon.de>
-
-
Field Summary
Fields Modifier and Type Field Description protected ImportStateHolderImplimportStateHolderprotected List<String>schemaExtensionsThe paths to the schema extension definition filesprotected StringschemaProviderClassThe class that provides the schemaprotected StringschemaRootThe path to the root schema definition fileprotected StringtargetFolderThe target folder for generated filesprotected StringtargetPackageThe package name to use for the generated schema beans.
-
Constructor Summary
Constructors Constructor Description AbstractSchemaBasedBeanGeneratorMojo()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voiddoCodeGenerationWithSchema(org.bndly.schema.model.Schema schema, org.bndly.code.common.CodeGenerationContext ctx, File path)voidexecute()protected voidwriteCodeToFile(org.bndly.code.model.CodeBlock code, File path, String fileName)protected voidwriteCodeToFile(org.bndly.code.model.CodeBlock code, File path, org.bndly.schema.model.NamedAttributeHolder nah, String suffix)protected voidwriteCodeToFile(org.bndly.code.model.CodeBlock code, File path, org.bndly.schema.model.NamedAttributeHolder nah, String prefix, String suffix)
-
-
-
Field Detail
-
targetFolder
@Parameter protected String targetFolder
The target folder for generated files
-
targetPackage
@Parameter protected String targetPackage
The package name to use for the generated schema beans.
-
schemaProviderClass
@Parameter protected String schemaProviderClass
The class that provides the schema
-
schemaRoot
@Parameter protected String schemaRoot
The path to the root schema definition file
-
schemaExtensions
@Parameter protected List<String> schemaExtensions
The paths to the schema extension definition files
-
importStateHolder
protected ImportStateHolderImpl importStateHolder
-
-
Method Detail
-
execute
public final void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
writeCodeToFile
protected void writeCodeToFile(org.bndly.code.model.CodeBlock code, File path, org.bndly.schema.model.NamedAttributeHolder nah, String prefix, String suffix) throws IOException- Throws:
IOException
-
writeCodeToFile
protected void writeCodeToFile(org.bndly.code.model.CodeBlock code, File path, org.bndly.schema.model.NamedAttributeHolder nah, String suffix) throws IOException- Throws:
IOException
-
writeCodeToFile
protected void writeCodeToFile(org.bndly.code.model.CodeBlock code, File path, String fileName) throws IOException- Throws:
IOException
-
doCodeGenerationWithSchema
protected abstract void doCodeGenerationWithSchema(org.bndly.schema.model.Schema schema, org.bndly.code.common.CodeGenerationContext ctx, File path) throws IOException, org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
IOExceptionorg.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
-