Interface PictureResourceAdapter
-
- All Known Implementing Classes:
AbstractPictureAdapter
,DefaultPictureAdapter
,NoPictureAdapter
public interface PictureResourceAdapter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
clearInfo()
Clear the picture info.void
doCrop(String coords)
void
doRotate(int angle)
boolean
fillPictureViews(Blob blob, String filename, String title)
This method just delegate the job tofillPictureViews(Blob, String, String, List)
by passing null instead of statics picture templates.boolean
fillPictureViews(Blob blob, String filename, String title, List<Map<String,Object>> pictureConversions)
Fill this Picture views using the givenpictureConversions
andblob
to compute the picture views.default boolean
fillPictureViews(Blob blob, String filename, String title, List<Map<String,Object>> pictureConversions, boolean outsideTx)
Fill this Picture views using the givenpictureConversions
andblob
to compute the picture views.String
getFirstViewXPath()
Convenience method to get the XPath of the first view of the Picture.Blob
getPictureFromTitle(String title)
String
getViewXPath(String viewName)
Returns the XPath of the given view name, ornull
if the view is not found on the Picture.void
preFillPictureViews(Blob blob, List<Map<String,Object>> pictureConversions, ImageInfo imageInfo)
Pre-fill this Picture views using the givenpictureConversions
andblob
.void
setDocumentModel(DocumentModel doc)
-
-
-
Method Detail
-
setDocumentModel
void setDocumentModel(DocumentModel doc)
-
fillPictureViews
boolean fillPictureViews(Blob blob, String filename, String title, List<Map<String,Object>> pictureConversions) throws IOException
Fill this Picture views using the givenpictureConversions
andblob
to compute the picture views.The
blob
is converted to fit the definedpictureConversions
.- Throws:
IOException
- Since:
- 5.7
-
fillPictureViews
default boolean fillPictureViews(Blob blob, String filename, String title, List<Map<String,Object>> pictureConversions, boolean outsideTx) throws IOException
Fill this Picture views using the givenpictureConversions
andblob
to compute the picture views.The
blob
is converted to fit the definedpictureConversions
.- Parameters:
outsideTx
- should potential conversions be done outside a transaction- Throws:
IOException
- Since:
- 2021.22
-
fillPictureViews
boolean fillPictureViews(Blob blob, String filename, String title) throws IOException
This method just delegate the job tofillPictureViews(Blob, String, String, List)
by passing null instead of statics picture templates.This will fill the picture views by using the registered picture templates.
- Throws:
IOException
- Since:
- 6.9.6
- See Also:
fillPictureViews(Blob, String, String, List)
-
preFillPictureViews
void preFillPictureViews(Blob blob, List<Map<String,Object>> pictureConversions, ImageInfo imageInfo) throws IOException
Pre-fill this Picture views using the givenpictureConversions
andblob
.The
blob
is not converted and just stored as the Blob of the picture views.- Throws:
IOException
- Since:
- 5.7
-
doRotate
void doRotate(int angle)
-
doCrop
void doCrop(String coords)
-
getPictureFromTitle
Blob getPictureFromTitle(String title) throws PropertyException
- Throws:
PropertyException
-
getViewXPath
String getViewXPath(String viewName)
Returns the XPath of the given view name, ornull
if the view is not found on the Picture.- Parameters:
viewName
- the view name
-
getFirstViewXPath
String getFirstViewXPath()
Convenience method to get the XPath of the first view of the Picture.- Returns:
- the XPath of the first view
-
clearInfo
void clearInfo()
Clear the picture info.- Since:
- 2023
-
-