org.apache.sling.maven.slingstart

## Class FeatureModelConverter

- java.lang.Object
- - org.apache.sling.maven.slingstart.FeatureModelConverter

    public class FeatureModelConverter
    extends Object

### Nested Class Summary

Nested Classes
`static class` `FeatureModelConverter.FeatureFileEntry`

### Constructor Summary

Constructors
Constructor and Description
`FeatureModelConverter()`

### Method Summary

All Methods Static Methods Concrete Methods
`static void` `convert(ModelPreprocessor.Environment env)`
`static void` `convert(ModelPreprocessor.Environment env, ModelPreprocessor.ProjectInfo info, String defaultProvName)`
`static void` `convertDirectories(String featuresDirectory, org.apache.maven.project.MavenProject project, String defaultProvName, org.apache.sling.feature.builder.FeatureProvider fp)`
`static org.apache.sling.feature.Feature` `getFeature(org.apache.sling.feature.ArtifactId id, org.apache.maven.execution.MavenSession session, org.apache.maven.project.MavenProject project, org.apache.maven.artifact.handler.manager.ArtifactHandlerManager manager, org.apache.maven.artifact.resolver.ArtifactResolver resolver)`
`static String` `getOSGiVersion(String version)`
`static String` `readFeatureFile(org.apache.maven.project.MavenProject project, File file, String suggestedClassifier)` Read the json file, minify it, add id if missing and replace variables

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

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

### Constructor Detail

#### FeatureModelConverter

    public FeatureModelConverter()

### Method Detail

#### getFeature

    public static org.apache.sling.feature.Feature getFeature(org.apache.sling.feature.ArtifactId id,
                                                              org.apache.maven.execution.MavenSession session,
                                                              org.apache.maven.project.MavenProject project,
                                                              org.apache.maven.artifact.handler.manager.ArtifactHandlerManager manager,
                                                              org.apache.maven.artifact.resolver.ArtifactResolver resolver)

#### convert

    public static void convert(ModelPreprocessor.Environment env)
                        throws org.apache.maven.MavenExecutionException

Throws:
  `org.apache.maven.MavenExecutionException`

#### convertDirectories

    public static void convertDirectories(String featuresDirectory,
                                          org.apache.maven.project.MavenProject project,
                                          String defaultProvName,
                                          org.apache.sling.feature.builder.FeatureProvider fp)
                                   throws org.apache.maven.MavenExecutionException

Throws:
  `org.apache.maven.MavenExecutionException`

#### convert

    public static void convert(ModelPreprocessor.Environment env,
                               ModelPreprocessor.ProjectInfo info,
                               String defaultProvName)
                        throws org.apache.maven.MavenExecutionException

Throws:
  `org.apache.maven.MavenExecutionException`

#### readFeatureFile

    public static String readFeatureFile(org.apache.maven.project.MavenProject project,
                                         File file,
                                         String suggestedClassifier)

Read the json file, minify it, add id if missing and replace variables

Parameters:
  `file` - The json file
Returns:
  The read and minified JSON

#### getOSGiVersion

    public static String getOSGiVersion(String version)