org.alfresco.repo.rendition.executer
Class AbstractRenderingEngine.RenderingContext

java.lang.Object
  extended by org.alfresco.repo.rendition.executer.AbstractRenderingEngine.RenderingContext
Enclosing class:
AbstractRenderingEngine

protected class AbstractRenderingEngine.RenderingContext
extends java.lang.Object


Constructor Summary
AbstractRenderingEngine.RenderingContext(org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destinationNode, RenditionDefinition definition, org.alfresco.service.namespace.QName renditionContentProperty)
           
 
Method Summary
 java.lang.Object getCheckedParam(java.lang.String paramName, java.lang.Class clazz)
          Gets the value for the named parameter from the .
 RenditionDefinition getDefinition()
           
 org.alfresco.service.cmr.repository.NodeRef getDestinationNode()
           
 int getIntegerParam(java.lang.String key, int defaultValue)
           
 java.lang.Object getParamWithDefault(java.lang.String paramName, java.lang.Object defaultValue)
          Gets the value for the named parameter.
 org.alfresco.service.cmr.repository.NodeRef getSourceNode()
           
 org.alfresco.service.cmr.repository.ContentReader makeContentReader()
           
 org.alfresco.service.cmr.repository.ContentWriter makeContentWriter()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRenderingEngine.RenderingContext

public AbstractRenderingEngine.RenderingContext(org.alfresco.service.cmr.repository.NodeRef sourceNode,
                                                org.alfresco.service.cmr.repository.NodeRef destinationNode,
                                                RenditionDefinition definition,
                                                org.alfresco.service.namespace.QName renditionContentProperty)
Parameters:
sourceNode -
destinationNode -
definition -
renditionContentProperty -
Method Detail

getSourceNode

public org.alfresco.service.cmr.repository.NodeRef getSourceNode()
Returns:
the sourceNode

getDestinationNode

public org.alfresco.service.cmr.repository.NodeRef getDestinationNode()
Returns:
the destinationNode

getDefinition

public RenditionDefinition getDefinition()
Returns:
the definition

getCheckedParam

public java.lang.Object getCheckedParam(java.lang.String paramName,
                                        java.lang.Class clazz)
Gets the value for the named parameter from the . Checks the type of the parameter is correct and throws and Exception if it isn't. Returns null if the parameter value is null

Parameters:
paramName - the name of the parameter being checked.
clazz - the expected Class of the parameter value.
Returns:
the parameter value or null.

getParamWithDefault

public java.lang.Object getParamWithDefault(java.lang.String paramName,
                                            java.lang.Object defaultValue)
Gets the value for the named parameter. Checks the type of the parameter is the same as the type of defaultValue and throws a RenditionServiceException if it isn't. Returns defaultValue if the parameter value is null

Parameters:
paramName -
defaultValue -
Returns:

makeContentReader

public org.alfresco.service.cmr.repository.ContentReader makeContentReader()

makeContentWriter

public org.alfresco.service.cmr.repository.ContentWriter makeContentWriter()

getIntegerParam

public int getIntegerParam(java.lang.String key,
                           int defaultValue)


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