Some processors can be configured to fit the needs of the user. In case of a login processor the configuration could contain the information that the processor needs to connect to a remote LDAP server. This information could also be passed as an input parameter, but the configuration has some significant advantages:
Configurations are stored in the WebDAV-repository and can be edited with any client that is WebDAV aware.
When Projector loads the processor at startup time, the configuration gets passed and can be parsed by the processor. This is a big advantage in terms of performance as it might take some time to parse the configuration and should because of that not be done each time the processor get invoked.
Let’s have a look at a configurable processor that is one of the core processors of Projector: The template processor. The template processor is used to fill dynamic content into static documents like web pages, page fragments or XML documents.
The template processor gets configured with the template that is stored in the Slide server. When projector first starts up this template is parsed and precompiled so that the dynamic content can be filled in very fast. After parsing the template the processor knows which parameter it requires.
The only output that this processor delivers is the generated document. The only provided state is OK as the template evaluation will never fail. This is because the parameter description will assure that the processor will only be invoked if the necessary dynamic content is provided.