Class DefaultPictureAdapter

    • Constructor Detail

      • DefaultPictureAdapter

        public DefaultPictureAdapter()
    • Method Detail

      • fillPictureViews

        public boolean fillPictureViews​(Blob blob,
                                        String filename,
                                        String title,
                                        List<Map<String,​Object>> pictureConversions)
                                 throws IOException
        Description copied from interface: PictureResourceAdapter
        Fill this Picture views using the given pictureConversions and blob to compute the picture views.

        The blob is converted to fit the defined pictureConversions.

        Throws:
        IOException
      • fillPictureViews

        public boolean fillPictureViews​(Blob blob,
                                        String filename,
                                        String title,
                                        List<Map<String,​Object>> pictureConversions,
                                        boolean outsideTx)
                                 throws IOException
        Description copied from interface: PictureResourceAdapter
        Fill this Picture views using the given pictureConversions and blob to compute the picture views.

        The blob is converted to fit the defined pictureConversions.

        outsideTx - should potential conversions be done outside a transaction
        Throws:
        IOException
      • preFillPictureViews

        public void preFillPictureViews​(Blob blob,
                                        List<Map<String,​Object>> pictureConversions,
                                        ImageInfo imageInfo)
                                 throws IOException
        Description copied from interface: PictureResourceAdapter
        Pre-fill this Picture views using the given pictureConversions and blob.

        The blob is not converted and just stored as the Blob of the picture views.

        Throws:
        IOException
      • doRotate

        public void doRotate​(int angle)
      • doCrop

        public void doCrop​(String coords)
      • getFirstViewXPath

        public String getFirstViewXPath()
        Description copied from interface: PictureResourceAdapter
        Convenience method to get the XPath of the first view of the Picture.
        Returns:
        the XPath of the first view
      • getViewXPath

        public String getViewXPath​(String viewName)
        Description copied from interface: PictureResourceAdapter
        Returns the XPath of the given view name, or null if the view is not found on the Picture.
        Parameters:
        viewName - the view name
      • getViewXPathFor

        protected String getViewXPathFor​(int index)