public abstract class AbstractPictureAdapter extends Object implements PictureResourceAdapter
Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_XPATH |
protected Integer |
depth |
protected String |
description |
protected DocumentModel |
doc |
static String |
FIELD_BYLINE |
static String |
FIELD_CAPTION |
static String |
FIELD_CREDIT |
static String |
FIELD_DATELINE |
static String |
FIELD_GENRE |
static String |
FIELD_HEADLINE |
static String |
FIELD_LANGUAGE |
static String |
FIELD_ORIGIN |
static String |
FIELD_SLUGLINE |
static String |
FIELD_SOURCE |
static String |
FIELD_SUBHEADLINE |
static String |
FIELD_TYPAGE |
protected Blob |
fileContent |
protected Integer |
height |
protected ImageInfo |
imageInfo |
static int |
MEDIUM_SIZE |
static String |
SCHEMA_NAME |
static int |
SMALL_SIZE |
static int |
THUMB_SIZE |
protected String |
type |
static String |
VIEWS_PROPERTY |
protected Integer |
width |
Constructor and Description |
---|
AbstractPictureAdapter() |
Modifier and Type | Method and Description |
---|---|
protected void |
addPictureView(PictureView view)
Add a pictureView to the existing picture views attached with the document
|
protected void |
addPictureViews(List<PictureView> pictureViews,
boolean clearPictureViews)
Attach new picture views with the document
|
protected void |
addViews(List<Map<String,Object>> pictureConversions,
String filename,
String title) |
protected void |
clearViews() |
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 to
PictureResourceAdapter.fillPictureViews(Blob, String, String, List) by passing null instead of
statics picture templates. |
protected Blob |
getContentFromViews(Integer i) |
protected ConversionService |
getConversionService() |
protected ImageInfo |
getImageInfo()
Returns the
ImageInfo for the main Blob (fileContent ). |
protected ImagingService |
getImagingService() |
protected List<Map<String,Serializable>> |
getPictureViews()
Returns the picture views attached to the document if present, an empty list otherwise.
|
protected CoreSession |
getSession() |
void |
setDocumentModel(DocumentModel doc) |
protected void |
setMetadata() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doCrop, doRotate, fillPictureViews, getFirstViewXPath, getPictureFromTitle, getViewXPath, preFillPictureViews
public static final String VIEWS_PROPERTY
public static final String CONTENT_XPATH
public static final String FIELD_HEADLINE
public static final String FIELD_SUBHEADLINE
public static final String FIELD_BYLINE
public static final String FIELD_DATELINE
public static final String FIELD_SLUGLINE
public static final String FIELD_CREDIT
public static final String FIELD_LANGUAGE
public static final String FIELD_SOURCE
public static final String FIELD_ORIGIN
public static final String FIELD_GENRE
public static final String FIELD_CAPTION
public static final String FIELD_TYPAGE
public static final String SCHEMA_NAME
public static final int MEDIUM_SIZE
public static final int SMALL_SIZE
public static final int THUMB_SIZE
protected DocumentModel doc
protected String description
protected Blob fileContent
public AbstractPictureAdapter()
public void setDocumentModel(DocumentModel doc)
setDocumentModel
in interface PictureResourceAdapter
protected ImagingService getImagingService()
protected ConversionService getConversionService()
protected CoreSession getSession()
protected void setMetadata() throws IOException
IOException
protected void clearViews()
protected void addViews(List<Map<String,Object>> pictureConversions, String filename, String title) throws IOException
IOException
public void createPictureimpl(String description, String tag, String title, Integer maxsize, String filename, Integer width, Integer height, Integer depth, Blob fileContent) throws IOException
IOException
protected void addPictureViews(List<PictureView> pictureViews, boolean clearPictureViews)
public boolean fillPictureViews(Blob blob, String filename, String title) throws IOException
PictureResourceAdapter
PictureResourceAdapter.fillPictureViews(Blob, String, String, List)
by passing null instead of
statics picture templates. fillPictureViews
in interface PictureResourceAdapter
IOException
PictureResourceAdapter#fillPictureViews(Blob, String, String, List)}
protected List<Map<String,Serializable>> getPictureViews()
protected void addPictureView(PictureView view)
protected ImageInfo getImageInfo()
ImageInfo
for the main Blob (fileContent
).protected Blob getContentFromViews(Integer i)
Copyright © 2017 Nuxeo. All rights reserved.