protected class AbstractRenderingEngine.RenderingContext extends Object implements SerializedTransformationOptionsAccessor
Constructor and Description |
---|
RenderingContext(org.alfresco.service.cmr.repository.NodeRef sourceNode,
RenditionDefinition definition,
org.alfresco.service.namespace.QName renditionContentProperty) |
Modifier and Type | Method and Description |
---|---|
<T> T |
getCheckedParam(String paramName,
Class<T> clazz)
Gets the value for the named parameter.
|
org.alfresco.service.cmr.repository.ChildAssociationRef |
getChildAssociationRef()
Lazily instantiation of the ChildAssociationRef
|
RenditionDefinition |
getDefinition() |
org.alfresco.service.cmr.repository.NodeRef |
getDestinationNode() |
int |
getIntegerParam(String key,
int defaultValue)
Gets the int value for the named parameter.
|
<T> T |
getParamWithDefault(String paramName,
T 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() |
public RenderingContext(org.alfresco.service.cmr.repository.NodeRef sourceNode, RenditionDefinition definition, org.alfresco.service.namespace.QName renditionContentProperty)
sourceNode
- NodeRefdefinition
- RenditionDefinitionrenditionContentProperty
- QNamepublic org.alfresco.service.cmr.repository.NodeRef getSourceNode()
public org.alfresco.service.cmr.repository.ChildAssociationRef getChildAssociationRef()
public org.alfresco.service.cmr.repository.NodeRef getDestinationNode()
public RenditionDefinition getDefinition()
public <T> T getCheckedParam(String paramName, Class<T> clazz)
SerializedTransformationOptionsAccessor
null
if the parameter value is null
getCheckedParam
in interface SerializedTransformationOptionsAccessor
paramName
- the name of the parameter being checked.clazz
- the expected Class
of the parameter value.null
.public <T> T getParamWithDefault(String paramName, T defaultValue)
SerializedTransformationOptionsAccessor
defaultValue
and
throws a RenditionServiceException
if it isn't. Returns
defaultValue
if the parameter value is null
getParamWithDefault
in interface SerializedTransformationOptionsAccessor
paramName
- Stringpublic org.alfresco.service.cmr.repository.ContentReader makeContentReader()
public org.alfresco.service.cmr.repository.ContentWriter makeContentWriter()
public int getIntegerParam(String key, int defaultValue)
SerializedTransformationOptionsAccessor
defaultValue
if the parameter value is null
.getIntegerParam
in interface SerializedTransformationOptionsAccessor
key
- StringdefaultValue
- intCopyright © 2005–2017 Alfresco Software. All rights reserved.