Skip to main content

EnsPortal.DTLEditor

class EnsPortal.DTLEditor extends EnsPortal.Template.devPage, EnsPortal.Util.CodeEditorBase

Ensemble Data Transformation Editor.
Also called from the BPL editor as Request or Response builder.

Property Inventory

Method Inventory

Parameters

parameter DEFAULTVIEWMODE = both;
If this page has multiple views, this is its initial display mode.
parameter DEFAULTZOOM = 100;
parameter DESIGNERURL = EnsPortal.DTLEditor.zen;
URL for DT Designer.
parameter EDITRESOURCE = %Ens_Code:WRITE,%Ens_DTL:WRITE;
User needs WRITE permissions on either the %Ens_Code or the %Ens_DTL resource to make changes on this page.
parameter JSINCLUDES = zenCSLM.js;
Inherited description: Comma-separated list of additional JS include files for the page.
parameter PAGENAME = Data Transformation Editor;
Displayed name of this page.
parameter RESOURCE = %Ens_Code:READ,%Ens_DTL:READ;
User needs READ permissions on either the %Ens_Code or the %Ens_DTL resource to view this page.

Properties

property %dtl as Ens.DTL.Transform;
Placeholder for DTL object representation during page load.
Property methods: %dtlGet(), %dtlGetSwizzled(), %dtlIsValid(), %dtlNewObject(), %dtlSet()
property actionList as %ZEN.Datatype.string (MAXLEN = 30000, ZENURL = "ACTIONLIST");
List of actions from BP (dialog mode).
Property methods: actionListDisplayToLogical(), actionListGet(), actionListIsValid(), actionListLogicalToDisplay(), actionListLogicalToOdbc(), actionListNormalize(), actionListSet()
property bplLang as %ZEN.Datatype.string (ZENURL = "LANG");
Language from BPL.
Property methods: bplLangDisplayToLogical(), bplLangGet(), bplLangIsValid(), bplLangLogicalToDisplay(), bplLangLogicalToOdbc(), bplLangNormalize(), bplLangSet()
property canTest as %Boolean [ InitialExpression = $system.Security.Check("%Ens_DTLTest","USE") ];
Flag to indicate whether the user is permitted to test transforms.
Property methods: canTestDisplayToLogical(), canTestGet(), canTestIsValid(), canTestLogicalToDisplay(), canTestLogicalToXSD(), canTestNormalize(), canTestSet(), canTestXSDToLogical()
property classCallRequest as %ZEN.Datatype.string (ZENURL = "CALLREQUEST");
Name of call request class (dialog mode).
Property methods: classCallRequestDisplayToLogical(), classCallRequestGet(), classCallRequestIsValid(), classCallRequestLogicalToDisplay(), classCallRequestLogicalToOdbc(), classCallRequestNormalize(), classCallRequestSet()
property classCallResponse as %ZEN.Datatype.string (ZENURL = "CALLRESPONSE");
Name of call response class (dialog mode).
Property methods: classCallResponseDisplayToLogical(), classCallResponseGet(), classCallResponseIsValid(), classCallResponseLogicalToDisplay(), classCallResponseLogicalToOdbc(), classCallResponseNormalize(), classCallResponseSet()
property classContextSuper as %ZEN.Datatype.string (ZENURL = "CONTEXTSUPER");
Name of context super class (dialog mode).
Property methods: classContextSuperDisplayToLogical(), classContextSuperGet(), classContextSuperIsValid(), classContextSuperLogicalToDisplay(), classContextSuperLogicalToOdbc(), classContextSuperNormalize(), classContextSuperSet()
property classRequest as %ZEN.Datatype.string (ZENURL = "REQUEST");
Name of BPL request class (dialog mode).
Property methods: classRequestDisplayToLogical(), classRequestGet(), classRequestIsValid(), classRequestLogicalToDisplay(), classRequestLogicalToOdbc(), classRequestNormalize(), classRequestSet()
property classResponse as %ZEN.Datatype.string (ZENURL = "RESPONSE");
Name of BPL response class (dialog mode).
Property methods: classResponseDisplayToLogical(), classResponseGet(), classResponseIsValid(), classResponseLogicalToDisplay(), classResponseLogicalToOdbc(), classResponseNormalize(), classResponseSet()
property contextList as %ZEN.Datatype.string (MAXLEN = 30000, ZENURL = "CONTEXTLIST");
Csv list of properties in BP context (dialog mode).
Property methods: contextListDisplayToLogical(), contextListGet(), contextListIsValid(), contextListLogicalToDisplay(), contextListLogicalToOdbc(), contextListNormalize(), contextListSet()
property currAction as %Integer [ InitialExpression = -1 ];
ID (index number, 0-based) of current selected action.
Property methods: currActionDisplayToLogical(), currActionGet(), currActionIsValid(), currActionLogicalToDisplay(), currActionNormalize(), currActionSet(), currActionXSDToLogical()
property designerURL as %ZEN.Datatype.string [ InitialExpression = ..#DESIGNERURL ];
URL for designer.
Property methods: designerURLDisplayToLogical(), designerURLGet(), designerURLIsValid(), designerURLLogicalToDisplay(), designerURLLogicalToOdbc(), designerURLNormalize(), designerURLSet()
property diagramLoaded as %Boolean [ InitialExpression = 0 ];
Flag to indicate that the SVG diagram has been loaded.
Property methods: diagramLoadedDisplayToLogical(), diagramLoadedGet(), diagramLoadedIsValid(), diagramLoadedLogicalToDisplay(), diagramLoadedLogicalToXSD(), diagramLoadedNormalize(), diagramLoadedSet(), diagramLoadedXSDToLogical()
property dtlId as %String (MAXLEN = 250, ZENURL = "DT");
Name of Data Transformation to display.
Property methods: dtlIdDisplayToLogical(), dtlIdGet(), dtlIdIsValid(), dtlIdLogicalToDisplay(), dtlIdLogicalToOdbc(), dtlIdNormalize(), dtlIdSet()
property msgDocReadOnly as %ZEN.Datatype.caption [ InitialExpression = $$$TextJS("This data transformation is read only") ];
Property methods: msgDocReadOnlyDisplayToLogical(), msgDocReadOnlyGet(), msgDocReadOnlyIsValid(), msgDocReadOnlyLogicalToDisplay(), msgDocReadOnlyLogicalToOdbc(), msgDocReadOnlyNormalize(), msgDocReadOnlySet()
property tipCompile as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Compile this Data Transformation into executable code") ];
Property methods: tipCompileDisplayToLogical(), tipCompileGet(), tipCompileIsValid(), tipCompileLogicalToDisplay(), tipCompileLogicalToOdbc(), tipCompileNormalize(), tipCompileSet()
property tipNew as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Create a new Data Transformation") ];
Property methods: tipNewDisplayToLogical(), tipNewGet(), tipNewIsValid(), tipNewLogicalToDisplay(), tipNewLogicalToOdbc(), tipNewNormalize(), tipNewSet()
property tipOpen as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Load an existing Data Transformation") ];
Property methods: tipOpenDisplayToLogical(), tipOpenGet(), tipOpenIsValid(), tipOpenLogicalToDisplay(), tipOpenLogicalToOdbc(), tipOpenNormalize(), tipOpenSet()
property tipSave as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Save this Data Transformation") ];
Property methods: tipSaveDisplayToLogical(), tipSaveGet(), tipSaveIsValid(), tipSaveLogicalToDisplay(), tipSaveLogicalToOdbc(), tipSaveNormalize(), tipSaveSet()
property tipSaveAs as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Save this Data Transformation with a new name") ];
Property methods: tipSaveAsDisplayToLogical(), tipSaveAsGet(), tipSaveAsIsValid(), tipSaveAsLogicalToDisplay(), tipSaveAsLogicalToOdbc(), tipSaveAsNormalize(), tipSaveAsSet()
property which as %ZEN.Datatype.string (ZENURL = "WHICH");
Indicated Request or Response.
Property methods: whichDisplayToLogical(), whichGet(), whichIsValid(), whichLogicalToDisplay(), whichLogicalToOdbc(), whichNormalize(), whichSet()

Methods

Inherited description: Return the array of links to show in the locator bar.
pLink(n)=$LB(caption,link)
classmethod %GetPropertyListForClass(pClass As %String = "", Output pList As %ListOfObjects) as %Status
For mini mode, create a list of properties within the given class that can be used to drive the diagram contents.
method %OnAfterCreatePage() as %Status
Decorate the page.
method %OnDrawHTMLHead() as %Status
This callback is called at the end of the HTML HEAD section of the page.
(default implementation is a simple expression).
method %OnGetPageName() as %String
Get the (localized) name of the page based on whether we are in MiniMode or not.
method %OnGetTitle() as %String
Get the (localized) title string for the page. This should be implemented in a subclass.
classmethod CompilesWithoutKey(pProperty) as %Boolean [ ZenMethod ]
method GetDTLContent(ByRef pParms, Output pObject As %RegisteredObject) as %Status
Get DTL object for JSON provider.
classmethod GetDTLStream(Output pStream As %Stream.Object, pClassName As %String, ByRef pDesc As %String, Output pTimestamp As %String, Output pReadOnly As %Boolean = 0) as %Status
Find the DTL definition (as a stream) for the given DTL class; return "" if not found.
Also returns Description for this class
classmethod GetDocument(pDTLId As %String, Output pDocument As %RegisteredObject) as %Status
Find DTL transform (Ens.DTL.Transform) object for the given DTL class.
method GetInternalName() as %String
Return the internal name of the current DTL document.
method GetMiniModeData(ByRef pParms, Output pObject As %RegisteredObject) as %Status
Get the properties of the objects for use in miniMode (i.e. as the Request/Response Builder).
classmethod GetSegments(pMode As %String, pClass As %String, pDocType As %String = "", pSegment As %String, pNodeAddr As %String = "") as %Boolean [ ZenMethod ]
Called from client to get list of subsegments pNodeAddr is csv-list of id numbers
classmethod GetTopSegments(pMode As %String = "", pClass As %String = "", pDocType As %String = "", pDyn As %Boolean = 0) as %Boolean [ ZenMethod ]
Generate JS to populate list of top-level segment
classmethod GetTransform(Output pTransform As Ens.DTL.Transform, pClassName As %String) as %Status
Get DTL info for a class.
classmethod IsVirtualDocument(pClass As %String) as %Boolean [ ZenMethod ]
Server method to test if document is virtual.
method OnDrawRibbon() as %Status
Add content to ribbon bar.
method OnGetRibbonInfo(Output pDisplay As %Library.Boolean, Output pViewIcons As %Library.List, Output pSortOptions As %Library.List, Output pSearchBox As %Library.Boolean, Output pRibbonTitle As %Library.String, Output pCommands As %Library.List) as %Status
Get information to display in the ribbon bar.
classmethod SaveDTLToClass(pClassName As %String, pDTL As Ens.DTL.Transform) as %Status
Given a DTL transform object, convert it to XML and save it in the specified class' XDATA block.
If class does not exist, create a new one.
(Copied from the old DTLDocument class).
method SubmitDTL(pCommand As %String, pProvider As %ZEN.Auxiliary.jsonProvider, pSubmitObject As Ens.DTL.Transform, Output pResponseObject As %RegisteredObject) as %Status
Object submit handler JSON provider. This is called when the client submits the DTL definition.
clientmethod addAction(cls, actionType, prop, value) [ Language = javascript ]
Add a new action (called from toolbar or diagram).
clientmethod addClass(element, cls) [ Language = javascript ]
clientmethod addNewAction() [ Language = javascript ]
User has selected a new action to add.
clientmethod addUndoAction() [ Language = javascript ]
Remember the current state in the undo buffer.
clientmethod adjustSizes() [ Language = javascript ]
Adjust sizes of components on the page.
clientmethod afterActionMove(actionList, action) [ Language = javascript ]
Helper method to execute common code after an action has been moved.
clientmethod applyChanges() [ Language = javascript ]
In miniMode (dialog) apply changes..
clientmethod applyDetailForm() [ Language = javascript ]
Apply changes from detail form.
clientmethod canUndo() [ Language = javascript ]
Return true if it is possible to undo an action
clientmethod canUserModify(saveAs) [ Language = javascript ]
Test if the user has write privilege.
clientmethod cancelChanges() [ Language = javascript ]
In miniMode (dialog) cancel changes..
clientmethod checkActionDisabled(action, recurse) [ Language = javascript ]
clientmethod checkChildActions(children) [ Language = javascript ]
Update the disabled status of any actions in the supplied children that need to be updated.
clientmethod chooseSCMenu(menuName, commandName, saveFlags) [ Language = javascript ]
Handle a source control menu selection.
clientmethod clearUndoBuffer() [ Language = javascript ]
clientmethod cloneObject(obj, clone) [ Language = javascript ]
Create a clone of the given object.
clientmethod compile() [ Language = javascript ]
Launch the compile dialog.
clientmethod correctAssignProperty(action, prop) [ Language = javascript ]
Helper method to add or remove trailing array syntax from an assign property depending on the type of Assign.
clientmethod decorateActionList(actionList, parent, parentProp, depth) [ Language = javascript ]
Walk down list of actions, build an index, and set the parent pointers.
clientmethod detailBlur(zenControl) [ Language = javascript ]
OnBlur handler for the detailValue and detailCondition controls, where we need to track the currently selected text for the DTL Function Wizard. During the onblur, we capture the currently selected text (if any) and store that in the _selectionData property of the zenControl Zen control. If we populate _selectionData, we also set up a timer to call detailClearSelection()() to clear the data in 250 milliseconds. This means we will have the selection data if the user launches the wizard within 250 ms, but don't keep lingering data when the user does something else.
clientmethod detailChange(which) [ Language = javascript ]
Change to item in detail form.
clientmethod detailClearSelection(controlId) [ Language = javascript ]
Clear out any data in the _selectionData property of the Zen control with id controlId.
clientmethod doSave(delayAlert) [ Language = javascript ]
Actually perform the save.
clientmethod dump() [ Language = javascript ]
!!!
clientmethod editPropertyValue(name, type) [ Language = javascript ]
Launch the property editor dialog.
clientmethod generalChange(which) [ Language = javascript ]
Change to item in general form.
clientmethod getActionDesc(type, actionType) [ Language = javascript ]
Get description for an action.
clientmethod getActionType(action) [ Language = javascript ]
Return the "type" of the given action (by combining its class and action).
clientmethod getClientModel() [ Language = javascript ]
Inherited description: Get the jsonProvider object on the client. Subclasses MUST override this method to return the jsonProvider.
clientmethod getCurrentAction() [ Language = javascript ]
Return current selected action, if any.
clientmethod getCurrentExpression() [ Language = javascript ]
clientmethod getCurrentName() [ Language = javascript ]
Return the current name of the class/object being modified
clientmethod getDTLObject() [ Language = javascript ]
Return the dtl transform object.
clientmethod getParentActionInfo() [ Language = javascript ]
Find information on the ancestors of the current selected item. Returns an array of all ancestors of the current action that are forEach actions. Most immediate ancestor is at the start of the list.
clientmethod getSVGWindow() [ Language = javascript ]
Get the SVG window object for the diagram. This provides a way to access scripts in the SVG diagram.
clientmethod horizEndDrag(mgr, wrapper) [ Language = javascript ]
Function to handle the completion of horizontal bar drags, which adjusts the height of the SVG and table wrapper elements. It also removes the svgMask that is placed in front of the SVG during the drag. Note that this refers to the drag manager, and NOT the zenPage object.
clientmethod horizStartDrag(mgr, wrapper) [ Language = javascript ]
Function to handle the start of a drag for the horizontal bar between the SVG and table items. The main work is to determine the initial location of the bar, as well as the maximum reach of the bar so that the constrainDragX and constrainDragY callbacks can correctly limit the drag. This code also invokes showSVGMask()() to ensure that we correctly handle mouse events in this window and not in the SVG diagram window.
clientmethod initDragBars() [ Language = javascript ]
clientmethod initUIConstraints() [ Language = javascript ]
clientmethod initializeSVG(noAdjust) [ Language = javascript ]
clientmethod insertSourceSegments(segment, proplist) [ Language = javascript ]
Insert segments into the source portion of the diagram. This is called by the GetSegments method.
clientmethod insertTargetSegments(segment, proplist) [ Language = javascript ]
Insert segments into the target portion of the diagram. This is called by the GetSegments method.
clientmethod invokeAfterUserAction(input, userContext) [ Language = javascript ]
Client-side coordinator of calls to the AfterUserAction callback in the core source control class.
clientmethod isVDoc(cls) [ Language = javascript ]
Test if the given class is a VDoc.
clientmethod itemSelected(item) [ Language = javascript ]
Notification that an item within the diagram has been selected.
clientmethod loadDT() [ Language = javascript ]
Launch the finder dialog.
clientmethod loadSegmentsFromServer(type, cls, doctype, origName, idlist) [ Language = javascript ]
Load specified segments from the server.
clientmethod loadTopSegmentsFromServer(mode, cls, doctype) [ Language = javascript ]
Load top-level document segments from the server and populate part of the diagram.
mode is "target" or "source".
clientmethod moveItemDown() [ Language = javascript ]
Move the current item (action) down.
clientmethod moveItemIn() [ Language = javascript ]
Move the current item (action) into an adjacent block of actions.
clientmethod moveItemOut() [ Language = javascript ]
Move the current item (action) out of the current action block, i.e. move the action one level up.
clientmethod moveItemUp() [ Language = javascript ]
Move the current item (action) up.
clientmethod newAction(cls) [ Language = javascript ]
Construct a new Action object.
clientmethod newDT() [ Language = javascript ]
Create a new data transformation.
clientmethod onDocumentSaveComplete(contentUpdated) [ Language = javascript ]
Ensure we redraw the diagram and actions table based if the model was updated.
clientmethod onPopupAction(popupName, action, value) [ Language = javascript ]
This client event is fired when the a popup page launched from this page fires an action.
clientmethod onSVGLoad() [ Language = javascript ]
clientmethod onlayoutHandler(load) [ Language = javascript ]
Adjust sizes of components on the page.
clientmethod propertyClick(type, prop) [ Language = javascript ]
User double-clicked on a property box in the diagram.
clientmethod removeAction(idx) [ Language = javascript ]
Delete the current action.
clientmethod removeAllActions() [ Language = javascript ]
Remove all actions.
clientmethod removeClass(element, cls) [ Language = javascript ]
clientmethod resizeFormControls() [ Language = javascript ]
Helper method to increase or decrease the size of the text controls in the property pane when the pane's size changes.
clientmethod saveDT(showDialog) [ Language = javascript ]
Launch the save dialog.
clientmethod saveNotification() [ Language = javascript ]
clientmethod selectAction(index, force, notify, tabChange) [ Language = javascript ]
Select a DTL action.
clientmethod selectTransformClass() [ Language = javascript ]
Launch the finder dialog to select a class for a subtransform.
clientmethod selectType(which) [ Language = javascript ]
Launch the select type dialog.
clientmethod serializeAction(action, useDOM) [ Language = javascript ]
Helper to serialize the Action in action when saving data for Studio. useDOM should only be true under IE10, as IE9 and lower aren't happy with this approach.
clientmethod setCanvasSize(width, height) [ Language = javascript ]
Called from diagram to set size of svg canvas.
clientmethod setClassAndType(isSource, classname, doctype, noreload) [ Language = javascript ]
clientmethod setDescription(desc) [ Language = javascript ]
Update the description (annotation) of this DT.
clientmethod setModified(flag) [ Language = javascript ]
Set the modified flag for the page.
clientmethod setReadOnly(readOnly) [ Language = javascript ]
Inherited description: Set readOnly to the value of readOnly. Subclasses MUST implement this method to update the controls on the page so that the page's behaviour actually matches the value of the readOnly flag.
clientmethod setSourceSegments(clsname, doctype, reload, proplist) [ Language = javascript ]
Set segments into the source portion of the diagram. This is called by the GetTopSegments method.
clientmethod setTargetSegments(clsname, doctype, reload, proplist) [ Language = javascript ]
Set segments into the target portion of the diagram. This is called by the GetTopSegments method.
clientmethod setViewModeHandler(mode As %Library.String, oldmode As %Library.String) [ Language = javascript ]
Do the actual work of updating the view to match the current view mode.
clientmethod setZoom(zoom, updateSelect) [ Language = javascript ]
User has selected a new zoom level.
clientmethod shiftElements(elements, cssProp, change) [ Language = javascript ]
Helper method to allow a list of elements to have the CSS property specified in cssProp to be modified by the increment in change. The method is used to move elements around in response to the delta from a dragged bar.
clientmethod showActionDoc(type) [ Language = javascript ]
Show documentation for given action.
clientmethod showSVGMask() [ Language = javascript ]
Helper method to move the svgMask div in front of SVG to ensure the mouse events aren't pushed through to the SVG window and lost to the ZLM drag handling in this window. Under IE, we also push in an iframe to make IE behave well with the embedded SVG.
clientmethod studioSave() [ Language = javascript ]
clientmethod toggleRowHover(row) [ Language = javascript ]
clientmethod toggleSettings() [ Language = javascript ]
Toggle display of settings box.
clientmethod toolTestDT() [ Language = javascript ]
Launch test dialog.
clientmethod undo() [ Language = javascript ]
Undo the most recent change.
clientmethod updateDiagramActions(keepSelected) [ Language = javascript ]
Update actions in dtl diagram.
clientmethod updateGeneralForm() [ Language = javascript ]
Update contents of general settings form.
clientmethod updateTable() [ Language = javascript ]
Update the contents of the dtl "action" table.
clientmethod validateAction(item) [ Language = javascript ]
Validate the given action; return a list of errors (or an empty list).
clientmethod validateDT(errors) [ Language = javascript ]
Test if there are any errors in this DTL definition.
clientmethod vertEndDrag(mgr, wrapper) [ Language = javascript ]
Function to handle the completion of vertical bar drags and adjust the width of various elements that have explicit widths. It also removes the svgMask that is placed in front of the SVG during the drag. Note that this refers to the drag manager, and NOT the zenPage object.
clientmethod vertStartDrag(mgr, wrapper) [ Language = javascript ]
Function to handle the start of a drag for the vertical bar between the editor and property panes. The main work is to determine the initial location of the bar, as well as the maximum reach of the bar so that the constrainDragX and constrainDragY callbacks can correctly limit the drag. This code also invokes showSVGMask()() to ensure that we correctly handle mouse events in this window and not in the SVG diagram window.

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab