Class AbstractRenderingEngine
- java.lang.Object
-
- org.alfresco.repo.action.CommonResourceAbstractBase
-
- org.alfresco.repo.action.ParameterizedItemAbstractBase
-
- org.alfresco.repo.action.executer.ActionExecuterAbstractBase
-
- org.alfresco.repo.rendition.executer.AbstractRenderingEngine
-
- All Implemented Interfaces:
ActionExecuter,LoggingAwareExecuter,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware
- Direct Known Subclasses:
AbstractTransformationRenderingEngine,BaseTemplateRenderingEngine,CompositeRenderingEngine,HTMLRenderingEngine
@Deprecated public abstract class AbstractRenderingEngine extends ActionExecuterAbstractBase
Deprecated.The RenditionService is being replace by the simpler async RenditionService2.This class adds some new behaviour to the standard ActionExecuterAbstractBase in order to support the RenditionService.- Since:
- 3.3
- Author:
- Neil McErlean, Nick Smith
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classAbstractRenderingEngine.RenderingContextDeprecated.
-
Field Summary
Fields Modifier and Type Field Description protected ActionTrackingServiceactionTrackingServiceDeprecated.protected static java.lang.StringCONTENT_READER_NOT_FOUND_MESSAGEDeprecated.protected ContentServicecontentServiceDeprecated.protected static java.lang.StringDEFAULT_RUN_AS_NAMEDeprecated.protected org.alfresco.repo.content.MimetypeMapmimetypeMapDeprecated.protected org.alfresco.service.namespace.NamespaceServicenamespaceServiceDeprecated.protected org.alfresco.service.cmr.repository.NodeServicenodeServiceDeprecated.static java.lang.StringPARAM_ENCODINGDeprecated.This optionalStringparamter specifies the encoding used to create the rendition content.static java.lang.StringPARAM_MIME_TYPEDeprecated.This optionalStringparameter specifies the mime type of the rendition content.static java.lang.StringPARAM_PLACEHOLDER_RESOURCE_PATHDeprecated.This optionalStringparameter specifies the location of a classpath resource which can be used as a placeholder while a rendition is being generated.static java.lang.StringPARAM_RUN_ASDeprecated.This optionalStringparameter specifies what user permissions are used when creating a rendition.static java.lang.StringPARAM_SOURCE_CONTENT_PROPERTYDeprecated.This optionalQNameparameter specifies which property the Rendering Engine uses to read content from the source node in order to create a rendition.static java.lang.StringPARAM_TARGET_CONTENT_PROPERTYDeprecated.This optionalQNameparameter specifies which property the Rendering Engine uses to write content to the rendition node.static java.lang.StringPARAM_UPDATE_RENDITIONS_ON_ANY_PROPERTY_CHANGEDeprecated.This optionalBooleanflag property specifies whether a rendition should be updated automatically if the source node changes.-
Fields inherited from class org.alfresco.repo.action.executer.ActionExecuterAbstractBase
actionDefinition, applicableTypes, publicAction
-
Fields inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
adhocPropertiesAllowed, DISPLAY_LABEL, runtimeActionService
-
Fields inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
name
-
Fields inherited from interface org.alfresco.repo.action.executer.ActionExecuter
PARAM_RESULT
-
-
Constructor Summary
Constructors Constructor Description AbstractRenderingEngine()Deprecated.AbstractRenderingEngine(NodeLocator temporaryParentNodeLocator, org.alfresco.service.namespace.QName temporaryRenditionLinkType)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidaddParameterDefinitions(java.util.List<ParameterDefinition> paramList)Deprecated.Adds the parameter definitions to the listprotected RenditionDefinitioncheckActionIsRenditionDefinition(Action action)Deprecated.protected voidcheckParameterValues(Action action)Deprecated.This method can be overridden by subclasses to provide checking of parameter values.protected voidcheckSourceNodeExists(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)Deprecated.protected ActionDefinitioncreateActionDefinition(java.lang.String definitionName)Deprecated.This method returns an instance of an ActionDefinition implementation class.protected voidexecuteImpl(Action action, org.alfresco.service.cmr.repository.NodeRef sourceNode)Deprecated.Execute the action implementationprotected voidexecuteImpl(RenditionDefinition renditionDef, org.alfresco.service.cmr.repository.NodeRef sourceNode)Deprecated.protected voidexecuteRenditionImpl(Action action, org.alfresco.service.cmr.repository.NodeRef sourceNode)Deprecated.static <T> TgetCheckedParam(java.lang.String paramName, java.lang.Class<T> clazz, RenditionDefinition definition)Deprecated.Gets the value for the named parameter.protected org.alfresco.service.namespace.QNamegetDefaultRenditionContentProp()Deprecated.This method returns the QName of the property that defines the location of the rendition content.protected org.alfresco.service.namespace.QNamegetDefaultRenditionNodeType()Deprecated.This method returns the type of the default rendition node type.protected ExecutionSummarygetExecutionSummary(AbstractRenderingEngine.RenderingContext renderingContext)Deprecated.protected java.lang.StringgetParamDisplayLabel(java.lang.String paramName)Deprecated.This method gets the parameter definition display label from the properties file.protected java.util.Collection<ParameterDefinition>getParameterDefinitions()Deprecated.Supplies the list of parameters required by this rendering engine.static <T> TgetParamWithDefault(java.lang.String paramName, T defaultValue, RenditionDefinition definition)Deprecated.Gets the value for the named parameter.protected org.alfresco.service.namespace.QNamegetRenditionContentProperty(RenditionDefinition renditionDefinition)Deprecated.protected java.lang.StringgetTargetEncoding(AbstractRenderingEngine.RenderingContext context)Deprecated.protected java.lang.StringgetTargetMimeType(AbstractRenderingEngine.RenderingContext context)Deprecated.protected voidnotifyCallbackOfException(RenditionDefinition renditionDefinition, java.lang.Throwable t)Deprecated.protected voidnotifyCallbackOfResult(RenditionDefinition renditionDefinition, org.alfresco.service.cmr.repository.ChildAssociationRef result)Deprecated.protected abstract voidrender(AbstractRenderingEngine.RenderingContext context)Deprecated.protected RenditionLocationresolveRenditionLocation(org.alfresco.service.cmr.repository.NodeRef sourceNode, RenditionDefinition definition, org.alfresco.service.cmr.repository.NodeRef tempRendition)Deprecated.Given a rendition definition, a source node and a temporary rendition node, this method uses aRenditionLocationResolverto calculate theRenditionLocationof the rendition.voidsetActionTrackingService(ActionTrackingService actionTrackingService)Deprecated.voidsetBehaviourFilter(BehaviourFilter behaviourFilter)Deprecated.voidsetContentService(ContentService contentService)Deprecated.Set the content servicevoidsetDefaultRenditionContentProp(java.lang.String prop)Deprecated.Sets the default rendition content property.voidsetDefaultRenditionNodeType(java.lang.String type)Deprecated.Sets the default rendition-node type.voidsetMimetypeMap(org.alfresco.repo.content.MimetypeMap mimetypeMap)Deprecated.voidsetNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)Deprecated.voidsetNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)Deprecated.Injects the nodeService bean.voidsetRenditionLocationResolver(RenditionLocationResolver renditionLocationResolver)Deprecated.voidsetRenditionService(RenditionService renditionService)Deprecated.Injects the renditionService bean.protected voidswitchToFinalRenditionNode(RenditionDefinition renditionDef, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)Deprecated.protected voidtagSourceNodeAsRenditioned(RenditionDefinition renditionDef, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)Deprecated.protected voidthrowWrappedException(java.lang.Throwable t)Deprecated.-
Methods inherited from class org.alfresco.repo.action.executer.ActionExecuterAbstractBase
execute, getActionDefinition, getIgnoreLock, getQueueName, getTrackStatus, init, isApplicableType, onLogException, setApplicableTypes, setBaseNodeService, setDictionaryService, setIgnoreLock, setLockService, setMlAwareNodeService, setPublicAction, setQueueName, setTrackStatus
-
Methods inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
checkMandatoryProperties, getAdhocPropertiesAllowed, getDescriptionKey, getLocalizedParameterDefinitions, getParamDisplayLabel, getParameterDefintions, getTitleKey, setAdhocPropertiesAllowed, setLocales, setRuntimeActionService, toString
-
Methods inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
setBeanName
-
-
-
-
Field Detail
-
CONTENT_READER_NOT_FOUND_MESSAGE
protected static final java.lang.String CONTENT_READER_NOT_FOUND_MESSAGE
Deprecated.- See Also:
- Constant Field Values
-
DEFAULT_RUN_AS_NAME
protected static final java.lang.String DEFAULT_RUN_AS_NAME
Deprecated.
-
contentService
protected ContentService contentService
Deprecated.
-
mimetypeMap
protected org.alfresco.repo.content.MimetypeMap mimetypeMap
Deprecated.
-
actionTrackingService
protected ActionTrackingService actionTrackingService
Deprecated.
-
namespaceService
protected org.alfresco.service.namespace.NamespaceService namespaceService
Deprecated.
-
PARAM_PLACEHOLDER_RESOURCE_PATH
public static final java.lang.String PARAM_PLACEHOLDER_RESOURCE_PATH
Deprecated.This optionalStringparameter specifies the location of a classpath resource which can be used as a placeholder while a rendition is being generated. For example, this might be a simple icon to indicate a rendition is not yet available. This is intended to be used in conjunction with asynchronous generation of renditions.- See Also:
- Constant Field Values
-
PARAM_SOURCE_CONTENT_PROPERTY
public static final java.lang.String PARAM_SOURCE_CONTENT_PROPERTY
Deprecated.This optionalQNameparameter specifies which property the Rendering Engine uses to read content from the source node in order to create a rendition. By default this property will be cm:content.- See Also:
- Constant Field Values
-
PARAM_TARGET_CONTENT_PROPERTY
public static final java.lang.String PARAM_TARGET_CONTENT_PROPERTY
Deprecated.This optionalQNameparameter specifies which property the Rendering Engine uses to write content to the rendition node. By default the property used is cm:content.- See Also:
- Constant Field Values
-
PARAM_UPDATE_RENDITIONS_ON_ANY_PROPERTY_CHANGE
public static final java.lang.String PARAM_UPDATE_RENDITIONS_ON_ANY_PROPERTY_CHANGE
Deprecated.This optionalBooleanflag property specifies whether a rendition should be updated automatically if the source node changes. If set totruethen the rendition will be re-rendered any time any property changes occur on the source node. This parameter defaults tofalse.- See Also:
- Constant Field Values
-
PARAM_RUN_AS
public static final java.lang.String PARAM_RUN_AS
Deprecated.This optionalStringparameter specifies what user permissions are used when creating a rendition. By default the system user is used.- See Also:
- Constant Field Values
-
PARAM_MIME_TYPE
public static final java.lang.String PARAM_MIME_TYPE
Deprecated.This optionalStringparameter specifies the mime type of the rendition content. This defaults to the mime type of the source node content.- See Also:
- Constant Field Values
-
PARAM_ENCODING
public static final java.lang.String PARAM_ENCODING
Deprecated.This optionalStringparamter specifies the encoding used to create the rendition content. The derfault encoding is UTF-8.- See Also:
- Constant Field Values
-
nodeService
protected org.alfresco.service.cmr.repository.NodeService nodeService
Deprecated.
-
-
Constructor Detail
-
AbstractRenderingEngine
public AbstractRenderingEngine(NodeLocator temporaryParentNodeLocator, org.alfresco.service.namespace.QName temporaryRenditionLinkType)
Deprecated.
-
AbstractRenderingEngine
public AbstractRenderingEngine()
Deprecated.
-
-
Method Detail
-
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Deprecated.Injects the nodeService bean.- Parameters:
nodeService- the nodeService.
-
setRenditionService
public void setRenditionService(RenditionService renditionService)
Deprecated.Injects the renditionService bean.- Parameters:
renditionService- RenditionService
-
setBehaviourFilter
public void setBehaviourFilter(BehaviourFilter behaviourFilter)
Deprecated.- Parameters:
behaviourFilter- policy behaviour filter
-
setRenditionLocationResolver
public void setRenditionLocationResolver(RenditionLocationResolver renditionLocationResolver)
Deprecated.
-
setNamespaceService
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
Deprecated.
-
setDefaultRenditionNodeType
public void setDefaultRenditionNodeType(java.lang.String type)
Deprecated.Sets the default rendition-node type.- Parameters:
type- String
-
getDefaultRenditionNodeType
protected org.alfresco.service.namespace.QName getDefaultRenditionNodeType()
Deprecated.This method returns the type of the default rendition node type.- Returns:
- the QName representing the type of the default rendition node type.
-
getTargetMimeType
protected java.lang.String getTargetMimeType(AbstractRenderingEngine.RenderingContext context)
Deprecated.
-
getTargetEncoding
protected java.lang.String getTargetEncoding(AbstractRenderingEngine.RenderingContext context)
Deprecated.
-
setDefaultRenditionContentProp
public void setDefaultRenditionContentProp(java.lang.String prop)
Deprecated.Sets the default rendition content property.- Parameters:
prop- String
-
getDefaultRenditionContentProp
protected org.alfresco.service.namespace.QName getDefaultRenditionContentProp()
Deprecated.This method returns the QName of the property that defines the location of the rendition content. An example would be cm:content.- Returns:
- the QName the property defining the location of the rendition content.
-
setContentService
public void setContentService(ContentService contentService)
Deprecated.Set the content service- Parameters:
contentService- the content service
-
setMimetypeMap
public void setMimetypeMap(org.alfresco.repo.content.MimetypeMap mimetypeMap)
Deprecated.
-
setActionTrackingService
public void setActionTrackingService(ActionTrackingService actionTrackingService)
Deprecated.
-
createActionDefinition
protected ActionDefinition createActionDefinition(java.lang.String definitionName)
Deprecated.Description copied from class:ActionExecuterAbstractBaseThis method returns an instance of an ActionDefinition implementation class. By default this will be anActionDefinitionImpl, but this could be overridden.- Overrides:
createActionDefinitionin classActionExecuterAbstractBase
-
executeImpl
protected void executeImpl(Action action, org.alfresco.service.cmr.repository.NodeRef sourceNode)
Deprecated.Description copied from class:ActionExecuterAbstractBaseExecute the action implementation- Specified by:
executeImplin classActionExecuterAbstractBase- Parameters:
action- the actionsourceNode- the actioned upon node
-
executeImpl
protected void executeImpl(RenditionDefinition renditionDef, org.alfresco.service.cmr.repository.NodeRef sourceNode)
Deprecated.
-
executeRenditionImpl
protected void executeRenditionImpl(Action action, org.alfresco.service.cmr.repository.NodeRef sourceNode)
Deprecated.
-
checkParameterValues
protected void checkParameterValues(Action action)
Deprecated.This method can be overridden by subclasses to provide checking of parameter values. If a parameter value is illegal or inappropriate, an exception should be thrown.
-
getRenditionContentProperty
protected org.alfresco.service.namespace.QName getRenditionContentProperty(RenditionDefinition renditionDefinition)
Deprecated.- Parameters:
renditionDefinition- RenditionDefinition- Returns:
- QName
-
render
protected abstract void render(AbstractRenderingEngine.RenderingContext context)
Deprecated.
-
checkSourceNodeExists
protected void checkSourceNodeExists(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
Deprecated.- Parameters:
actionedUponNodeRef- NodeRef
-
checkActionIsRenditionDefinition
protected RenditionDefinition checkActionIsRenditionDefinition(Action action)
Deprecated.- Parameters:
action- Action
-
addParameterDefinitions
protected final void addParameterDefinitions(java.util.List<ParameterDefinition> paramList)
Deprecated.Description copied from class:ParameterizedItemAbstractBaseAdds the parameter definitions to the list- Specified by:
addParameterDefinitionsin classParameterizedItemAbstractBase- Parameters:
paramList- the parameter definitions list
-
getParamDisplayLabel
protected java.lang.String getParamDisplayLabel(java.lang.String paramName)
Deprecated.This method gets the parameter definition display label from the properties file. It looks first for a property whose key has a fixed rendition service-specific prefix and if that gets null, it then delegates to the standard bean name-based approach.- Overrides:
getParamDisplayLabelin classParameterizedItemAbstractBase- Parameters:
paramName- the name of the parameter- Returns:
- the display label of the parameter
-
getParameterDefinitions
protected java.util.Collection<ParameterDefinition> getParameterDefinitions()
Deprecated.Supplies the list of parameters required by this rendering engine.
-
getCheckedParam
public static <T> T getCheckedParam(java.lang.String paramName, java.lang.Class<T> clazz, RenditionDefinition definition)Deprecated.Gets the value for the named parameter. Checks the type of the parameter is correct and throws aRenditionServiceExceptionif it isn't. Returnsnullif the parameter value isnull- Parameters:
paramName- the name of the parameter being checked.clazz- the expectedClassof the parameter value.definition- theRenditionDefinitioncontaining the parameters.- Returns:
- the parameter value or
null.
-
getParamWithDefault
public static <T> T getParamWithDefault(java.lang.String paramName, T defaultValue, RenditionDefinition definition)Deprecated.Gets 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- Type Parameters:
T- T- Parameters:
paramName- StringdefaultValue- Tdefinition- RenditionDefinition- Returns:
- T
-
tagSourceNodeAsRenditioned
protected void tagSourceNodeAsRenditioned(RenditionDefinition renditionDef, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
Deprecated.
-
switchToFinalRenditionNode
protected void switchToFinalRenditionNode(RenditionDefinition renditionDef, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
Deprecated.
-
notifyCallbackOfException
protected void notifyCallbackOfException(RenditionDefinition renditionDefinition, java.lang.Throwable t)
Deprecated.
-
throwWrappedException
protected void throwWrappedException(java.lang.Throwable t)
Deprecated.
-
notifyCallbackOfResult
protected void notifyCallbackOfResult(RenditionDefinition renditionDefinition, org.alfresco.service.cmr.repository.ChildAssociationRef result)
Deprecated.
-
resolveRenditionLocation
protected RenditionLocation resolveRenditionLocation(org.alfresco.service.cmr.repository.NodeRef sourceNode, RenditionDefinition definition, org.alfresco.service.cmr.repository.NodeRef tempRendition)
Deprecated.Given a rendition definition, a source node and a temporary rendition node, this method uses aRenditionLocationResolverto calculate theRenditionLocationof the rendition.
-
getExecutionSummary
protected ExecutionSummary getExecutionSummary(AbstractRenderingEngine.RenderingContext renderingContext)
Deprecated.Gets theExecutionSummaryfor the givenrenderingContextfrom theActionTrackingService.Note that multiple summaries of the same action instance are not currently supported.
- Parameters:
renderingContext- the rendering context- Returns:
- the found summary or null
-
-