iPAM Developer Documentation

- Developing a Wizard

iPAM wizards are relatively new in the development of iPAM. As of iPAM 2.2 there is only one existing wizard, the startup wizard. However, that wizard was developed with an eye on more extensive development of wizards. In the future iPAM "plugins" will be able to specify their own wizards, appropriate for the functions that plugin has to offer.

Sample Wizard

The code "template" below was derived from org.mitre.pam.wizard.StartWizard. See the source for that wizard to better understand how to write one. Subclass from org.mitre.pam.wizard.WizardBase1 and implement the two methods, buildScriptBody() and implementWizardResults().

A "Sample" Wizard

package MyPackage;
            
import org.mitre.pam.interfaces.ExecToController;
imporg org.mitre.pam.wizard.WizardBase1;
            
public class MyWizard extends WizardBase1
{
	public MyWizard()
	{
		super("An 11 step wizard"); // wizard name
	}
            
	
	
	private DisplayText intro;
	private EnterTextLine id;            
	private DisplayText finale2;
		
	protected WizardFrame[] buildScriptBody(ExecToController exec) {
            
		intro = new DisplayText("This wizard will help you get going.");
		id = new EnterTextLine("Enter an informational id or name for this task.", "unnamed");
            
	/* ... more code here */
            
		finale2 = new DisplayText("Save this configuration by pressing Finish below"
								);
            
		WizardFrame[] script = new WizardFrame[11];
		script[0] = intro;
		script[1] = id;
            
	/* ... more code here */
            
		script[10] = finale2;
		
		return script;
	}
		
	protected void implementWizardResults(ExecToController exec) {
		/*
		* This method is called when the wizard session is complete.
		* Place code here to determine the values entered in
		* the various wizard panes above (scuh as intro, id, and finale2)
		* and then make calls into the exec as appropriate
		* to set things up.
		*/
	}
            
}
            

 

  Revised: 1 June 1999