public abstract class AbstractProcessor extends Object implements Processor
| Modifier and Type | Field and Description |
|---|---|
protected ProcessorModelHelper |
processorModelHelper
A
ProcessorModelHelper is required to populate the model. |
| Constructor and Description |
|---|
AbstractProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(ProcessorContext processorContext,
ModelObject object,
RenderFocus focus)
Executes the given focus of the processor output using the
given processor context
|
abstract void |
executeBody(ProcessorContext processorContext,
ModelObject object)
Executes the "body" of the processor output using the given
processor context.
|
void |
executeHeader(ProcessorContext processorContext,
ModelObject object)
Executes the "header" of the processor output using the given
processor context.
|
protected String |
getProperty(ProcessorContext processorContext,
String propertyName)
Returns a configuration property from the rendering
processor descriptor.
|
protected ProcessorContext.ProcessorDescriptor |
getRenderingDescriptor(ProcessorContext processorContext)
Helper method which returns the appropriate processor descriptor
from the given processor descriptor for the current render mode.
|
void |
setProcessorModelHelper(ProcessorModelHelper processorModelHelper) |
protected ProcessorModelHelper processorModelHelper
A ProcessorModelHelper is required to populate the model. It is supplied by the Spring Framework
providing that this bean is correctly configured.
public void setProcessorModelHelper(ProcessorModelHelper processorModelHelper)
public void execute(ProcessorContext processorContext, ModelObject object, RenderFocus focus) throws RendererExecutionException
Processorexecute in interface ProcessorprocessorContext - ProcessorContextobject - ModelObjectfocus - RenderFocusRendererExecutionExceptionpublic void executeHeader(ProcessorContext processorContext, ModelObject object) throws RendererExecutionException
ProcessorexecuteHeader in interface ProcessorprocessorContext - processorContextRendererExecutionExceptionpublic abstract void executeBody(ProcessorContext processorContext, ModelObject object) throws RendererExecutionException
ProcessorexecuteBody in interface ProcessorprocessorContext - processorContextRendererExecutionExceptionprotected ProcessorContext.ProcessorDescriptor getRenderingDescriptor(ProcessorContext processorContext)
Helper method which returns the appropriate processor descriptor from the given processor descriptor for the current render mode.
For example, if the current render mode is "view", then this will return the processor descriptor for the processor to be used during "view" processing. This descriptor contains all of the relevant metadata for the processor about how to proceed.
If the render mode is not "view" and a ProcessDescriptor cannot be found then the ProcessDescriptor for the "view" render mode will be returned (if available)
processorContext - ProcessorContextprotected String getProperty(ProcessorContext processorContext, String propertyName)
processorContext - ProcessorContextpropertyName - StringCopyright © 2005–2016 Alfresco Software. All rights reserved.