org.alfresco.repo.thumbnail
Class ThumbnailRegistry

java.lang.Object
  extended by org.alfresco.repo.thumbnail.ThumbnailRegistry
All Implemented Interfaces:
java.util.EventListener, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener

public class ThumbnailRegistry
extends java.lang.Object
implements org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener

Registry of all the thumbnail details available


Constructor Summary
ThumbnailRegistry()
           
 
Method Summary
 void addThumbnailDefinition(ThumbnailDefinition thumbnailDetails)
          Add a thumbnail details
 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)
           
 ThumbnailRenditionConvertor getThumbnailRenditionConvertor()
           
 java.util.List getThumnailDefintions(java.lang.String mimetype)
          Deprecated. Use ThumbnailRegistry.getThumbnailDefinitions(String) instead.
 boolean isThumbnailDefinitionAvailable(java.lang.String sourceMimeType, 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 setThumbnailDefinitions(java.util.List thumbnailDefinitions)
          This method is used to inject the thumbnail definitions.
 void setThumbnailRenditionConvertor(ThumbnailRenditionConvertor thumbnailRenditionConvertor)
           
 void setTransactionService(TransactionService transactionService)
          Transaction service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThumbnailRegistry

public ThumbnailRegistry()
Method Detail

setThumbnailRenditionConvertor

public void setThumbnailRenditionConvertor(ThumbnailRenditionConvertor thumbnailRenditionConvertor)

getThumbnailRenditionConvertor

public ThumbnailRenditionConvertor getThumbnailRenditionConvertor()

setContentService

public void setContentService(ContentService contentService)
Content service

Parameters:
contentService - content service

setTransactionService

public void setTransactionService(TransactionService transactionService)
Transaction service

Parameters:
transactionService - transaction service

setRenditionService

public void setRenditionService(RenditionService renditionService)
Rendition service

Parameters:
renditionService - rendition service

setThumbnailDefinitions

public void setThumbnailDefinitions(java.util.List thumbnailDefinitions)
This method is used to inject the thumbnail definitions.

Parameters:
thumbnailDefinitions -

getThumbnailDefinitions

public java.util.List getThumbnailDefinitions()
Get a list of all the thumbnail definitions

Returns:
Collection collection of thumbnail definitions

getThumbnailDefinitions

public java.util.List getThumbnailDefinitions(java.lang.String mimetype)

getThumnailDefintions

@Deprecated
public java.util.List getThumnailDefintions(java.lang.String mimetype)
Deprecated. Use ThumbnailRegistry.getThumbnailDefinitions(String) instead.

Parameters:
mimetype -
Returns:

isThumbnailDefinitionAvailable

public boolean isThumbnailDefinitionAvailable(java.lang.String sourceMimeType,
                                              ThumbnailDefinition thumbnailDefinition)
Checks to see if at this moment in time, the specified ThumbnailDefinition is able to thumbnail the source mimetype. Typically used with Thumbnail Definitions retrieved by name, and/or when dealing with transient ContentTransformers.

Parameters:
thumbnailDefinition - The ThumbnailDefinition to check for
sourceMimeType - The source mimetype

addThumbnailDefinition

public void addThumbnailDefinition(ThumbnailDefinition thumbnailDetails)
Add a thumbnail details

Parameters:
thumbnailDetails - thumbnail details

getThumbnailDefinition

public ThumbnailDefinition getThumbnailDefinition(java.lang.String thumbnailName)
Get the definition of a named thumbnail

Parameters:
thumbnailNam - the thumbnail name
Returns:
ThumbnailDetails the details of the thumbnail

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

onApplicationEvent

public void onApplicationEvent(org.springframework.context.event.ApplicationContextEvent event)
Specified by:
onApplicationEvent in interface org.springframework.context.ApplicationListener


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.