org.apache.olingo.ext.pojogen

## Class AbstractPOJOGenMojo

- java.lang.Object
- - org.apache.maven.plugin.AbstractMojo
  - - org.apache.olingo.ext.pojogen.AbstractPOJOGenMojo

- All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
  Direct Known Subclasses:
    V4POJOGenMojo

      public abstract class AbstractPOJOGenMojo
      extends org.apache.maven.plugin.AbstractMojo

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String` | `basePackage` Base package.
    `protected String` | `localEdm` Local file from which Edm information can be loaded.
    `protected Set<String>` | `namespaces`
    `protected String` | `outputDirectory` Generated files base root.
    `protected String` | `serviceRootURL` OData service root URL.
    `protected static String` | `TOOL_DIR`
    `protected AbstractUtility` | `utility`

    - ### Fields inherited from interface org.apache.maven.plugin.Mojo

      `ROLE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractPOJOGenMojo()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract void` | `createUtility(Edm edm, EdmSchema schema, String basePackage)`
    `void` | `execute()`
    `protected abstract ODataClient` | `getClient()`
    `protected abstract AbstractUtility` | `getUtility()`
    `protected abstract String` | `getVersion()`
    `protected File` | `mkdir(String path)`
    `protected File` | `mkPkgDir(String path)`
    `protected org.apache.velocity.VelocityContext` | `newContext()`
    `protected void` | `parseObj(File base, boolean append, String pkg, String name, String out, Map<String,Object> objs)`
    `protected void` | `parseObj(File base, String pkg, String name, String out)`
    `protected void` | `parseObj(File base, String pkg, String name, String out, Map<String,Object> objs)`
    `protected void` | `writeFile(String name, File path, org.apache.velocity.VelocityContext ctx, org.apache.velocity.Template template, boolean append)`

    - ### Methods inherited from class org.apache.maven.plugin.AbstractMojo

      `getLog, getPluginContext, setLog, setPluginContext`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### outputDirectory

          @Parameter(property="outputDirectory",
                     required=true)
          protected String outputDirectory

      Generated files base root.

    - #### serviceRootURL

          @Parameter(property="serviceRootURL",
                     required=false)
          protected String serviceRootURL

      OData service root URL.

    - #### localEdm

          @Parameter(property="localEdm",
                     required=false)
          protected String localEdm

      Local file from which Edm information can be loaded.

    - #### basePackage

          @Parameter(property="basePackage",
                     required=false)
          protected String basePackage

      Base package.

    - #### namespaces

          protected final Set<String> namespaces

    - #### TOOL_DIR

          protected static String TOOL_DIR

    - #### utility

          protected AbstractUtility utility

  - ### Constructor Detail

    - #### AbstractPOJOGenMojo

          public AbstractPOJOGenMojo()

  - ### Method Detail

    - #### getVersion

          protected abstract String getVersion()

    - #### mkdir

          protected File mkdir(String path)

    - #### mkPkgDir

          protected File mkPkgDir(String path)

    - #### writeFile

          protected void writeFile(String name,
                                   File path,
                                   org.apache.velocity.VelocityContext ctx,
                                   org.apache.velocity.Template template,
                                   boolean append)
                            throws org.apache.maven.plugin.MojoExecutionException

      Throws:
        `org.apache.maven.plugin.MojoExecutionException`

    - #### newContext

          protected org.apache.velocity.VelocityContext newContext()

    - #### parseObj

          protected void parseObj(File base,
                                  String pkg,
                                  String name,
                                  String out)
                           throws org.apache.maven.plugin.MojoExecutionException

      Throws:
        `org.apache.maven.plugin.MojoExecutionException`

    - #### parseObj

          protected void parseObj(File base,
                                  String pkg,
                                  String name,
                                  String out,
                                  Map<String,Object> objs)
                           throws org.apache.maven.plugin.MojoExecutionException

      Throws:
        `org.apache.maven.plugin.MojoExecutionException`

    - #### parseObj

          protected void parseObj(File base,
                                  boolean append,
                                  String pkg,
                                  String name,
                                  String out,
                                  Map<String,Object> objs)
                           throws org.apache.maven.plugin.MojoExecutionException

      Throws:
        `org.apache.maven.plugin.MojoExecutionException`

    - #### createUtility

          protected abstract void createUtility(Edm edm,
                                                EdmSchema schema,
                                                String basePackage)

    - #### getUtility

          protected abstract AbstractUtility getUtility()

    - #### getClient

          protected abstract ODataClient getClient()

    - #### execute

          public void execute()
                       throws org.apache.maven.plugin.MojoExecutionException,
                              org.apache.maven.plugin.MojoFailureException

      Throws:
        `org.apache.maven.plugin.MojoExecutionException`
        `org.apache.maven.plugin.MojoFailureException`

Copyright © 2013–2022 The Apache Software Foundation. All rights reserved.