Class ReportService

    • Constructor Summary

      Constructors 
      Constructor Description
      ReportService​(com.google.gson.Gson gson, com.synopsys.integration.rest.HttpUrl blackDuckBaseUrl, BlackDuckApiClient blackDuckApiClient, BlackDuckRequestFactory blackDuckRequestFactory, com.synopsys.integration.log.IntLogger logger, ProjectService projectDataService, com.synopsys.integration.util.IntegrationEscapeUtil escapeUtil)  
      ReportService​(com.google.gson.Gson gson, com.synopsys.integration.rest.HttpUrl blackDuckBaseUrl, BlackDuckApiClient blackDuckApiClient, BlackDuckRequestFactory blackDuckRequestFactory, com.synopsys.integration.log.IntLogger logger, ProjectService projectDataService, com.synopsys.integration.util.IntegrationEscapeUtil escapeUtil, long timeoutInMilliseconds)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.File createNoticesReportFile​(java.io.File outputDirectory, com.synopsys.integration.blackduck.api.generated.view.ProjectView project, com.synopsys.integration.blackduck.api.generated.view.ProjectVersionView version)  
      void createReportFiles​(java.io.File outputDirectory, com.synopsys.integration.blackduck.api.generated.view.ProjectView project, com.synopsys.integration.blackduck.api.generated.view.ProjectVersionView version)  
      void createReportFiles​(java.io.File outputDirectory, ReportData reportData)  
      java.io.File createReportPdfFile​(java.io.File outputDirectory, com.synopsys.integration.blackduck.api.generated.view.ProjectView project, com.synopsys.integration.blackduck.api.generated.view.ProjectVersionView version)  
      java.io.File createReportPdfFile​(java.io.File outputDirectory, com.synopsys.integration.blackduck.api.generated.view.ProjectView project, com.synopsys.integration.blackduck.api.generated.view.ProjectVersionView version, FontLoader fontLoader, FontLoader boldFontLoader)  
      java.io.File createReportPdfFile​(java.io.File outputDirectory, ReportData reportData)  
      java.io.File createReportPdfFile​(java.io.File outputDirectory, ReportData reportData, FontLoader fontLoader, FontLoader boldFontLoader)  
      void deleteBlackDuckReport​(com.synopsys.integration.rest.HttpUrl reportUri)  
      java.lang.String generateBlackDuckNoticesReport​(com.synopsys.integration.blackduck.api.generated.view.ProjectVersionView version, com.synopsys.integration.blackduck.api.generated.enumeration.ReportFormatType reportFormat)
      Assumes the BOM has already been updated
      java.lang.String getNoticesReportContent​(com.synopsys.integration.rest.HttpUrl reportContentUrl)  
      java.lang.String getNoticesReportData​(com.synopsys.integration.blackduck.api.generated.view.ProjectView project, com.synopsys.integration.blackduck.api.generated.view.ProjectVersionView version)  
      ReportData getRiskReportData​(com.synopsys.integration.blackduck.api.generated.view.ProjectView project, com.synopsys.integration.blackduck.api.generated.view.ProjectVersionView version)  
      com.synopsys.integration.blackduck.api.generated.view.ReportView isReportFinishedGenerating​(com.synopsys.integration.rest.HttpUrl reportUrl)
      Checks the report URL every 5 seconds until the report has a finished time available, then we know it is done being generated.
      void populatePolicyRuleInfo​(BomComponent component, com.synopsys.integration.blackduck.api.generated.view.ProjectVersionComponentView bomEntry)  
      com.synopsys.integration.rest.HttpUrl startGeneratingBlackDuckNoticesReport​(com.synopsys.integration.blackduck.api.generated.view.ProjectVersionView version, com.synopsys.integration.blackduck.api.generated.enumeration.ReportFormatType reportFormat)  
      • Methods inherited from class java.lang.Object

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

      • ReportService

        public ReportService​(com.google.gson.Gson gson,
                             com.synopsys.integration.rest.HttpUrl blackDuckBaseUrl,
                             BlackDuckApiClient blackDuckApiClient,
                             BlackDuckRequestFactory blackDuckRequestFactory,
                             com.synopsys.integration.log.IntLogger logger,
                             ProjectService projectDataService,
                             com.synopsys.integration.util.IntegrationEscapeUtil escapeUtil)
      • ReportService

        public ReportService​(com.google.gson.Gson gson,
                             com.synopsys.integration.rest.HttpUrl blackDuckBaseUrl,
                             BlackDuckApiClient blackDuckApiClient,
                             BlackDuckRequestFactory blackDuckRequestFactory,
                             com.synopsys.integration.log.IntLogger logger,
                             ProjectService projectDataService,
                             com.synopsys.integration.util.IntegrationEscapeUtil escapeUtil,
                             long timeoutInMilliseconds)
    • Method Detail

      • getNoticesReportData

        public java.lang.String getNoticesReportData​(com.synopsys.integration.blackduck.api.generated.view.ProjectView project,
                                                     com.synopsys.integration.blackduck.api.generated.view.ProjectVersionView version)
                                              throws java.lang.InterruptedException,
                                                     com.synopsys.integration.exception.IntegrationException
        Throws:
        java.lang.InterruptedException
        com.synopsys.integration.exception.IntegrationException
      • createNoticesReportFile

        public java.io.File createNoticesReportFile​(java.io.File outputDirectory,
                                                    com.synopsys.integration.blackduck.api.generated.view.ProjectView project,
                                                    com.synopsys.integration.blackduck.api.generated.view.ProjectVersionView version)
                                             throws java.lang.InterruptedException,
                                                    com.synopsys.integration.exception.IntegrationException
        Throws:
        java.lang.InterruptedException
        com.synopsys.integration.exception.IntegrationException
      • getRiskReportData

        public ReportData getRiskReportData​(com.synopsys.integration.blackduck.api.generated.view.ProjectView project,
                                            com.synopsys.integration.blackduck.api.generated.view.ProjectVersionView version)
                                     throws com.synopsys.integration.exception.IntegrationException
        Throws:
        com.synopsys.integration.exception.IntegrationException
      • createReportFiles

        public void createReportFiles​(java.io.File outputDirectory,
                                      com.synopsys.integration.blackduck.api.generated.view.ProjectView project,
                                      com.synopsys.integration.blackduck.api.generated.view.ProjectVersionView version)
                               throws com.synopsys.integration.exception.IntegrationException
        Throws:
        com.synopsys.integration.exception.IntegrationException
      • createReportPdfFile

        public java.io.File createReportPdfFile​(java.io.File outputDirectory,
                                                com.synopsys.integration.blackduck.api.generated.view.ProjectView project,
                                                com.synopsys.integration.blackduck.api.generated.view.ProjectVersionView version)
                                         throws com.synopsys.integration.exception.IntegrationException
        Throws:
        com.synopsys.integration.exception.IntegrationException
      • createReportPdfFile

        public java.io.File createReportPdfFile​(java.io.File outputDirectory,
                                                com.synopsys.integration.blackduck.api.generated.view.ProjectView project,
                                                com.synopsys.integration.blackduck.api.generated.view.ProjectVersionView version,
                                                FontLoader fontLoader,
                                                FontLoader boldFontLoader)
                                         throws com.synopsys.integration.exception.IntegrationException
        Throws:
        com.synopsys.integration.exception.IntegrationException
      • populatePolicyRuleInfo

        public void populatePolicyRuleInfo​(BomComponent component,
                                           com.synopsys.integration.blackduck.api.generated.view.ProjectVersionComponentView bomEntry)
                                    throws com.synopsys.integration.exception.IntegrationException
        Throws:
        com.synopsys.integration.exception.IntegrationException
      • generateBlackDuckNoticesReport

        public java.lang.String generateBlackDuckNoticesReport​(com.synopsys.integration.blackduck.api.generated.view.ProjectVersionView version,
                                                               com.synopsys.integration.blackduck.api.generated.enumeration.ReportFormatType reportFormat)
                                                        throws java.lang.InterruptedException,
                                                               com.synopsys.integration.exception.IntegrationException
        Assumes the BOM has already been updated
        Throws:
        java.lang.InterruptedException
        com.synopsys.integration.exception.IntegrationException
      • startGeneratingBlackDuckNoticesReport

        public com.synopsys.integration.rest.HttpUrl startGeneratingBlackDuckNoticesReport​(com.synopsys.integration.blackduck.api.generated.view.ProjectVersionView version,
                                                                                           com.synopsys.integration.blackduck.api.generated.enumeration.ReportFormatType reportFormat)
                                                                                    throws com.synopsys.integration.exception.IntegrationException
        Throws:
        com.synopsys.integration.exception.IntegrationException
      • isReportFinishedGenerating

        public com.synopsys.integration.blackduck.api.generated.view.ReportView isReportFinishedGenerating​(com.synopsys.integration.rest.HttpUrl reportUrl)
                                                                                                    throws java.lang.InterruptedException,
                                                                                                           com.synopsys.integration.exception.IntegrationException
        Checks the report URL every 5 seconds until the report has a finished time available, then we know it is done being generated. Throws BlackDuckIntegrationException after 30 minutes if the report has not been generated yet.
        Throws:
        java.lang.InterruptedException
        com.synopsys.integration.exception.IntegrationException
      • getNoticesReportContent

        public java.lang.String getNoticesReportContent​(com.synopsys.integration.rest.HttpUrl reportContentUrl)
                                                 throws com.synopsys.integration.exception.IntegrationException
        Throws:
        com.synopsys.integration.exception.IntegrationException
      • deleteBlackDuckReport

        public void deleteBlackDuckReport​(com.synopsys.integration.rest.HttpUrl reportUri)
                                   throws com.synopsys.integration.exception.IntegrationException
        Throws:
        com.synopsys.integration.exception.IntegrationException