Hi.
I am trying to write an extension (in Scala). In my command I want to load a resource specified by the parameter to the command. e.g.
object MyCommand extends AbstractCommand {
override def execute(commandCall: CommandCall, evaluator: Evaluator, resultRecorder: ResultRecorder): Unit = {
val path = evaluator.evaluate(commandCall.getExpression).asInstanceOf[String]
val resource = commandCall.getResource.getRelativeResource(path)
...
What I want is to open an InputStream to the resource & fully load it. I can see that there is an interface called org.concordion.api.Source that seems to have exactly what I want, but I have no idea how to get hold of an instance of a Source.