public class DefaultPictureAdapter extends AbstractPictureAdapter
CONTENT_XPATH, FIELD_BYLINE, FIELD_CAPTION, FIELD_CREDIT, FIELD_DATELINE, FIELD_GENRE, FIELD_HEADLINE, FIELD_LANGUAGE, FIELD_ORIGIN, FIELD_SLUGLINE, FIELD_SOURCE, FIELD_SUBHEADLINE, FIELD_TYPAGE, MEDIUM_SIZE, SCHEMA_NAME, SMALL_SIZE, THUMB_SIZE, VIEWS_PROPERTY| Constructor and Description |
|---|
DefaultPictureAdapter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
createPicture(Blob blob,
String filename,
String title,
ArrayList<Map<String,Object>> pictureTemplates) |
void |
doCrop(String coords) |
void |
doRotate(int angle) |
boolean |
fillPictureViews(Blob blob,
String filename,
String title,
ArrayList<Map<String,Object>> pictureTemplates)
Fill this Picture views using the given
pictureTemplates and
blob 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, or
null if the view is
not found on the Picture. |
void |
preFillPictureViews(Blob blob,
List<Map<String,Object>> pictureTemplates,
ImageInfo imageInfo)
Pre-fill this Picture views using the given
pictureTemplates and
blob. |
createPictureimpl, setDocumentModelpublic boolean createPicture(Blob blob, String filename, String title, ArrayList<Map<String,Object>> pictureTemplates) throws IOException, ClientException
IOExceptionClientExceptionpublic boolean fillPictureViews(Blob blob, String filename, String title, ArrayList<Map<String,Object>> pictureTemplates) throws IOException, ClientException
PictureResourceAdapterpictureTemplates and
blob to compute the picture views.
The blob is converted to fit the defined pictureTemplates.
IOExceptionClientExceptionpublic void preFillPictureViews(Blob blob, List<Map<String,Object>> pictureTemplates, ImageInfo imageInfo) throws IOException, ClientException
PictureResourceAdapterpictureTemplates and
blob.
The blob is not converted and just stored as the Blob of the
picture views.
IOExceptionClientExceptionpublic void doRotate(int angle)
throws ClientException
ClientExceptionpublic void doCrop(String coords) throws ClientException
ClientExceptionpublic Blob getPictureFromTitle(String title) throws PropertyException, ClientException
PropertyExceptionClientExceptionpublic String getFirstViewXPath()
PictureResourceAdapterpublic String getViewXPath(String viewName)
PictureResourceAdapternull if the view is
not found on the Picture.viewName - the view nameCopyright © 2013 Nuxeo SA. All Rights Reserved.