The request system by XML feed provided by VDoc internally uses the notion of controller. Visiativ Software offers this mechanism to perform treatments in authenticated mode.
The controllers run in a VDoc context. It is possible to recover, for example, information assigned to the connected user or any other information of the API objects.
To develop a controller, you just have to create a Java class which extends the basic class named com.axemble.vdoc.sdk.controllers.BaseController.
Each controller is called by the navigation framework on the both following methods:
In this example are presented the access to the process module (WorkflowModule) and the recovering of the connected user context.
public class SimpleController extends BaseController
{
public void parseRequest( IRequest request ) throws IOException
{}
public IExecutionContext doProcess( IExecutionContext ec ) throws IOException
{
// retrieve the logged on user context
IContext context = getWorkflowModule().getLoggedOnUserContext();
return super.doProcess( ec );
}
}To reach the SimpleController controller you just have to build the following URL :
/navigation/sdk?Controller=<package-name>.SimpleController