Class AbstractPictureAdapter
java.lang.Object
org.nuxeo.ecm.platform.picture.api.adapters.AbstractPictureAdapter
- All Implemented Interfaces:
PictureResourceAdapter
- Direct Known Subclasses:
DefaultPictureAdapter,NoPictureAdapter
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected Integerprotected Stringprotected DocumentModelstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected Blobprotected Integerprotected ImageInfostatic final intstatic final Stringstatic final intstatic final intprotected Stringstatic final Stringprotected Integer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddPictureView(PictureView view) Add a pictureView to the existing picture views attached with the documentprotected voidaddPictureViews(List<PictureView> pictureViews, boolean clearPictureViews) Attach new picture views with the documentprotected voidaddViews(List<Map<String, Object>> pictureConversions, String filename, String title, boolean outsideTx) voidClear the picture info.protected voidvoidcreatePictureimpl(String description, String tag, String title, Integer maxsize, String filename, Integer width, Integer height, Integer depth, Blob fileContent) protected Blobcrop(Blob blob, Map<String, Serializable> coords) booleanfillPictureViews(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 Blobprotected ConversionServiceprotected ImageInfoReturns theImageInfofor the main Blob (fileContent).protected ImagingServiceprotected List<Map<String, Serializable>> Returns the picture views attached to the document if present, an empty list otherwise.protected CoreSessionvoidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
setDocumentModelin interfacePictureResourceAdapter
-
getImagingService
-
getConversionService
-
getSession
-
clearInfo
public void clearInfo()Description copied from interface:PictureResourceAdapterClear the picture info.- Specified by:
clearInfoin 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:PictureResourceAdapterThis 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:
fillPictureViewsin 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 theImageInfofor the main Blob (fileContent).- Since:
- 5.9.5.
-
getContentFromViews
-
crop
-