Wizard Model

org.eclipse.atf.templates.wizardModel

1.0

Used to define the data model and presentation of a new AJAX application wizard. NOTE: The schema defined below is not enforced. It is provided below to give guidelines on how to use the existing personality building functions of the AJAX Toolkit Framework. However, because of the fact that users can contribute new variable types, variable renderer types, and operation types, we cannot, at this time, enforce a schema.

<!ELEMENT extension (model+)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT model (variables , pages , finish)>

<!ATTLIST model

targetWizard CDATA #REQUIRED

title        CDATA #REQUIRED>

Specifies how the data inputs for the wizard will be organized and presented.



<!ELEMENT variables (variable+)>

Children define the variables or inputs that are needed in order to perform the wizard operation(s).



<!ELEMENT variable (projectFilter*)>

<!ATTLIST variable

value           CDATA #IMPLIED

name            CDATA #REQUIRED

defaultSelected (true | false)

type            CDATA #REQUIRED

required        (true | false)

to              CDATA #IMPLIED

displayName     CDATA #REQUIRED

defaultValue    CDATA #IMPLIED

options         CDATA #IMPLIED>

Specifies an input which is needed by the wizard. This variable can be referenced by the variableRef element when describing the makeup of the wizard pages.



<!ELEMENT pages (page+)>

Children define the list of wizard pages.



<!ELEMENT page (validator? , description , variableRef+)>

<!ATTLIST page

name  CDATA #REQUIRED

title CDATA #REQUIRED>

Defines a new wizard page.



<!ELEMENT description (#PCDATA)>

A description of the wizard page.



<!ELEMENT validator (#PCDATA)>

An optional validator to be run on the page at runtime to make sure all necessary values have been provided.



<!ELEMENT variableRef EMPTY>

<!ATTLIST variableRef

name CDATA #REQUIRED>

A reference to a previously defined "variable" element. Used to specify inputs in wizard pages.



<!ELEMENT finish (operation+)>

Children define the operations to execute on wizard finish.



<!ELEMENT operation (template?)>

<!ATTLIST operation

location CDATA #IMPLIED

name     CDATA #IMPLIED

type     CDATA #REQUIRED

project  CDATA #IMPLIED>

An operation that will be peformed on wizard finish.



<!ELEMENT projectFilter EMPTY>

<!ATTLIST projectFilter

class CDATA #REQUIRED>

(Currently only used in conjunction with the "Project" variable type) A filter to apply when displaying all possible project choices for a "Project" variable.



<!ELEMENT template EMPTY>

<!ATTLIST template

path CDATA #REQUIRED>

A file template used in creating a new file.



Example of creating a "New DoJo Application" wizard using the wizardModel extension point.

<extension point=

"org.eclipse.atf.templates.wizardModel"

>

<model targetWizard=

"org.eclipse.atf.personality.dojo.ui.wizard.DojoApplicationWizard"

title=

"Dojo Application"

>

<variables>

<variable displayName=

"Project"

name=

"project"

defaultSelected=

"true"

type=

"Project"

required=

"true"

>

<projectFilter class=

"org.eclipse.atf.templates.variable.util.SimpleNameFilter"

>

</projectFilter>

<projectFilter class=

"org.eclipse.atf.personality.dojo.ui.wizard.DojoProjectNatureFilter"

>

</projectFilter>

</variable>

<variable displayName=

"Name"

name=

"appName"

type=

"String"

required=

"true"

>

</variable>

<variable defaultValue=

"WebContent/${appName}"

displayName=

"Location"

name=

"appRoot"

type=

"String"

required=

"true"

>

</variable>

<variable displayName=

"AJAX Artifacts Root"

name=

"ajaxRoot"

type=

"RelativePath"

required=

"true"

to=

"WebContent/dojoAjax"

>

</variable>

<variable defaultValue=

"Application Title"

displayName=

"Title"

name=

"title"

type=

"String"

required=

"false"

>

</variable>

<variable defaultValue=

"true"

displayName=

"Debug"

name=

"debug"

type=

"Boolean"

required=

"false"

>

</variable>

</variables>

<pages>

<page name=

"Page 1"

title=

"Name and Location"

>

<description>

Specify name and location of Dojo application.

</description>

<variableRef name=

"appName"

>

</variableRef>

<variableRef name=

"appRoot"

>

</variableRef>

<variableRef name=

"project"

>

</variableRef>

<variableRef name=

"ajaxRoot"

>

</variableRef>

</page>

<page name=

"Page 2"

title=

"Other settings"

>

<description>

Other application settings.

</description>

<variableRef name=

"title"

>

</variableRef>

<variableRef name=

"debug"

>

</variableRef>

</page>

</pages>

<finish>

<operation location=

"${appRoot}"

name=

"${appName}.html"

type=

"CreateFile"

project=

"${project}"

>

<template path=

"/template/file/${appName}.html.template"

>

</template>

</operation>

</finish>

</model>

</extension>

When implementing a projectFilter, the implementation class must implement the org.eclipse.atf.templates.variable.util.IProjectFilter interface.

The current AJAX Toolkit Framework provides contributions to this extension point in the form of application wizards for the Zimbra, DoJo, and Rico AJAX personalities. These contributions are defined in the org.eclipse.atf.personality.zimbra.ui, org.eclipse.atf.personality.dojo.ui and org.eclipse.atf.personality.rico.ui plugins respectively.