The code below is a pseudo code for the Document Generator, which incorporates some of the tips and recommendations from the Document Generator Plugin Overview topic.
Use the pseudo code below as a starting point for a Document Generator Plugin:
DocumentGeneratorPseudoCode
package com.oracle.determinations.interview.engine.userplugins;
import java.io.IOException;
import com.oracle.determinations.interview.engine.InterviewSession;
import com.oracle.determinations.interview.engine.plugins.InterviewSessionPlugin;
import com.oracle.determinations.interview.engine.plugins.InterviewSessionRegisterArgs;
import com.oracle.determinations.interview.engine.plugins.docgen.DocumentGenerationParameters;
import com.oracle.determinations.interview.engine.plugins.docgen.DocumentGeneratorPlugin;
import com.oracle.determinations.interview.util.TypedInputStream;
public class PseudoDocumentGenerator implements DocumentGeneratorPlugin {
//REQUIRED - for DocumentGeneratorPlugin interface
public TypedInputStream generateDocument(InterviewSession session,|
DocumentGenerationParameters parameters) throws IOException {
//Access interview session data from Interview Session
//Construct document
//Return Document as TypedInputStream
return null;
}
//REQUIRED - for DocumentGeneratorPlugin interface
public String getDocumentType() {
return "<Document Type, in CAPITAL";
}
//REQUIRED - for Plugin architecture
public PseudoDocumentGenerator()
{
}
//REQUIRED - by InterviewSessionPlugin interface
public InterviewSessionPlugin getInstance(InterviewSessionRegisterArgs args) {
return new PseudoDocumentGenerator();
}
}