Class AbstractRenderingEngine.RenderingContext
java.lang.Object
org.alfresco.repo.rendition.executer.AbstractRenderingEngine.RenderingContext
- All Implemented Interfaces:
SerializedTransformationOptionsAccessor
- Enclosing class:
- AbstractRenderingEngine
protected class AbstractRenderingEngine.RenderingContext
extends Object
implements SerializedTransformationOptionsAccessor
-
Constructor Summary
ConstructorsConstructorDescriptionRenderingContext(NodeRef sourceNode, RenditionDefinition definition, QName renditionContentProperty) -
Method Summary
Modifier and TypeMethodDescription<T> TgetCheckedParam(String paramName, Class<T> clazz) Gets the value for the named parameter.Lazily instantiation of the ChildAssociationRefintgetIntegerParam(String key, int defaultValue) Gets the int value for the named parameter.<T> TgetParamWithDefault(String paramName, T defaultValue) Gets the value for the named parameter.
-
Constructor Details
-
RenderingContext
public RenderingContext(NodeRef sourceNode, RenditionDefinition definition, QName renditionContentProperty) - Parameters:
sourceNode- NodeRefdefinition- RenditionDefinitionrenditionContentProperty- QName
-
-
Method Details
-
getSourceNode
- Returns:
- the sourceNode
-
getChildAssociationRef
Lazily instantiation of the ChildAssociationRef- Returns:
- ChildAssociationRef
-
getDestinationNode
- Returns:
- the destinationNode
-
getDefinition
- Returns:
- the definition
-
getCheckedParam
Description copied from interface:SerializedTransformationOptionsAccessorGets the value for the named parameter. Checks the type of the parameter is correct and throws and Exception if it isn't. Returnsnullif the parameter value isnull- Specified by:
getCheckedParamin interfaceSerializedTransformationOptionsAccessor- Parameters:
paramName- the name of the parameter being checked.clazz- the expectedClassof the parameter value.- Returns:
- the parameter value or
null.
-
getParamWithDefault
Description copied from interface:SerializedTransformationOptionsAccessorGets the value for the named parameter. Checks the type of the parameter is the same as the type ofdefaultValueand throws aRenditionServiceExceptionif it isn't. ReturnsdefaultValueif the parameter value isnull- Specified by:
getParamWithDefaultin interfaceSerializedTransformationOptionsAccessor- Parameters:
paramName- String
-
makeContentReader
-
makeContentWriter
-
getIntegerParam
Description copied from interface:SerializedTransformationOptionsAccessorGets the int value for the named parameter. ReturnsdefaultValueif the parameter value isnull.- Specified by:
getIntegerParamin interfaceSerializedTransformationOptionsAccessor- Parameters:
key- StringdefaultValue- int- Returns:
- int
-