Class ApisConfiguration

java.lang.Object
org.apache.sling.feature.maven.mojos.apis.ApisConfiguration

public class ApisConfiguration extends Object
Configuration for creating the api jars. The configuration can be controlled by a JSON extension:
 {
   "license-report" : "PATH",
   "license-header" : "STRING or STRING ARRAY",
   "license-footer" : "STRING or STRING ARRAY",
   "license-defaults" : ["PATTERN", "PATTERN"],
   "javadoc-links" : ["LINK", "LINK"],
   "javadoc-classpath-removals" : ["LINK", "LINK"],
   "javadoc-classpath-highest-versions" : ["LINK", "LINK"],
   "javadoc-classpath-tops" : ["LINK", "LINK"],
   "javadoc-source-level" : "STRING",
   "api-version" : "STRING",
   "bundle-resource-folders" : ["STRING", "STRING"],
   "bundle-resources" : ["STRING", "STRING"],
   "region-mapping" : {
     "REGION" : "MAPPED_NAME"
   },
   "classifier-mapping" : {
     "CLASSIFIER" : "MAPPED_NAME"
   },
   "manifest-entries" : {
     "key" : "value"
   },
   "javadoc-extensions" : [
     "[[REGION_NAME]:][COMMA_SEPARATED_LIST_OF_ARTIFACT_EXTENSIONS"
   ]
 }
 
  • Constructor Details

    • ApisConfiguration

      public ApisConfiguration(org.apache.sling.feature.Feature feature) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
  • Method Details

    • logConfiguration

      public void logConfiguration(org.apache.maven.plugin.logging.Log log)
    • getBundleResources

      public List<String> getBundleResources()
    • getJavadocLinks

      public List<String> getJavadocLinks()
    • getJavadocSourceLevel

      public String getJavadocSourceLevel()
    • getApiVersion

      public String getApiVersion()
    • getApiName

      public String getApiName()
    • getBundleResourceFolders

      public List<String> getBundleResourceFolders()
    • getLicenseReport

      public String getLicenseReport()
    • getLicenseDefaults

      public List<String> getLicenseDefaults()
    • getLicenseReportHeader

      public String getLicenseReportHeader()
    • getLicenseReportFooter

      public String getLicenseReportFooter()
    • getManifestEntries

      public Map<String,String> getManifestEntries()
    • getJavadocClasspathRemovals

      public List<String> getJavadocClasspathRemovals()
    • getJavadocClasspathHighestVersions

      public List<String> getJavadocClasspathHighestVersions()
    • getJavadocClasspathTops

      public List<String> getJavadocClasspathTops()
    • mapApiRegionName

      public String mapApiRegionName(String regionName)
      Apply region name mapping if configured
      Parameters:
      regionName - The region name
      Returns:
      The mapped name or the original name
    • mapApiClassifier

      public String mapApiClassifier(String classifier)
      Apply classifier mapping if configured
      Parameters:
      classifier - The classifier
      Returns:
      The mapped classifier or the original classifier
    • getLicenseDefault

      public String getLicenseDefault(org.apache.sling.feature.ArtifactId id)
    • setLicenseDefaults

      public void setLicenseDefaults(List<String> licenseDefaultsFromProjcect) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • setLicenseReport

      public void setLicenseReport(String licenseReportFromProjcect)
    • setLicenseReportHeader

      public void setLicenseReportHeader(String licenseReportHeaderFromProjcect)
    • setLicenseReportFooter

      public void setLicenseReportFooter(String licenseReportFooterFromProjcect)
    • setJavadocLinks

      public void setJavadocLinks(String[] javadocLinksFromProject)
    • setJavadocClasspathRemovals

      public void setJavadocClasspathRemovals(List<String> javadocClasspathRemovalsFromProject)
    • setJavadocClasspathHighestVersions

      public void setJavadocClasspathHighestVersions(List<String> javadocClasspathHighestVersionsFromProject)
    • setJavadocClasspathTops

      public void setJavadocClasspathTops(List<String> javadocClasspathTopsFromProject)
    • setJavadocSourceLevel

      public void setJavadocSourceLevel(String javadocSourceLevelFromProject)
    • setApiVersion

      public void setApiVersion(String apiVersionFromProject)
    • setBundleResources

      public void setBundleResources(String[] includeResourcesFromProject)
    • setBundleResourceFolders

      public void setBundleResourceFolders(String resourceFoldersFromProject)
    • setRegionMappings

      public void setRegionMappings(Map<String,String> valuesFromProject)
    • setClassifierMappings

      public void setClassifierMappings(Map<String,String> valuesFromProject)
    • setManifestEntries

      public void setManifestEntries(Properties valuesFromProject)
    • setEnabledToggles

      public void setEnabledToggles(String value)
    • getEnabledToggles

      public Set<String> getEnabledToggles()
    • setAdditionalJavadocExtensions

      public void setAdditionalJavadocExtensions(List<String> javadocAdditionalExtensions)
      Add the additional extensions for javadoc generation
      Parameters:
      javadocAdditionalExtensions - A list of strings
    • getAdditionalJavadocExtensions

      public Set<String> getAdditionalJavadocExtensions(String regionName)
      Get the map for additional javadoc extensions for a region
      Parameters:
      regionName - the region
      Returns:
      The set of extension names, might be empty
    • isUseApiDependencies

      public boolean isUseApiDependencies()
      Returns:
      the useApiDependencies
    • setUseApiDependencies

      public void setUseApiDependencies(boolean flag)
      Parameters:
      flag - The value for useApiDependencies
    • isUseApiDependenciesForJavadoc

      public boolean isUseApiDependenciesForJavadoc()
      Returns:
      the useApiDependenciesForJavadoc
    • setUseApiDependenciesForJavadoc

      public void setUseApiDependenciesForJavadoc(boolean flag)
      Parameters:
      flag - The value for useApiDependenciesForJavadoc
    • isGenerateJavadocForAllApi

      public boolean isGenerateJavadocForAllApi()
      Returns:
      the generateJavadocForAllApi
    • setGenerateJavadocForAllApi

      public void setGenerateJavadocForAllApi(boolean generateJavadocForAllApi)
      Parameters:
      generateJavadocForAllApi - the generateJavadocForAllApi to set
    • getDependencyRepositories

      public Set<String> getDependencyRepositories()
    • setDependencyRepositories

      public void setDependencyRepositories(String list)
      Set the dependency repositories
      Parameters:
      list - Comma separated list or null
    • setApiName

      public void setApiName(String value)