Class AbstractRenderingEngine

All Implemented Interfaces:
ActionExecuter, LoggingAwareExecuter, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware
Direct Known Subclasses:
AbstractTransformationRenderingEngine, BaseTemplateRenderingEngine, CompositeRenderingEngine

@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
  • Field Details

    • CONTENT_READER_NOT_FOUND_MESSAGE

      protected static final String CONTENT_READER_NOT_FOUND_MESSAGE
      Deprecated.
      See Also:
    • DEFAULT_RUN_AS_NAME

      protected static final String DEFAULT_RUN_AS_NAME
      Deprecated.
    • contentService

      protected ContentService contentService
      Deprecated.
    • mimetypeMap

      protected MimetypeMap mimetypeMap
      Deprecated.
    • actionTrackingService

      protected ActionTrackingService actionTrackingService
      Deprecated.
    • namespaceService

      protected NamespaceService namespaceService
      Deprecated.
    • PARAM_PLACEHOLDER_RESOURCE_PATH

      public static final String PARAM_PLACEHOLDER_RESOURCE_PATH
      Deprecated.
      This optional String parameter 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:
    • PARAM_SOURCE_CONTENT_PROPERTY

      public static final String PARAM_SOURCE_CONTENT_PROPERTY
      Deprecated.
      This optional QName parameter 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:
    • PARAM_TARGET_CONTENT_PROPERTY

      public static final String PARAM_TARGET_CONTENT_PROPERTY
      Deprecated.
      This optional QName parameter specifies which property the Rendering Engine uses to write content to the rendition node. By default the property used is cm:content.
      See Also:
    • PARAM_UPDATE_RENDITIONS_ON_ANY_PROPERTY_CHANGE

      public static final String PARAM_UPDATE_RENDITIONS_ON_ANY_PROPERTY_CHANGE
      Deprecated.
      This optional Boolean flag property specifies whether a rendition should be updated automatically if the source node changes. If set to true then the rendition will be re-rendered any time any property changes occur on the source node. This parameter defaults to false.
      See Also:
    • PARAM_RUN_AS

      public static final String PARAM_RUN_AS
      Deprecated.
      This optional String parameter specifies what user permissions are used when creating a rendition. By default the system user is used.
      See Also:
    • PARAM_MIME_TYPE

      public static final String PARAM_MIME_TYPE
      Deprecated.
      This optional String parameter specifies the mime type of the rendition content. This defaults to the mime type of the source node content.
      See Also:
    • PARAM_ENCODING

      public static final String PARAM_ENCODING
      Deprecated.
      This optional String paramter specifies the encoding used to create the rendition content. The derfault encoding is UTF-8.
      See Also:
    • nodeService

      protected NodeService nodeService
      Deprecated.
  • Constructor Details

    • AbstractRenderingEngine

      public AbstractRenderingEngine(NodeLocator temporaryParentNodeLocator, QName temporaryRenditionLinkType)
      Deprecated.
    • AbstractRenderingEngine

      public AbstractRenderingEngine()
      Deprecated.
  • Method Details

    • setNodeService

      public void setNodeService(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(NamespaceService namespaceService)
      Deprecated.
    • setDefaultRenditionNodeType

      public void setDefaultRenditionNodeType(String type)
      Deprecated.
      Sets the default rendition-node type.
      Parameters:
      type - String
    • getDefaultRenditionNodeType

      protected 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 String getTargetMimeType(AbstractRenderingEngine.RenderingContext context)
      Deprecated.
    • getTargetEncoding

      protected String getTargetEncoding(AbstractRenderingEngine.RenderingContext context)
      Deprecated.
    • setDefaultRenditionContentProp

      public void setDefaultRenditionContentProp(String prop)
      Deprecated.
      Sets the default rendition content property.
      Parameters:
      prop - String
    • getDefaultRenditionContentProp

      protected 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(MimetypeMap mimetypeMap)
      Deprecated.
    • setActionTrackingService

      public void setActionTrackingService(ActionTrackingService actionTrackingService)
      Deprecated.
    • createActionDefinition

      protected ActionDefinition createActionDefinition(String definitionName)
      Deprecated.
      Description copied from class: ActionExecuterAbstractBase
      This method returns an instance of an ActionDefinition implementation class. By default this will be an ActionDefinitionImpl, but this could be overridden.
      Overrides:
      createActionDefinition in class ActionExecuterAbstractBase
    • executeImpl

      protected void executeImpl(Action action, NodeRef sourceNode)
      Deprecated.
      Description copied from class: ActionExecuterAbstractBase
      Execute the action implementation
      Specified by:
      executeImpl in class ActionExecuterAbstractBase
      Parameters:
      action - the action
      sourceNode - the actioned upon node
    • executeImpl

      protected void executeImpl(RenditionDefinition renditionDef, NodeRef sourceNode)
      Deprecated.
    • executeRenditionImpl

      protected void executeRenditionImpl(Action action, 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 QName getRenditionContentProperty(RenditionDefinition renditionDefinition)
      Deprecated.
      Parameters:
      renditionDefinition - RenditionDefinition
      Returns:
      QName
    • render

      protected abstract void render(AbstractRenderingEngine.RenderingContext context)
      Deprecated.
    • checkSourceNodeExists

      protected void checkSourceNodeExists(NodeRef actionedUponNodeRef)
      Deprecated.
      Parameters:
      actionedUponNodeRef - NodeRef
    • checkActionIsRenditionDefinition

      protected RenditionDefinition checkActionIsRenditionDefinition(Action action)
      Deprecated.
      Parameters:
      action - Action
    • addParameterDefinitions

      protected final void addParameterDefinitions(List<ParameterDefinition> paramList)
      Deprecated.
      Description copied from class: ParameterizedItemAbstractBase
      Adds the parameter definitions to the list
      Specified by:
      addParameterDefinitions in class ParameterizedItemAbstractBase
      Parameters:
      paramList - the parameter definitions list
    • getParamDisplayLabel

      protected String getParamDisplayLabel(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:
      getParamDisplayLabel in class ParameterizedItemAbstractBase
      Parameters:
      paramName - the name of the parameter
      Returns:
      the display label of the parameter
    • getParameterDefinitions

      protected Collection<ParameterDefinition> getParameterDefinitions()
      Deprecated.
      Supplies the list of parameters required by this rendering engine.
    • getCheckedParam

      public static <T> T getCheckedParam(String paramName, Class<T> clazz, RenditionDefinition definition)
      Deprecated.
      Gets the value for the named parameter. Checks the type of the parameter is correct and throws a RenditionServiceException 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.
      definition - the RenditionDefinition containing the parameters.
      Returns:
      the parameter value or null.
    • getParamWithDefault

      public static <T> T getParamWithDefault(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 of defaultValue and throws a RenditionServiceException if it isn't. Returns defaultValue if the parameter value is null
      Type Parameters:
      T - T
      Parameters:
      paramName - String
      defaultValue - T
      definition - RenditionDefinition
      Returns:
      T
    • tagSourceNodeAsRenditioned

      protected void tagSourceNodeAsRenditioned(RenditionDefinition renditionDef, NodeRef actionedUponNodeRef)
      Deprecated.
    • switchToFinalRenditionNode

      protected void switchToFinalRenditionNode(RenditionDefinition renditionDef, NodeRef actionedUponNodeRef)
      Deprecated.
    • notifyCallbackOfException

      protected void notifyCallbackOfException(RenditionDefinition renditionDefinition, Throwable t)
      Deprecated.
    • throwWrappedException

      protected void throwWrappedException(Throwable t)
      Deprecated.
    • notifyCallbackOfResult

      protected void notifyCallbackOfResult(RenditionDefinition renditionDefinition, ChildAssociationRef result)
      Deprecated.
    • resolveRenditionLocation

      protected RenditionLocation resolveRenditionLocation(NodeRef sourceNode, RenditionDefinition definition, NodeRef tempRendition)
      Deprecated.
      Given a rendition definition, a source node and a temporary rendition node, this method uses a RenditionLocationResolver to calculate the RenditionLocation of the rendition.
    • getExecutionSummary

      protected ExecutionSummary getExecutionSummary(AbstractRenderingEngine.RenderingContext renderingContext)
      Deprecated.
      Gets the ExecutionSummary for the given renderingContext from the ActionTrackingService.

      Note that multiple summaries of the same action instance are not currently supported.

      Parameters:
      renderingContext - the rendering context
      Returns:
      the found summary or null