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 java.lang.Object implements SerializedTransformationOptionsAccessor
-
-
Constructor Summary
Constructors Constructor Description RenderingContext(org.alfresco.service.cmr.repository.NodeRef sourceNode, RenditionDefinition definition, org.alfresco.service.namespace.QName renditionContentProperty)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> TgetCheckedParam(java.lang.String paramName, java.lang.Class<T> clazz)Gets the value for the named parameter.org.alfresco.service.cmr.repository.ChildAssociationRefgetChildAssociationRef()Lazily instantiation of the ChildAssociationRefRenditionDefinitiongetDefinition()org.alfresco.service.cmr.repository.NodeRefgetDestinationNode()intgetIntegerParam(java.lang.String key, int defaultValue)Gets the int value for the named parameter.<T> TgetParamWithDefault(java.lang.String paramName, T defaultValue)Gets the value for the named parameter.org.alfresco.service.cmr.repository.NodeRefgetSourceNode()org.alfresco.service.cmr.repository.ContentReadermakeContentReader()org.alfresco.service.cmr.repository.ContentWritermakeContentWriter()
-
-
-
Constructor Detail
-
RenderingContext
public RenderingContext(org.alfresco.service.cmr.repository.NodeRef sourceNode, RenditionDefinition definition, org.alfresco.service.namespace.QName renditionContentProperty)- Parameters:
sourceNode- NodeRefdefinition- RenditionDefinitionrenditionContentProperty- QName
-
-
Method Detail
-
getSourceNode
public org.alfresco.service.cmr.repository.NodeRef getSourceNode()
- Returns:
- the sourceNode
-
getChildAssociationRef
public org.alfresco.service.cmr.repository.ChildAssociationRef getChildAssociationRef()
Lazily instantiation of the ChildAssociationRef- Returns:
- ChildAssociationRef
-
getDestinationNode
public org.alfresco.service.cmr.repository.NodeRef getDestinationNode()
- Returns:
- the destinationNode
-
getDefinition
public RenditionDefinition getDefinition()
- Returns:
- the definition
-
getCheckedParam
public <T> T getCheckedParam(java.lang.String paramName, java.lang.Class<T> clazz)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
public <T> T getParamWithDefault(java.lang.String paramName, T defaultValue)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
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)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
-
-