class %CSP.UI.Portal.Dialog.DatabaseWizard
extends %CSP.UI.Portal.Dialog.WizardTemplate
This class is used internally by InterSystems IRIS. You should not make direct use of it within your applications.
There is no guarantee made about either the behavior or future operation of this class.
Database Wizard for Management Portal
Please do not modify any part of this dialog without COMPLETELY testing all cases!!!
Please be extremely careful!!!
parameter APPLICATION = "%CSP.UI.Portal.Application";
Class name of application this page belongs to.
parameter APPLYBUTTON = 0;
If true, then this dialog displays an Apply button.
parameter AUTONS = 0;
If $NAMESPACE is set, auto switch namespace
parameter CSPURL = "/csp/sys/mgr/%CSP.UI.Portal.Dialog.DatabaseWizard.zen";
This parameter is used to make sure that if multiple
CSP applications are mapped to the same namespace that the CSP engine can correctly
identify which class corresponds with which URL. If 'LockCSPName' is true (the default, defined
in the CSP application) then you can only access this page if the url exactly matches
this 'CSPURL'. You can set this parameter to "" if you wish to disable this check for
this class. This check is applied for all CSP urls (cls/csp/zen).
If this page was compiled from a .csp file, then this parameter is automatically set to contain the
url of this file used for compilation.
parameter EMSSERVICE = "Namespace";
parameter HELPID = "GSA_config_databases";
DOCBOOK Topic Id that offers help for this template.
parameter PAGENAME = "DatabaseWizard";
Displayed name of this page.
parameter RESOURCE = "%Admin_Manage";
User must hold at least operator privilege to use this dialog.
property AllowNewResource
as %ZEN.Datatype.string [ InitialExpression = $SYSTEM.Security.Check($$$AdminSecureResourceName,$$$PermUseName) ];
property DirEvaluated
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
Indicate whether the current directory has been evaluated. Whenever Directory is changed (by using Browse or typed in) this is set to 0 and Finish is disabled so that Next is required.
property FILETYPE
as %ZEN.Datatype.string(ZENURL="FILETYPE");
Type from where we get the selected items from: Class or Routine.
property GetDBEncKeyID
as %ZEN.Datatype.string [ InitialExpression = $$$GetDBEncKeyID ];
property IsMirrorMember
as %ZEN.Datatype.integer [ InitialExpression = $System.Mirror.IsMember() ];
property NameExists
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
Indicate whether the name user entered already exists.
property NewResource
as %ZEN.Datatype.string [ InitialExpression = $$$DBDEFAULTResourceName ];
property ResourcePage
as %ZEN.Datatype.string [ InitialExpression = ..Link("/csp/sys/sec/%CSP.UI.Portal.Dialog.Resource.zen") ];
property ShowMirrorSet
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
property UseExistDB
as %ZEN.Datatype.integer;
property UserProceed
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
User confirmed to proceed on using MGR directory
property curVolThreshold
as %ZEN.Datatype.integer;
property defaultResource
as %ZEN.Datatype.string [ InitialExpression = $$$DBDEFAULTResourceName ];
property msgDirExists
as %ZEN.Datatype.string [ InitialExpression = $$$TextJS("Directory does not exist! Please change if you do not wish the directory be created.") ];
property msgNameExists
as %ZEN.Datatype.string [ InitialExpression = $$$TextJS("Database with this name already exists!") ];
property msgNameHint
as %ZEN.Datatype.string [ InitialExpression = $$$TextJS("Required.") ];
method %OnAfterCreatePage()
as %Status
This callback is called after the server-side page
object and all of its children are created.
Subclasses can override this to add, remove, or modify
items within the page object model, or to provide values
for controls.
method %OnGetSubtitle()
as %String
Get the (localized) subtitle string for the dialog.
This should be implemented in a subclass.
method %OnGetTitle()
as %String
Get the (localized) title string for the dialog.
This should be implemented in a subclass.
classmethod CreateDirectory(Directory As %String)
as %ZEN.proxyObject
[ ZenMethod ]
classmethod DBDirExists(Directory As %String)
as %String
[ ZenMethod ]
Check if Directory user entered already exists (1 = yes; 0 = no).
classmethod DBNameExists(DBName As %String)
as %String
[ ZenMethod ]
Check if DBName user entered already exists (1 = yes; 0 = no).
classmethod DBNameIsValid(DBName As %String)
as %ZEN.proxyObject
[ ZenMethod ]
Validate Database Name
classmethod DbExists(Dir As %String)
as %String
[ ZenMethod ]
Check whether database exists in this directory
classmethod DrawPageTitle(pSeed As %String)
as %Status
classmethod GetDefaultDir(DBName As %String)
as %String
[ ZenMethod ]
If this is the first time user entering a database, the last directory is null. Return "".
Else return default directory with the new DBName added
classmethod GetFreeSpace(Dir As %String)
as %ZEN.proxyObject
[ ZenMethod ]
classmethod GetLastDBDir()
as %String
[ ZenMethod ]
classmethod GetResourceList()
as %String
[ ZenMethod ]
classmethod IsMGRDir(Directory As %String)
as %ZEN.proxyObject
[ ZenMethod ]
Check if the directory entered or selected is the same as the system manager directory.
result is returned as a proxy object.
proxy.ismgr = 1 or 0; proxy.ok = 1 or 0; proxy.ErrorMessage is actual error message if proxy.ok = 0.
classmethod SaveData(pProxy As %ZEN.proxyObject)
as %ZEN.proxyObject
[ ZenMethod ]
classmethod SetLastDBDir(Directory As %String)
as %String
[ ZenMethod ]
method browseSelect(name)
[ Language = javascript ]
User clicked the Browse button.
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 changeMirror(isMirror)
[ Language = javascript ]
method changeResource(flag)
[ Language = javascript ]
method changeVolThreshold(newVal)
[ Language = javascript ]
method checkDirExists(DBDir)
[ Language = javascript ]
Check if directory already exists.
method checkNameExists(DBName)
[ Language = javascript ]
Check if name already exists.
method doSave()
as %Boolean
[ Language = javascript ]
Process save and create new db. Return true if success. OW return false.
method doUnitSwitch()
[ Language = javascript ]
method getDialogValue()
[ Language = javascript ]
Get the value that will be applied when the user presses the OK button.
This is implemented by subclasses.
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 keyUp(zenEvent)
[ Language = javascript ]
Check if user hit [Enter].
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 ondialogFinish(action)
as %Boolean
[ Language = javascript ]
This callback, if defined, is called when the user presses the OK or Apply action buttons.
If this returns false, then the action is cancelled.
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 load the last filetype, etc.
method previousPage()
[ Language = javascript ]
Go to the previous page of the template (if there is one).
This is implemented by subclasses.
method updateBrowsed()
[ Language = javascript ]
Update flag to indicate that the directory is user selected/entered so modifying the Name field
would not override the directory.
method updateDir(DBName)
[ Language = javascript ]
Update directory while user typing in Name
But do not do so if user has selected a directory from the Browse window
Also update the Mirror DB Name with the user-entered name.
method useMGR()
[ Language = javascript ]
User clicked the Proceed button to use the MGR database
method validateMGR()
as %Boolean
[ Language = javascript ]
This method checks if user entered directory is the manager directory. If it is, then show warning message and have user confirm to proceed.
method validateSize(Dir)
[ Language = javascript ]