Package org.alfresco.repo.thumbnail
Class ThumbnailDefinition
- java.lang.Object
-
- org.alfresco.repo.thumbnail.ThumbnailDefinition
-
public class ThumbnailDefinition extends Object
This class provides the thumbnail details to the thumbnail service.- Author:
- Roy Wetherall
-
-
Constructor Summary
Constructors Constructor Description ThumbnailDefinition()Default constructorThumbnailDefinition(String destinationMimetype, TransformationOptions options)ConstructorThumbnailDefinition(String mimetype, TransformationOptions options, String thumbnailName)Constructor.ThumbnailDefinition(String mimetype, TransformationOptions options, String thumbnailName, String placeHolderResourcePath)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)FailureHandlingOptionsgetFailureHandlingOptions()Get thefailure options.StringgetMimeAwarePlaceHolderResourcePath()StringgetMimetype()Get the destination mimetypeStringgetName()Gets the name of the thumbnailStringgetPlaceHolderResourcePath()StringgetRunAs()ThumbnailRegistrygetThumbnailRegistry()Gets the thumbnail registryTransformationOptionsgetTransformationOptions()Get the transformation optionsinthashCode()voidregister()Registers the thumbnail definition with the thumbnail registry.voidsetFailureHandlingOptions(FailureHandlingOptions failureOptions)Set thefailure options.voidsetMimeAwarePlaceHolderResourcePath(String mimeAwarePlaceHolderResourcePath)This method sets the mime-aware placeholder resource path template.voidsetMimetype(String mimetype)Set the destination mimetypevoidsetName(String thumbnailName)Sets the name of the thumbnailvoidsetPlaceHolderResourcePath(String placeHolderResourcePath)This method sets the placeholder resource path.voidsetRunAs(String runAs)voidsetThumbnailRegistry(ThumbnailRegistry thumbnailRegistry)Sets the thumbnail registryvoidsetTransformationOptions(TransformationOptions options)Set the transformation options
-
-
-
Constructor Detail
-
ThumbnailDefinition
public ThumbnailDefinition()
Default constructor
-
ThumbnailDefinition
public ThumbnailDefinition(String destinationMimetype, TransformationOptions options)
Constructor- Parameters:
destinationMimetype- Stringoptions- TransformationOptions
-
ThumbnailDefinition
public ThumbnailDefinition(String mimetype, TransformationOptions options, String thumbnailName)
Constructor. Specify the name of the thumbnail.- Parameters:
thumbnailName- the name of the thumbnail, can be null
-
ThumbnailDefinition
public ThumbnailDefinition(String mimetype, TransformationOptions options, String thumbnailName, String placeHolderResourcePath)
Constructor. Specify the place holder thumbnail path.- Parameters:
mimetype- Stringoptions- TransformationOptionsthumbnailName- StringplaceHolderResourcePath- String
-
-
Method Detail
-
setMimetype
public void setMimetype(String mimetype)
Set the destination mimetype- Parameters:
mimetype- the destination minetype
-
getMimetype
public String getMimetype()
Get the destination mimetype- Returns:
- the destination mimetype
-
setTransformationOptions
public void setTransformationOptions(TransformationOptions options)
Set the transformation options- Parameters:
options- the transformation options
-
getTransformationOptions
public TransformationOptions getTransformationOptions()
Get the transformation options- Returns:
- the transformation options
-
setFailureHandlingOptions
public void setFailureHandlingOptions(FailureHandlingOptions failureOptions)
Set thefailure options.- Parameters:
failureOptions- the failure options.- Since:
- 3.5.0
-
getFailureHandlingOptions
public FailureHandlingOptions getFailureHandlingOptions()
Get thefailure options.- Returns:
- the failure options
- Since:
- 3.5.0
-
setName
public void setName(String thumbnailName)
Sets the name of the thumbnail- Parameters:
thumbnailName- the thumbnail name
-
getName
public String getName()
Gets the name of the thumbnail- Returns:
- String the name of the thumbnail, null if non specified
-
setRunAs
public void setRunAs(String runAs)
-
getRunAs
public String getRunAs()
-
setPlaceHolderResourcePath
public void setPlaceHolderResourcePath(String placeHolderResourcePath)
This method sets the placeholder resource path.- Parameters:
placeHolderResourcePath- String
-
getPlaceHolderResourcePath
public String getPlaceHolderResourcePath()
- Returns:
- String
-
setMimeAwarePlaceHolderResourcePath
public void setMimeAwarePlaceHolderResourcePath(String mimeAwarePlaceHolderResourcePath)
This method sets the mime-aware placeholder resource path template.- Parameters:
mimeAwarePlaceHolderResourcePath- String- Since:
- 3.4.1 (Team)
-
getMimeAwarePlaceHolderResourcePath
public String getMimeAwarePlaceHolderResourcePath()
- Returns:
- String
- Since:
- 3.4.1 (Team)
-
getThumbnailRegistry
public ThumbnailRegistry getThumbnailRegistry()
Gets the thumbnail registry- Returns:
- the thumbnail registry
-
setThumbnailRegistry
public void setThumbnailRegistry(ThumbnailRegistry thumbnailRegistry)
Sets the thumbnail registry- Parameters:
thumbnailRegistry- ThumbnailRegistry
-
register
public void register()
Registers the thumbnail definition with the thumbnail registry.- See Also:
setThumbnailRegistry(ThumbnailRegistry)
-
-