com.ibm.zosconnect.buildtoolkit

Class SARGenerator

  • java.lang.Object
    • com.ibm.zosconnect.buildtoolkit.SARGenerator


  • public class SARGenerator
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor and Description
      SARGenerator(java.util.Map<java.lang.String,java.lang.String> properties)
      Create a SAR based on the supplied properties.
      SARGenerator(java.lang.String projectDirectory)
      Create a SAR from a service project.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static void addPlugin(java.lang.String provider, java.lang.String className)
      Register a SARGeneratorPlugin for the given provider.
      void save(java.lang.String fileName)
      Generates and saves the sar file
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SARGenerator

        public SARGenerator(java.lang.String projectDirectory)
                     throws java.io.IOException,
                            InvalidPropertyException
        Create a SAR from a service project.
        Parameters:
        projectDirectory - The location of the service project on the file system.
        Throws:
        java.io.IOException - If there is a problem loading the project information.
        InvalidPropertyException - If there is a problem with on of the properties.
      • SARGenerator

        public SARGenerator(java.util.Map<java.lang.String,java.lang.String> properties)
                     throws InvalidPropertyException
        Create a SAR based on the supplied properties.
        Parameters:
        properties - A Map of properties to define the SAR
        Throws:
        InvalidPropertyException - If there is a problem with one of the properties.
    • Method Detail

      • addPlugin

        public static void addPlugin(java.lang.String provider,
                                     java.lang.String className)
        Register a SARGeneratorPlugin for the given provider. This can be done instead of updating plugin.properties or to override a value in there.
        Parameters:
        provider - The name of the provider.
        className - The fully qualified class name of the SARGeneratorPlugin.
      • save

        public void save(java.lang.String fileName)
                  throws java.io.IOException,
                         ServiceArtifactException
        Generates and saves the sar file
        Parameters:
        fileName - The name of the sar file to be generated. '.sar' will be appended if not supplied
        Throws:
        java.io.IOException - Thrown when there is an IO error or json processing error
        java.io.UnsupportedEncodingException - Thrown if the UTF-8 charset is not supported
        ServiceArtifactException - Thrown if we are unable to get the sar contents