public class ThumbnailRegistry
extends java.lang.Object
implements org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener
| Constructor and Description |
|---|
ThumbnailRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
addThumbnailDefinition(ThumbnailDefinition thumbnailDetails)
Add a thumbnail details
|
long |
getMaxSourceSizeBytes(java.lang.String sourceMimetype,
ThumbnailDefinition thumbnailDefinition)
Returns the maximum source size of any content that may transformed between the supplied
sourceMimetype and thumbnailDefinition's targetMimetype using its transformation options.
|
ThumbnailDefinition |
getThumbnailDefinition(java.lang.String thumbnailName)
Get the definition of a named thumbnail
|
java.util.List |
getThumbnailDefinitions()
Get a list of all the thumbnail definitions
|
java.util.List |
getThumbnailDefinitions(java.lang.String mimetype)
Deprecated.
use overloaded version with sourceSize parameter.
|
java.util.List |
getThumbnailDefinitions(java.lang.String mimetype,
long sourceSize) |
ThumbnailRenditionConvertor |
getThumbnailRenditionConvertor() |
java.util.List |
getThumnailDefintions(java.lang.String mimetype)
Deprecated.
Use
ThumbnailRegistry.getThumbnailDefinitions(String) instead. |
void |
initThumbnailDefinitions() |
boolean |
isThumbnailDefinitionAvailable(java.lang.String sourceUrl,
java.lang.String sourceMimetype,
long sourceSize,
org.alfresco.service.cmr.repository.NodeRef sourceNodeRef,
ThumbnailDefinition thumbnailDefinition)
Checks to see if at this moment in time, the specified
ThumbnailDefinition
is able to thumbnail the source mimetype. |
void |
onApplicationEvent(org.springframework.context.event.ApplicationContextEvent event) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setContentService(ContentService contentService)
Content service
|
void |
setRenditionService(RenditionService renditionService)
Rendition service
|
void |
setTenantAdminService(TenantAdminService tenantAdminService) |
void |
setThumbnailDefinitions(java.util.List thumbnailDefinitions)
This method is used to inject the thumbnail definitions.
|
void |
setThumbnailRenditionConvertor(ThumbnailRenditionConvertor thumbnailRenditionConvertor) |
void |
setTransactionService(TransactionService transactionService)
Transaction service
|
public void setThumbnailRenditionConvertor(ThumbnailRenditionConvertor thumbnailRenditionConvertor)
public ThumbnailRenditionConvertor getThumbnailRenditionConvertor()
public void setContentService(ContentService contentService)
contentService - content servicepublic void setTransactionService(TransactionService transactionService)
transactionService - transaction servicepublic void setRenditionService(RenditionService renditionService)
renditionService - rendition servicepublic void setTenantAdminService(TenantAdminService tenantAdminService)
public void setThumbnailDefinitions(java.util.List thumbnailDefinitions)
thumbnailDefinitions - public void initThumbnailDefinitions()
public java.util.List getThumbnailDefinitions()
public java.util.List getThumbnailDefinitions(java.lang.String mimetype)
public java.util.List getThumbnailDefinitions(java.lang.String mimetype,
long sourceSize)
@Deprecated public java.util.List getThumnailDefintions(java.lang.String mimetype)
ThumbnailRegistry.getThumbnailDefinitions(String) instead.mimetype - public boolean isThumbnailDefinitionAvailable(java.lang.String sourceUrl,
java.lang.String sourceMimetype,
long sourceSize,
org.alfresco.service.cmr.repository.NodeRef sourceNodeRef,
ThumbnailDefinition thumbnailDefinition)
ThumbnailDefinition
is able to thumbnail the source mimetype. Typically used with Thumbnail Definitions
retrieved by name, and/or when dealing with transient ContentTransformers.sourceUrl - The URL of the source (optional)sourceMimetype - The source mimetypesourceSize - the size (in bytes) of the source. Use -1 if unknown.sourceNodeRef - which is set in a copy of the thumbnailDefinition transformation options,
so that it may be used by transformers and debug.thumbnailDefinition - The ThumbnailDefinition to check forpublic long getMaxSourceSizeBytes(java.lang.String sourceMimetype,
ThumbnailDefinition thumbnailDefinition)
sourceMimetype - thumbnailDefinition - public void addThumbnailDefinition(ThumbnailDefinition thumbnailDetails)
thumbnailDetails - thumbnail detailspublic ThumbnailDefinition getThumbnailDefinition(java.lang.String thumbnailName)
thumbnailNam - the thumbnail namepublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void onApplicationEvent(org.springframework.context.event.ApplicationContextEvent event)
onApplicationEvent in interface org.springframework.context.ApplicationListenerCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.