Class AbstractPictureAdapter
java.lang.Object
org.nuxeo.ecm.platform.picture.api.adapters.AbstractPictureAdapter
- All Implemented Interfaces:
PictureResourceAdapter
- Direct Known Subclasses:
DefaultPictureAdapter
,NoPictureAdapter
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected Integer
protected String
protected DocumentModel
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
protected Blob
protected Integer
protected ImageInfo
static final int
static final String
static final int
static final int
protected String
static final String
protected Integer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addPictureView
(PictureView view) Add a pictureView to the existing picture views attached with the documentprotected void
addPictureViews
(List<PictureView> pictureViews, boolean clearPictureViews) Attach new picture views with the documentprotected void
addViews
(List<Map<String, Object>> pictureConversions, String filename, String title, boolean outsideTx) void
Clear the picture info.protected void
void
createPictureimpl
(String description, String tag, String title, Integer maxsize, String filename, Integer width, Integer height, Integer depth, Blob fileContent) protected Blob
crop
(Blob blob, Map<String, Serializable> coords) boolean
fillPictureViews
(Blob blob, String filename, String title) This method just delegate the job toPictureResourceAdapter.fillPictureViews(Blob, String, String, List)
by passing null instead of statics picture templates.protected Blob
protected ConversionService
protected ImageInfo
Returns theImageInfo
for the main Blob (fileContent
).protected ImagingService
protected List<Map<String,
Serializable>> Returns the picture views attached to the document if present, an empty list otherwise.protected CoreSession
void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.ecm.platform.picture.api.adapters.PictureResourceAdapter
doCrop, doRotate, fillPictureViews, fillPictureViews, getFirstViewXPath, getPictureFromTitle, getViewXPath, preFillPictureViews
-
Field Details
-
VIEWS_PROPERTY
- See Also:
-
CONTENT_XPATH
- See Also:
-
FIELD_HEADLINE
- See Also:
-
FIELD_SUBHEADLINE
- See Also:
-
FIELD_BYLINE
- See Also:
-
FIELD_DATELINE
- See Also:
-
FIELD_SLUGLINE
- See Also:
-
FIELD_CREDIT
- See Also:
-
FIELD_LANGUAGE
- See Also:
-
FIELD_SOURCE
- See Also:
-
FIELD_ORIGIN
- See Also:
-
FIELD_GENRE
- See Also:
-
FIELD_CAPTION
- See Also:
-
FIELD_TYPAGE
- See Also:
-
SCHEMA_NAME
- See Also:
-
MEDIUM_SIZE
public static final int MEDIUM_SIZE- See Also:
-
SMALL_SIZE
public static final int SMALL_SIZE- See Also:
-
THUMB_SIZE
public static final int THUMB_SIZE- See Also:
-
doc
-
width
-
height
-
depth
-
description
-
type
-
fileContent
-
imageInfo
- Since:
- 5.9.5
-
-
Constructor Details
-
AbstractPictureAdapter
public AbstractPictureAdapter()
-
-
Method Details
-
setDocumentModel
- Specified by:
setDocumentModel
in interfacePictureResourceAdapter
-
getImagingService
-
getConversionService
-
getSession
-
clearInfo
public void clearInfo()Description copied from interface:PictureResourceAdapter
Clear the picture info.- Specified by:
clearInfo
in interfacePictureResourceAdapter
-
clearViews
protected void clearViews() -
addViews
protected void addViews(List<Map<String, Object>> pictureConversions, String filename, String title, boolean outsideTx) throws IOException- Throws:
IOException
-
createPictureimpl
public void createPictureimpl(String description, String tag, String title, Integer maxsize, String filename, Integer width, Integer height, Integer depth, Blob fileContent) throws IOException - Throws:
IOException
-
addPictureViews
Attach new picture views with the document- Since:
- 7.1
-
fillPictureViews
Description copied from interface:PictureResourceAdapter
This method just delegate the job toPictureResourceAdapter.fillPictureViews(Blob, String, String, List)
by passing null instead of statics picture templates.This will fill the picture views by using the registered picture templates.
- Specified by:
fillPictureViews
in interfacePictureResourceAdapter
- Throws:
IOException
- See Also:
-
getPictureViews
Returns the picture views attached to the document if present, an empty list otherwise.- Since:
- 7.1
-
addPictureView
Add a pictureView to the existing picture views attached with the document- Since:
- 7.1
-
getImageInfo
Returns theImageInfo
for the main Blob (fileContent
).- Since:
- 5.9.5.
-
getContentFromViews
-
crop
-