Interface ThumbnailService
- All Known Implementing Classes:
ThumbnailServiceImpl
Deprecated.
We are introducing the new async RenditionService2.
Thumbnail Service API
- Author:
- Roy Wetherall (based on original contribution by Ray Gauss II)
-
Method Summary
Modifier and TypeMethodDescriptioncreateThumbnail(NodeRef node, QName contentProperty, String mimetype, TransformationOptions transformationOptions, String name) Deprecated.Creates a new thumbnail for the given node and content property.createThumbnail(NodeRef node, QName contentProperty, String mimetype, TransformationOptions transformationOptions, String name, ThumbnailParentAssociationDetails assocDetails) Deprecated.getFailedThumbnails(NodeRef sourceNode) Deprecated.This method returns aMapoffailed thumbnailsfor the specified source node.getThumbnailByName(NodeRef node, QName contentProperty, String thumbnailName) Deprecated.Gets the thumbnail for a given content property with a given name.Deprecated.Gets the thumbnail registrygetThumbnails(NodeRef node, QName contentProperty, String mimetype, TransformationOptions options) Deprecated.Gets a list of thumbnail nodes for a given content property that match the provided mimetype and transformation options.booleanDeprecated.This method indicates whether thumbnail creation via this service has been globally enabled or disabled.voidsetThumbnailsEnabled(boolean thumbnailsEnabled) Deprecated.This method enables or disables the creation of all thumbnails by this service.voidupdateThumbnail(NodeRef thumbnail, TransformationOptions transformationOptions) Deprecated.Updates the content of a thumbnail.
-
Method Details
-
getThumbnailRegistry
Deprecated.Gets the thumbnail registry- Returns:
ThumbnailRegistrythumbnail registry
-
createThumbnail
@Auditable(parameters={"node","contentProperty","mimetype","transformationOptions","name"}) NodeRef createThumbnail(NodeRef node, QName contentProperty, String mimetype, TransformationOptions transformationOptions, String name) Deprecated.Creates a new thumbnail for the given node and content property. The mimetype and transformation options are used to determine the content transformer that will be best suited to create the thumbnail. The thumbnail name is optional, but is usually set to provide an easy way to identify a particular 'type' of thumbnail. Once created the source node will have the 'rn:renditioned' aspect applied and an association to the thumbnail node (of type 'rn:rendition') will be created. The returned node reference is to the 'rn:rendition' content node that contains the thumbnail content in the standard 'cm:content' property.- Parameters:
node- the source content nodecontentProperty- the content propertymimetype- the thumbnail mimetypetransformationOptions- the thumbnail transformation optionsname- the name of the thumbnail (optional, pass null for unnamed thumbnail)- Returns:
- NodeRef node reference to the newly created thumbnail
- See Also:
-
createThumbnail
@Auditable(parameters={"node","contentProperty","mimetype","transformationOptions","name","assocDetails"}) NodeRef createThumbnail(NodeRef node, QName contentProperty, String mimetype, TransformationOptions transformationOptions, String name, ThumbnailParentAssociationDetails assocDetails) Deprecated.- Parameters:
node- the source content nodecontentProperty- the content propertymimetype- the thumbnail mimetypetransformationOptions- the thumbnail transformation optionsname- the name of the thumbnail (optional, pass null for unnamed thumbnail)assocDetails- the thumbnail parent association details- Returns:
- NodeRef node reference to the newly created thumbnail
- See Also:
-
updateThumbnail
@Auditable(parameters={"thumbnail","transformationOptions"}) void updateThumbnail(NodeRef thumbnail, TransformationOptions transformationOptions) Deprecated.Updates the content of a thumbnail. The original thumbnail content is updated from the source content using the transformation options provided. The mimetype and name of the thumbnail remain unchanged. To change the name or mimetype of an updated thumbnail it should be deleted and recreated. An error is raised if the original content no longer exists.- Parameters:
thumbnail- the thumbnail nodetransformationOptions- the transformation options used when updating the thumbnail
-
getThumbnailByName
@Auditable(parameters={"node","contentProperty","thumbnailName"}) NodeRef getThumbnailByName(NodeRef node, QName contentProperty, String thumbnailName) Deprecated.Gets the thumbnail for a given content property with a given name. Returns null if no thumbnail with that name for that content property is found.- Parameters:
node- node referencecontentProperty- content property namethumbnailName- thumbnail name- Returns:
- NodeRef the thumbnail node reference, null if not found
-
getThumbnails
@Auditable(parameters={"node","contentProperty","mimetype","options"}) List<NodeRef> getThumbnails(NodeRef node, QName contentProperty, String mimetype, TransformationOptions options) Deprecated.Gets a list of thumbnail nodes for a given content property that match the provided mimetype and transformation options. Both mimetype and transformation options are optional parameters. If only one or other is specified the only the other is considered during. If neither are provided all thumbnails for that content property are returned. If no matches are found then an empty list is returned.- Parameters:
node- node referencecontentProperty- content property namemimetype- mimetypeoptions- transformation options- Returns:
- list of matching thumbnail node references, empty if no matches found
-
getFailedThumbnails
@Auditable(parameters="sourceNode") Map<String,FailedThumbnailInfo> getFailedThumbnails(NodeRef sourceNode) Deprecated.This method returns aMapoffailed thumbnailsfor the specified source node. The map is keyed bythumbnail definition nameand the values are thefailed thumbnails.- Parameters:
sourceNode- the node whose thumbnails are to be checked.- Returns:
- a Map of failed thumbnails, if any. If there are no such failures, an empty Map will be returned.
- Since:
- 3.5.0
-
setThumbnailsEnabled
void setThumbnailsEnabled(boolean thumbnailsEnabled) Deprecated.This method enables or disables the creation of all thumbnails by this service.- Parameters:
thumbnailsEnabled-trueto enable all thumbnail creation (the default setting), orfalseto disable.- Since:
- 4.1.7
-
getThumbnailsEnabled
boolean getThumbnailsEnabled()Deprecated.This method indicates whether thumbnail creation via this service has been globally enabled or disabled.- Since:
- 4.1.7
-