Class ConfluenceContainerDocumentationGenerator


  • public class ConfluenceContainerDocumentationGenerator
    extends Object
    Generate container documentation using Confluence markup language. The generated text is meant to be copied on the Cargo Confluence web site.
    • Constructor Detail

      • ConfluenceContainerDocumentationGenerator

        public ConfluenceContainerDocumentationGenerator()
    • Method Detail

      • generateDatasourceDocumentation

        public String generateDatasourceDocumentation()
                                               throws Exception
        Generate documentation for a datasources.
        Returns:
        Generated documentation.
        Throws:
        Exception - If anything goes wrong.
      • generateDocumentation

        public String generateDocumentation​(String containerId)
                                     throws Exception
        Generate documentation for a given container.
        Parameters:
        containerId - Container id.
        Returns:
        Generated documentation.
        Throws:
        Exception - If anything goes wrong.
      • generateContainerFeaturesText

        protected String generateContainerFeaturesText​(String containerId)
        Generate documentation for the container features of a given container.
        Parameters:
        containerId - Container id.
        Returns:
        Generated container features documentation.
      • generateStandaloneConfigurationText

        protected String generateStandaloneConfigurationText​(String containerId,
                                                             ContainerType type)
        Generate documentation for the standalone configuration of a given container.
        Parameters:
        containerId - Container id.
        type - Container type.
        Returns:
        Generated standalone configuration documentation.
      • generateExistingConfigurationText

        protected String generateExistingConfigurationText​(String containerId,
                                                           ContainerType type)
        Generate documentation for the existing configuration of a given container.
        Parameters:
        containerId - Container id.
        type - Container type.
        Returns:
        Generated existing configuration documentation.
      • generateConfigurationFeaturesText

        protected String generateConfigurationFeaturesText​(String containerId)
        Generate documentation for the configuration features of a given container.
        Parameters:
        containerId - Container id.
        Returns:
        Generated configuration features documentation.
      • generateDeployerFeaturesText

        protected String generateDeployerFeaturesText​(String containerId)
        Generate documentation for the deployer features of a given container.
        Parameters:
        containerId - Container id.
        Returns:
        Generated deployer features documentation.
      • generateOtherFeaturesText

        protected String generateOtherFeaturesText​(String containerId)
        Generate documentation for other features of a given container.
        Parameters:
        containerId - Container id.
        Returns:
        Generated other features' documentation.
      • generateConfigurationPropertiesText

        protected String generateConfigurationPropertiesText​(String containerId)
                                                      throws Exception
        Generate documentation for the configuration properties of a given container.
        Parameters:
        containerId - Container id.
        Returns:
        Generated configuration properties documentation.
        Throws:
        Exception - If anything goes wrong.
      • generateConfigurationPropertiesForConfigurationTypeForContainerType

        protected String generateConfigurationPropertiesForConfigurationTypeForContainerType​(String typeAsName,
                                                                                             ConfigurationType type,
                                                                                             String containerId,
                                                                                             ContainerType containerType)
                                                                                      throws Exception
        Generate documentation for the configuration properties of a given container.
        Parameters:
        typeAsName - Configuration type's "human" name.
        type - Configuration type.
        containerId - Container id.
        containerType - Container type.
        Returns:
        Generated configuration properties documentation.
        Throws:
        Exception - If anything goes wrong.
      • computedFQCN

        protected String computedFQCN​(String className)
        Create the short class name for a given class name.
        Parameters:
        className - Original class name.
        Returns:
        Short class name.
      • findPropertySetFieldName

        protected Field findPropertySetFieldName​(String propertyValue)
                                          throws Exception
        Find the property set field for a given value.
        Parameters:
        propertyValue - Property value name.
        Returns:
        Property set field for the given value.
        Throws:
        Exception - If anything goes wrong.
      • findPropertySetField

        protected Field findPropertySetField​(String propertyValue,
                                             Class propertySetClass)
                                      throws Exception
        Find the property set field name for a given value on a given class.
        Parameters:
        propertyValue - Property value name.
        propertySetClass - Class name.
        Returns:
        Property set field for the given value, null if the given class does not have such a value.
        Throws:
        Exception - If anything goes wrong.
      • generateSamplesInfoText

        protected String generateSamplesInfoText​(String containerId)
                                          throws Exception
        Generate documentation for the Samples of a given container.
        Parameters:
        containerId - Container id.
        Returns:
        Generated configuration properties documentation.
        Throws:
        Exception - If anything goes wrong.
      • getContainerServerDownloadUrl

        public String getContainerServerDownloadUrl​(String containerId)
        Returns the download URL used for testing the given container.
        Parameters:
        containerId - Container ID.
        Returns:
        Download URL for testing containerId, null if no download URL is set.