}
}
}
Map objectModel = env.getObjectModel();
ProcessingPipeline pipeline = context.getProcessingPipeline();
// Perform link translation if requested
if (objectModel.containsKey(Constants.LINK_OBJECT)) {
pipeline.addTransformer("<translator>", null, Parameters.EMPTY_PARAMETERS, Parameters.EMPTY_PARAMETERS);
}
if (objectModel.containsKey(Constants.LINK_COLLECTION_OBJECT) && env.isExternal()) {
pipeline.addTransformer("<gatherer>", null, Parameters.EMPTY_PARAMETERS, Parameters.EMPTY_PARAMETERS);
}
pipeline.setSerializer(
this.serializerName,
source.resolve(context, objectModel),
VariableResolver.buildParameters(this.parameters, context, objectModel),
this.pipelineHints == null
? Parameters.EMPTY_PARAMETERS
: VariableResolver.buildParameters(this.pipelineHints, context, objectModel),
this.mimeType.resolve(context, env.getObjectModel())
);
// Set status code if there is one
if (this.statusCode >= 0) {
env.setStatus(this.statusCode);
}
if (! context.isBuildingPipelineOnly()) {
// Process pipeline
return pipeline.process(env);
} else {
// Return true : pipeline is finished.
return true;
}