Class LayoutImageProcessor

    • Constructor Detail

      • LayoutImageProcessor

        public LayoutImageProcessor​(IPictureManager pictureManager,
                                    AvailablePicturesProvider pictureProvider,
                                    IV8ProjectManager v8projectManager,
                                    IEditingLanguageManager languageManager)
        Creates instance.
        Parameters:
        pictureManager - the picture manager, cannot be null
        pictureProvider - the layout picture provider, cannot be null
        v8projectManager - the project manager, cannot be null
        languageManager - the language manager, cannot be null
    • Method Detail

      • replaceImageReferences

        public void replaceImageReferences​(HippoLayStaticText text,
                                           FormPictureCollection pictureCollection)
        Description copied from interface: ILayoutImageProcessor
        Replaces image references in the given formatted text to acceptable ones.

        Modifies the formatted text by replacing image URLs or composit IDs to UUIDs, and puts related image sizes with UUIDs to the picture collection.

        Specified by:
        replaceImageReferences in interface ILayoutImageProcessor
        Parameters:
        text - the hippo layout formatted text, cannot be null
        pictureCollection - the picture collection, cannot be null
      • assignImageUUID

        public UUID assignImageUUID​(Picture picture,
                                    FormPictureCollection pictureCollection)
        Description copied from interface: ILayoutImageProcessor
        Assigns an UUID to the given image.

        Generates an UUID for the image and puts it with image size to the picture collection.

        Specified by:
        assignImageUUID in interface ILayoutImageProcessor
        Parameters:
        picture - the picture, cannot be null
        pictureCollection - the picture collection, cannot be null
        Returns:
        UUID, can be null if image is empty.