Class InstantPreviewDashboardService

java.lang.Object
io.camunda.optimize.service.dashboard.InstantPreviewDashboardService

@Component public class InstantPreviewDashboardService extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • getInstantPreviewDashboard

      public AuthorizedDashboardDefinitionResponseDto getInstantPreviewDashboard(String processDefinitionKey, String dashboardJsonTemplate, String userId)
    • createInstantPreviewDashboard

      public Optional<InstantDashboardDataDto> createInstantPreviewDashboard(String processDefinitionKey, String dashboardJsonTemplate)
    • findAndConvertTileContent

      public static void findAndConvertTileContent(Object node, String fieldType, InstantPreviewDashboardService.BiConsumerWithParameters<Map<String,Object>,String> transformFunction, String additionalParameterValue)
      This method scans recursively through all the components of a Dashboard Tile of the type "text" and performs a conversion on the target sub-component passed under fieldType. The conversion itself is accomplished by the 'converter', which is the method reference passed under transformFunction. Moreover, the additionalParameter value is also passed onto the converter.
      Parameters:
      node - Node with which the recursion is started, in the beginning it is the root node of the Dashboard tile
      fieldType - Which node type do we want to transform? E.g. "image", "text", etc
      transformFunction - Once a node of the type "fieldType" is found, this function performs the necessary conversion
      additionalParameterValue - An additional string that is used by the converter. In the case of an image node this is e.g. the clusterId, in the case of a text node it is e.g. the locale
    • processAllImageUrlsInTiles

      public void processAllImageUrlsInTiles(List<DashboardReportTileDto> tiles)
    • deleteInstantPreviewDashboardsAndEntitiesForChangedTemplates

      @EventListener(org.springframework.boot.context.event.ApplicationReadyEvent.class) public void deleteInstantPreviewDashboardsAndEntitiesForChangedTemplates()
    • getCurrentFileChecksums

      public List<Long> getCurrentFileChecksums()
    • getChecksumCRC32

      public static long getChecksumCRC32(InputStream stream, int bufferSize) throws IOException
      Throws:
      IOException
    • getChecksumCRC32

      public static long getChecksumCRC32(String input)