class %ZEN.Template.AddInWizard.XMLSchemaWizard
extends %ZEN.Template.AddInWizard.Template
Studio Template.
The XML Schema Wizard reads an XML schema and creates a set of corresponding classes.
This is a Zen Page class.
parameter HELPID = "GXML_schema_wizard_ui";
DOCBOOK Topic Id that offers help for this template.
parameter PAGETITLE = "XML Schema Wizard";
Display title of this page
parameter TEMPLATEDESCRIPTION = "Creates class definitions from an XML Schema file.";
Short description of the template to show in Studio.
If DOMAIN is defined this will be localized.
parameter TEMPLATENAME = "XML Schema Wizard";
Name of the template to show in Studio.
If DOMAIN is defined this will be localized.
parameter TEMPLATETITLE = "XML Schema Wizard";
Title of the template to show in the template window.
parameter TEMPLATETYPE = "cls";
Comma separated list of 'CSP', 'CSR', 'MAC', 'INT', 'INC',
'BAS', 'CLS' to say what type of code this template
generates; CSP, CSR, Routine, or Class code.
You can also specify '*' for all types.
method %OnAfterCreatePage()
as %Status
Load the recent list. Set last file type so that onstartHandler can hide/show fields appropriately.
classmethod %OnPreHTTP()
as %Boolean
Zen page notification of an HTTP request. This method can be overwritten
by subclasses.
This is called before the standard Zen pre-HTTP processing occurs.
method %OnTemplateAction()
as %Status
This method is called when the template is complete. Any
output to the principal device is returned to the Studio.
(1) adding classes to the project;
(2) classes may be opened if Studio's option "Open file to added project" is checked.
classmethod DrawClasses(proxy As %ZEN.proxyObject)
as %Status
Draw page 4, Classes
classmethod DrawNS(proxy As %ZEN.proxyObject)
as %Status
Draw page 3, namespaces
classmethod DrawPageTitle(pSeed As %String)
as %Status
classmethod DrawSaving(proxy As %ZEN.proxyObject)
as %Status
Draw page 5, Saving Classes
classmethod FileExists(filename)
as %Boolean
[ ZenMethod ]
Check if file exists
classmethod GetRecentList(filetype)
as %String
[ ZenMethod ]
Get recent list for URLs or Files. filetype = "FILE" or "URL".
classmethod GetSRC(filetype As %String, filename As %String)
as %String
[ ZenMethod ]
Given the source and filename, load the file.
Save the source and filename to %session.Data.
classmethod GetStatus(tab)
as %ZEN.proxyObject
[ ZenMethod ]
tab = 3: NS - when DrawNS is finished, Status is "Done".
tab = 4: Classes - when DrawClasses is finished, Status is "Done".
classmethod PreProcess(proxy As %ZEN.proxyObject)
as %String
[ ZenMethod ]
For page 3, do preprocess to find out whether it is multiple
classmethod SaveLast(filetype, url)
as %Boolean
[ ZenMethod ]
FileType is either "FILE" or "URL".
method canFinish()
[ Language = javascript ]
Return true if this template can Finish (i.e., enable
the Finish button).
method canGoBack()
[ Language = javascript ]
Return true if this template can go to the previous page (i.e., enable
the Back button).
This is implemented by subclasses.
method canGoNext()
[ Language = javascript ]
Return true if this template can go to the next page (i.e., enable
the Next button).
method changePersistent(flag)
[ Language = javascript ]
method changedFileType(thisObj)
[ Language = javascript ]
User changed file type. Change label. Show local FILENAME if it is a local server. OW show filename and browse button.
method doBrowse()
[ Language = javascript ]
Launching a file selector window.
method drawDone(tab)
[ Language = javascript ]
This method is fired up after onDrawContent is finished. Hide progress message and display error if exists.
method getIndexValues(n)
[ Language = javascript ]
Go through the Index values (checkboxes) for each class. Return index names that are checked.
method getPackages()
[ Language = javascript ]
Validate and return packages string. If a package name is empty, display message and return 0.
method getTypeValues()
[ Language = javascript ]
Go through the Type values (radio buttons) for all classes
method hasMultiplePages()
[ Language = javascript ]
Return true if this template has more than one "page".
This will display Back and Next buttons.
This is implemented by subclasses.
method nextPage()
[ Language = javascript ]
Go to the next page of the template (if there is one).
method onPopupAction(popupName, action, value)
[ Language = javascript ]
Returning from file select OR qualifers dialog and setting the value into the appropriate field.
The id of the field that needs to be updated is saved in "dialogClicked".
method onresizeHandler()
[ Language = javascript ]
This client event, if present, is fired when the page is resized.
method onstartHandler()
[ Language = javascript ]
This is called when the template is first displayed;
This provides a chance to set focus etc.
method previousPage()
[ Language = javascript ]
Go to the previous page of the template (if there is one).
This is implemented by subclasses.
method updateFile(file)
[ Language = javascript ]
Load the recently used file into textbox
method updateURL(url)
[ Language = javascript ]
Load the recently used url into textbox