Class NoPictureAdapter
- java.lang.Object
-
- org.nuxeo.ecm.platform.picture.api.adapters.AbstractPictureAdapter
-
- org.nuxeo.ecm.platform.picture.api.adapters.NoPictureAdapter
-
- All Implemented Interfaces:
PictureResourceAdapter
public class NoPictureAdapter extends AbstractPictureAdapter
Picture adapter that creates no picture views at all.
-
-
Field Summary
Fields Modifier and Type Field Description static String
ORIGINAL_VIEW_NAME
-
Fields inherited from class org.nuxeo.ecm.platform.picture.api.adapters.AbstractPictureAdapter
CONTENT_XPATH, depth, description, doc, FIELD_BYLINE, FIELD_CAPTION, FIELD_CREDIT, FIELD_DATELINE, FIELD_GENRE, FIELD_HEADLINE, FIELD_LANGUAGE, FIELD_ORIGIN, FIELD_SLUGLINE, FIELD_SOURCE, FIELD_SUBHEADLINE, FIELD_TYPAGE, fileContent, height, imageInfo, MEDIUM_SIZE, SCHEMA_NAME, SMALL_SIZE, THUMB_SIZE, type, VIEWS_PROPERTY, width
-
-
Constructor Summary
Constructors Constructor Description NoPictureAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doCrop(String coords)
void
doRotate(int angle)
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.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
.-
Methods inherited from class org.nuxeo.ecm.platform.picture.api.adapters.AbstractPictureAdapter
addPictureView, addPictureViews, addViews, clearInfo, clearViews, createPictureimpl, crop, fillPictureViews, getContentFromViews, getConversionService, getImageInfo, getImagingService, getPictureViews, getSession, setDocumentModel, setMetadata
-
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
fillPictureViews
-
-
-
-
Field Detail
-
ORIGINAL_VIEW_NAME
public static final String ORIGINAL_VIEW_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
doRotate
public void doRotate(int angle)
-
doCrop
public void doCrop(String coords)
-
getPictureFromTitle
public Blob getPictureFromTitle(String title) throws PropertyException
- Throws:
PropertyException
-
getFirstViewXPath
public String getFirstViewXPath()
Description copied from interface:PictureResourceAdapter
Convenience method to get the XPath of the first view of the Picture.- Returns:
- the XPath of the first view
-
getViewXPath
public String getViewXPath(String viewName)
Description copied from interface:PictureResourceAdapter
Returns the XPath of the given view name, ornull
if the view is not found on the Picture.- Parameters:
viewName
- the view name
-
fillPictureViews
public boolean fillPictureViews(Blob blob, String filename, String title, List<Map<String,Object>> pictureConversions)
Description copied from interface:PictureResourceAdapter
Fill this Picture views using the givenpictureConversions
andblob
to compute the picture views.The
blob
is converted to fit the definedpictureConversions
.
-
preFillPictureViews
public void preFillPictureViews(Blob blob, List<Map<String,Object>> pictureConversions, ImageInfo imageInfo)
Description copied from interface:PictureResourceAdapter
Pre-fill this Picture views using the givenpictureConversions
andblob
.The
blob
is not converted and just stored as the Blob of the picture views.
-
-