public class SARGenerator
extends java.lang.Object
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.
|
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
|
public SARGenerator(java.lang.String projectDirectory) throws java.io.IOException, InvalidPropertyException
projectDirectory
- The location of the service project on the file system.java.io.IOException
- If there is a problem loading the project information.InvalidPropertyException
- If there is a problem with on of the properties.public SARGenerator(java.util.Map<java.lang.String,java.lang.String> properties) throws InvalidPropertyException
properties
- A Map of properties to define the SARInvalidPropertyException
- If there is a problem with one of the properties.public static void addPlugin(java.lang.String provider, java.lang.String className)
provider
- The name of the provider.className
- The fully qualified class name of the SARGeneratorPlugin.public void save(java.lang.String fileName) throws java.io.IOException, ServiceArtifactException
fileName
- The name of the sar file to be generated. '.sar' will be appended if not suppliedjava.io.IOException
- Thrown when there is an IO error or json processing errorjava.io.UnsupportedEncodingException
- Thrown if the UTF-8 charset is not supportedServiceArtifactException
- Thrown if we are unable to get the sar contents