org.alfresco.repo.thumbnail.script
Class ScriptThumbnailService

java.lang.Object
  extended by org.alfresco.repo.processor.BaseProcessorExtension
      extended by org.alfresco.repo.jscript.BaseScopableProcessorExtension
          extended by org.alfresco.repo.thumbnail.script.ScriptThumbnailService
All Implemented Interfaces:
org.alfresco.processor.ProcessorExtension, Scopeable

public class ScriptThumbnailService
extends BaseScopableProcessorExtension

Script object representing the site service.


Constructor Summary
ScriptThumbnailService()
           
 
Method Summary
 java.lang.String getMimeAwarePlaceHolderResourcePath(java.lang.String thumbnailName, java.lang.String mimetype)
          Gets the resource path for the place holder thumbnail for the given named thumbnail and the given mime type.
 java.lang.String getPlaceHolderResourcePath(java.lang.String thumbnailName)
          Gets the resource path for the place holder thumbnail for the given named thumbnail.
 boolean isThumbnailNameRegistered(java.lang.String thumbnailName)
          Indicates whether a given thumbnail name has been registered.
 void setServiceRegistry(ServiceRegistry serviceRegistry)
          Sets the Service Registry
 
Methods inherited from class org.alfresco.repo.jscript.BaseScopableProcessorExtension
getScope, setScope
 
Methods inherited from class org.alfresco.repo.processor.BaseProcessorExtension
getExtensionName, register, setExtensionName, setProcessor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptThumbnailService

public ScriptThumbnailService()
Method Detail

setServiceRegistry

public void setServiceRegistry(ServiceRegistry serviceRegistry)
Sets the Service Registry

Parameters:
serviceRegistry -

isThumbnailNameRegistered

public boolean isThumbnailNameRegistered(java.lang.String thumbnailName)
Indicates whether a given thumbnail name has been registered.

Parameters:
thumbnailName - thumbnail name
Returns:
boolean true if the thumbnail name is registered, false otherwise

getPlaceHolderResourcePath

public java.lang.String getPlaceHolderResourcePath(java.lang.String thumbnailName)
Gets the resource path for the place holder thumbnail for the given named thumbnail. Returns null if none set.

Parameters:
thumbnailName - the thumbnail name
Returns:
String the place holder thumbnail resource path, null if none set

getMimeAwarePlaceHolderResourcePath

public java.lang.String getMimeAwarePlaceHolderResourcePath(java.lang.String thumbnailName,
                                                            java.lang.String mimetype)
Gets the resource path for the place holder thumbnail for the given named thumbnail and the given mime type. If there is no icon available for the specified MIME type, a generic icon will be used instead. The generic icon is that returned by ScriptThumbnailService.getPlaceHolderResourcePath(String) If neither a MIME-specific icon nor a generic icon is available, null is returned.

Parameters:
thumbnailName - the thumbnail name
mimetype - the mimetype of the piece of content.
Returns:
String the place holder thumbnail resource path
See Also:
ScriptThumbnailService.getPlaceHolderResourcePath(String)


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