Skip to main content

%DeepSee.UI.Architect

Class %DeepSee.UI.Architect Extends (%DeepSee.UI.standardPage, %CSP.Portal.SourceControl.Base) [ System = 4 ]

DeepSee Architect page.

Parameters

PAGENAME

Parameter PAGENAME = "Architect";

Displayed name of this page.

DEFAULTVIEWMODE

Parameter DEFAULTVIEWMODE = "cube";

If this page has multiple views, this is its initial display mode.

DOCBOOKID

Parameter DOCBOOKID = "D2MODEL_intro_architect";

RESOURCE

Parameter RESOURCE = "%DeepSee_Architect,%DeepSee_ArchitectEdit";

Properties

cubeFullName

Property cubeFullName As %ZEN.Datatype.string(ZENURL = "CUBE");

Name of Cube (with extension).

cubeName

Property cubeName As %ZEN.Datatype.string;

Name of Cube being viewed.

compileErrorOnLoad

Property compileErrorOnLoad As %ZEN.Datatype.boolean;

This will be true if the cube being loaded logged an error on the last compile.

inheritsFrom

Property inheritsFrom As %ZEN.Datatype.string;

Name of the inherited cube, if it exists.

cubeClass

Property cubeClass As %ZEN.Datatype.string;

Class name of Cube being viewed. This is determined from the cube name.

cubeDescription

Property cubeDescription As %ZEN.Datatype.string;

Description of Cube being viewed. This is determined from the cube name.

cubeDomain

Property cubeDomain As %ZEN.Datatype.string;

Domain of Cube being viewed. This is handled seperately from json.

cubeDependsOn

Property cubeDependsOn As %ZEN.Datatype.string;

DependsOn for cube class. If provided, this is used as the DependsOn value of the generated cube. If not, the sourceClass for the cube is used. This is handled seperately from json.

dataSource

Property dataSource As %ZEN.Datatype.string;

Data source. This is a copy of the value in the cube model.

currItem

Property currItem As %ZEN.Datatype.integer [ InitialExpression = -1 ];

ID (index number, 0-based) of current selected item.

currItemType

Property currItemType As %ZEN.Datatype.string;

Type of the current selected item.

%model

Property %model As %DeepSee.Model.cube;

Local copy of cube model object.

readOnly

Property readOnly As %ZEN.Datatype.boolean [ InitialExpression = 0 ];

If true, user cannot modify the current cube definition.

canWrite

Property canWrite As %ZEN.Datatype.boolean [ InitialExpression = 1 ];

If true, user can modify (non-read-only) cube definitions, otherwise they can only view.

lblExpression

Property lblExpression As %ZEN.Datatype.caption [ InitialExpression = {$$$TextHTML("(expression)")} ];

lblDataLevel

Property lblDataLevel As %ZEN.Datatype.caption [ InitialExpression = {$$$TextHTML("Level (type=data)")} ];

lblTimeLevel

Property lblTimeLevel As %ZEN.Datatype.caption [ InitialExpression = {$$$TextHTML("Level (type=time)")} ];

lblAgeLevel

Property lblAgeLevel As %ZEN.Datatype.caption [ InitialExpression = {$$$TextHTML("Level (type=age)")} ];

hlpRemove

Property hlpRemove As %ZEN.Datatype.caption [ InitialExpression = {$$$Text("Remove this item")} ];

hlpMoveUp

Property hlpMoveUp As %ZEN.Datatype.caption [ InitialExpression = {$$$Text("Move this item up")} ];

hlpMoveDown

Property hlpMoveDown As %ZEN.Datatype.caption [ InitialExpression = {$$$Text("Move this item down")} ];

hlpShowHide

Property hlpShowHide As %ZEN.Datatype.caption [ InitialExpression = {$$$Text("Hide or show the properties box")} ];

msgCubeInherited

Property msgCubeInherited As %ZEN.Datatype.caption [ InitialExpression = {$$$Text("This cube inherits items from the %1 cube")} ];

msgItemInherited

Property msgItemInherited As %ZEN.Datatype.caption [ InitialExpression = {$$$Text("This item has been inherited from the %1 cube")} ];

msgItemOverride

Property msgItemOverride As %ZEN.Datatype.caption [ InitialExpression = {$$$Text("This is an override of an inherited cube item")} ];

msgInvalid

Property msgInvalid As %ZEN.Datatype.caption [ InitialExpression = {$$$TextHTML("Please click [Open] to select a model definition.")} ];

msgOpenModel

Property msgOpenModel As %ZEN.Datatype.caption [ InitialExpression = {$$$Text("Please open a model definition first.")} ];

hlpDropTooltip

Property hlpDropTooltip As %ZEN.Datatype.caption [ InitialExpression = {$$$Text("Create new %1")} ];

settingsExpanded

Property settingsExpanded As %Boolean [ InitialExpression = 1, Internal ];

If true, the settings area (property sheet) is visible.

expandAll

Property expandAll As %Integer [ InitialExpression = 1 ];

Whether to expand all elements under each type. When user clicks Collapse All then this is set to 0. At end of renderTable it is set to 2.

DocumaticPage

Property DocumaticPage As %String;

timeFunctions

Property timeFunctions As %ZEN.Datatype.string;

XDatas

CSS3Style

XData CSS3Style

This Style block contains page-specific CSS style definitions.

Style

XData Style

This Style block contains page-specific CSS style definitions.

contentPane

XData contentPane [ XMLNamespace = "http://www.intersystems.com/zen" ]

Methods

%OnGetTitle

Method %OnGetTitle() As %String

Get the (localized) title string for the page. This should be implemented in a subclass.

%OnGetPageName

Method %OnGetPageName() As %String

Get the (localized) name of the page.

%OnGetProductName

Method %OnGetProductName() As %String

Get the product name for the page.

OnGetRibbonInfo

Method OnGetRibbonInfo(Output pDisplay As %Boolean, Output pViewIcons As %List, Output pSortOptions As %List, Output pSearchBox As %Boolean, Output pRibbonTitle As %String, Output pCommands As %List) As %Status

Get information to display in the ribbon bar.

DrawTableHeader

Method DrawTableHeader(pSeed As %String) As %Status

Draw the contents of the Table Header (the region between the diagram and the table).

GetDataSourceInfo

ClassMethod GetDataSourceInfo(pRoot As %String, Output pTree, ByRef pParms) As %Status

Provide contents of the data source tree.

OnDrawRibbon

Method OnDrawRibbon() As %Status

Draw additional stuff in the ribbon bar

changeSubjectArea

ClientMethod changeSubjectArea() [ Language = javascript ]

Launch the cube finder dialog.

changeType

ClientMethod changeType(idfield) [ Language = javascript ]

This function takes care of certain fields when their values are changed.

changeUseSQL

ClientMethod changeUseSQL() [ Language = javascript ]

User checked/unchecked the Use SQL field

onlayoutHandler

ClientMethod onlayoutHandler(load) [ Language = javascript ]

Adjust sizes of components on the page.

adjustSizes

ClientMethod adjustSizes() [ Language = javascript ]

Adjust sizes of components on the page.

startDrag

ClientMethod startDrag(engine, wrapper) [ Language = javascript ]

Callback to initiate window resize event

endDrag

ClientMethod endDrag(engine, wrapper) [ Language = javascript ]

Callback to wrap up window resize event

constrainDragX

ClientMethod constrainDragX(engine, wrapper, intendedX) [ Language = javascript ]

Callback to limit horizontal resizing

constrainDragY

ClientMethod constrainDragY(engine, wrapper, intendedY) [ Language = javascript ]

Callback to limit vertical resizing

updateTable

ClientMethod updateTable() [ Language = javascript ]

Update the contents of the model table.

renderTable

ClientMethod renderTable() [ Language = javascript ]

Update the contents of the model table.

renderCubeItems

ClientMethod renderCubeItems(cube, itemGroupType, html) [ Language = javascript ]

Render the actual items in a given group type in the table. This does not draw the title bars.

isClosed

ClientMethod isClosed(cube, item) [ Language = javascript ]

toggleExpand

ClientMethod toggleExpand(flag) [ Language = javascript ]

user clicked Expand All (flag=1) or Collapsed All (flag=0).

findRowForItem

ClientMethod findRowForItem(item) [ Language = javascript ]

Find the row number in the table for the given model item. This must be called after the table has been rendered.

findRowForItemName

ClientMethod findRowForItemName(name, itemGroup) [ Language = javascript ]

Find the row number in the table for the given model item name. If itemGroup is defined, return the first occurence of name within the particular group of model items. This must be called after the table has been rendered.

%OnAfterCreatePage

Method %OnAfterCreatePage() As %Status

This class method callback is called just before the server-side page object is created.

LoadListingSource

Method LoadListingSource() As %String

Return Data Connector list

GetCubeDefinition

Method GetCubeDefinition(ByRef pParms, Output pObject As %RegisteredObject) As %Status

Get Cube definition for JSON provider.

GetInheritedCubeDefinition

Method GetInheritedCubeDefinition(ByRef pParms, Output pObject As %RegisteredObject) As %Status

Get the inherited Cube definition for JSON provider.

getTimeFunctionsForCalendar

ClientMethod getTimeFunctionsForCalendar(calendar) [ Language = javascript ]

Report the supported functions for a given calendar.

GetTimeLevelClasses

ClassMethod GetTimeLevelClasses(pSubClass, pCalendar = "gregorian") As %String

Produces a list of Time level class delimited by commas.

getCubeObject

ClientMethod getCubeObject() [ Language = javascript ]

Return the cube definition object.

getInheritedCubeObject

ClientMethod getInheritedCubeObject() [ Language = javascript ]

Return the cube definition object for the inherited cube.

getSelectedItem

ClientMethod getSelectedItem() [ Language = javascript ]

Return the current selected item.

getiKnowMeasures

ClientMethod getiKnowMeasures() [ Language = javascript ]

Return a list of iKnow measures

cancelDetailForm

ClientMethod cancelDetailForm() [ Language = javascript ]

Cancel changes from detail form.

setViewModeHandler

ClientMethod setViewModeHandler(mode) [ Language = javascript ]

Do the actual work of updating the view to match the current view mode.

changeDataSource

ClientMethod changeDataSource() [ Language = javascript ]

Launch the data source dialog.

onPopupAction

ClientMethod onPopupAction(popupName, action, value) [ Language = javascript ]

This client event is fired when the a popup page launched from this page fires an action.

saveCube

ClientMethod saveCube() [ Language = javascript ]

Do save now. This method is called from compile also.

setDataSource

ClientMethod setDataSource(cls) [ Language = javascript ]

Set the dataSource for the current cube.

newCube

ClientMethod newCube() [ Language = javascript ]

Invoke dialog to add a new cube.

viewCube

ClientMethod viewCube() [ Language = javascript ]

Open CubeView page to view all details (if user has not modified anything).

doDocument

ClientMethod doDocument() [ Language = javascript ]

Open Documatic page to view all details (if user has not modified anything).

addItem

ClientMethod addItem() [ Language = javascript ]

Invoke dialog to add a new item to the model.

addNewItemToModel

ClientMethod addNewItemToModel(typenewname) [ Language = javascript ]

Add a new item to the model and select it.

addInheritedItemToModel

ClientMethod addInheritedItemToModel(type, inheritedItem) [ Language = javascript ]

Add a new item to the model and select it. Designed for adding an overriden item from an inherited cube

createMeasure

ClientMethod createMeasure(newname, newsource, type) [ Language = javascript ]

Create a new measure. 'type' passed in is 'number', 'date', 'boolean' or 'string'

createDim

ClientMethod createDim(newname, dimtype, sourceprop, caption) [ Language = javascript ]

Create new dimension. If drag & drop, sourceprop passed in will not be null.

createHier

ClientMethod createHier(newname) [ Language = javascript ]

Create new hierarchy.

createLevel

ClientMethod createLevel(newname, newsource) [ Language = javascript ]

Create new level If drag & drop, newsource passed in will not be null.

createProp

ClientMethod createProp(newname, newsource) [ Language = javascript ]

Create new property. If drag & drop, newsource passed in will not be null.

createListing

ClientMethod createListing(newname, fieldName) [ Language = javascript ]

Create new listing object. If drag & drop, fieldName passed in will not be null.

createListingField

ClientMethod createListingField(newname, fieldExpression) [ Language = javascript ]

Create new listing object. If drag & drop, fieldExpression passed in will not be null.

createRelationship

ClientMethod createRelationship(newname) [ Language = javascript ]

Create new relationship object.

browseClass

ClientMethod browseClass(popupName) [ Language = javascript ]

Invoke class finder dialog. popupName="sourceclasses" or "cubes"

editItem

ClientMethod editItem(what) [ Language = javascript ]

Invoke dialog to edit certain items: RangeExpression, FormatString, SourceProperty, SourceExpression, CubeResource, ListingResource, ListingField.

toggleSource

ClientMethod toggleSource(element, type) [ Language = javascript ]

editDescription

ClientMethod editDescription(what) [ Language = javascript ]

Toggle to show/hide Description textarea; set what's in text into textarea.

applyDescription

ClientMethod applyDescription(what) [ Language = javascript ]

Set textarea description back into the text description field.

reorder

ClientMethod reorder() [ Language = javascript ]

Invoke dialog to reorder certain elements of the model.

fetchCube

ClientMethod fetchCube() [ Language = javascript ]

This method is called from child pages (reorder) to get a live javaScript object of the cube

selectNewItem

ClientMethod selectNewItem(newItem, newType) [ Language = javascript ]

Helper method: select an item, make sure it is visible and give focus to the details panel.

rowClick

ClientMethod rowClick(type, row) [ Language = javascript ]

User click on a row in the table.

selectItem

ClientMethod selectItem(type, row, force) [ Language = javascript ]

Select a row in the table.

getCSSForType

ClientMethod getCSSForType(type) [ Language = javascript ]

Find the css class for the given row type.

applyDetails

ClientMethod applyDetails() [ Language = javascript ]

Apply changes from detail form.

applyDependsOn

ClientMethod applyDependsOn(value) [ Language = javascript ]

user modified DependsOn. Since it is not part of json, handle it seperately.

applyDomain

ClientMethod applyDomain(value) [ Language = javascript ]

user modified Domain. Since it is not part of json, handle it seperately.

enableItem

ClientMethod enableItem(row, flag) [ Language = javascript ]

Enable/disable a row in the table.

moveItemUp

ClientMethod moveItemUp(type, row, index, hier, level, prop) [ Language = javascript ]

moveItemDown

ClientMethod moveItemDown(type, row, index, hier, level, prop) [ Language = javascript ]

removeItem

ClientMethod removeItem(type, row, index, hier, level, prop) [ Language = javascript ]

Remove a row from the table.

canUndo

ClientMethod canUndo() [ Language = javascript ]

Return true if it is possible to undo an action

undo

ClientMethod undo() [ Language = javascript ]

Undo the most recent change.

clearUndoBuffer

ClientMethod clearUndoBuffer() [ Language = javascript ]

changeUndoState

ClientMethod changeUndoState(undostate) [ Language = javascript ]

Change Undo button state and View button state (opposite of Undo button)

addUndoAction

ClientMethod addUndoAction() [ Language = javascript ]

Remember the current state in the undo buffer.

cloneObject

ClientMethod cloneObject(obj, clone) [ Language = javascript ]

Create a clone of the given object.

toggleDisclosure

ClientMethod toggleDisclosure(key) [ Language = javascript ]

User click on disclosure icon in table.

tableDropHandler

ClientMethod tableDropHandler(dragData) [ Language = javascript ]

Drop handler for model table.

getMeaName

ClientMethod getMeaName(item, name) [ Language = javascript ]

Given the base name, return the new name with proper index number

getDimName

ClientMethod getDimName(item, name) [ Language = javascript ]

Given the base name, return the new name with proper index number

getHierName

ClientMethod getHierName(item, name) [ Language = javascript ]

Given the base name, return the new name with proper index number

getLevName

ClientMethod getLevName(item, name) [ Language = javascript ]

Given the base name, return the new name with proper index number

getPropName

ClientMethod getPropName(item, name) [ Language = javascript ]

Given the base name, return the new name with proper index number

getListName

ClientMethod getListName() [ Language = javascript ]

Return new list name. Starting "New_listing1".

getListingFieldName

ClientMethod getListingFieldName(cube, name) [ Language = javascript ]

Return new list name. Starting "New_listing1".

save

ClientMethod save() [ Language = javascript ]

Save the cube.

Method %GetLocatorLinks(Output pLink) As %Status

Return the array of links to show in the locator bar.
pLink(n)=$LB(caption,link)

SubmitCube

Method SubmitCube(pCommand As %String, pProvider As %ZEN.Auxiliary.jsonProvider, pSubmitObject As %RegisteredObject, ByRef pResponseObject As %RegisteredObject) As %Status

Object submit handler JSON provider. This is called when the client submits the Cube definition.

setModified

ClientMethod setModified(flag) [ Language = javascript ]

Set the modified flag for the page.

commandBtnTimeout

ClientMethod commandBtnTimeout() [ Language = javascript ]

Timeout for the timer managing the compile button

setCommandsFromBuildState

ClientMethod setCommandsFromBuildState() [ Language = javascript ]

This method is responsible for controlling the Compile button's availability according to the build lock.

CheckBuildLock

ClassMethod CheckBuildLock(pCubeName) As %Boolean [ ZenMethod ]

Check to see if the current cube has a build lock, indicating there is an update underway

compile

ClientMethod compile() [ Language = javascript ]

Compile the cube.

buildCube

ClientMethod buildCube() [ Language = javascript ]

Rebuild the cube.

canUserModify

ClientMethod canUserModify() [ Language = javascript ]

Test if the user has write privilege.

canUserBuild

ClientMethod canUserBuild() [ Language = javascript ]

Test if the user has build privileges.

toggleSettings

ClientMethod toggleSettings() [ Language = javascript ]

Toggle display of settings (property tabs) box.

toolAnalyzer

ClientMethod toolAnalyzer() [ Language = javascript ]

Show analyzer in a new window.

toolQuery

ClientMethod toolQuery() [ Language = javascript ]

Show query tool in a new window.

onloadHandler

ClientMethod onloadHandler() [ Language = javascript ]

Add check to ensure that we correctly load documents on the client when source control hooks are in use. Also set up a timer to ensure we don't hit timeouts while editing documents in Studio, as well as When in Studio mode, also detect whether we are running IE10, as we need to save documents differently if that is the case.

addDetailCoverPane

ClientMethod addDetailCoverPane() [ Internal, Language = javascript ]

Adds a coverpane to the details tab in the DOM. This is used to disable the entire details section while still being able to read the items.

rowMouseOver

ClientMethod rowMouseOver(element, div) [ Language = javascript ]

method for when user mouse over a row in the table

rowMouseOut

ClientMethod rowMouseOut(div) [ Language = javascript ]

method for when mouse out

GetPropInfo

ClassMethod GetPropInfo(sourceClass, fullName) As %ZEN.proxyObject [ ZenMethod ]

This method returns the following values via proxy object:

  1. IsDate is set to 1 if the property type is a date format. Verified against the ODBC type.
  2. IsNumeric is set to 1 if the property type is any kind of numeric format. Verified against the ODBC type.
  3. Caption is the property's parameter CAPTION. 4) SQLNames in the fashion of Prop1 -> Prop2 -> Prop3. 5) IsBoolean is set to 1 if the property type is a boolean. Verified against the ODBC type.

GetInternalName

Method GetInternalName() As %String

Return the internal name of the current document, including the three letter extension in upper-case. For example, MyPackage.MyClass.CLS would be the internal name for the class MyPackage.MyClass.

getCurrentName

ClientMethod getCurrentName() [ Language = javascript ]

Return the current name of the class/object being modified.

getPageTitle

ClientMethod getPageTitle() As %String [ Language = javascript ]

Get the title string to add to the locator row. This should be implemented in a subclass.

getClientModel

ClientMethod getClientModel() [ Language = javascript ]

Get the jsonProvider object on the client.

onDocumentLoadComplete

ClientMethod onDocumentLoadComplete() [ Language = javascript ]

Callback method invoked after we have successfully loaded the current document.

%OnDrawHTMLHead

Method %OnDrawHTMLHead() As %Status

This callback is called at the end of the HTML HEAD section of the page.

setReadOnly

ClientMethod setReadOnly(readOnly) [ Language = javascript ]

method used by Source Control to set the value of the readOnly flag.

transformToSQLExpression

ClientMethod transformToSQLExpression(expr) [ Language = javascript ]

dropDetailListingFieldExpression

ClientMethod dropDetailListingFieldExpression(dragData) [ Language = javascript ]

overrideInheritedItem

ClientMethod overrideInheritedItem() [ Language = javascript ]

Called by the Override button to override an inherited item in the local cube definition.

setDetailContentDisabled

ClientMethod setDetailContentDisabled(setDisabled) [ Language = javascript ]

This prevents a user from making changes to the item details using the cover pane.

itemIsOverride

ClientMethod itemIsOverride(item) [ Language = javascript ]

If it exists, search the inherited cube object for the same logical definition as item.

chooseSCMenu

ClientMethod chooseSCMenu(menuName, commandName, saveFlags) [ Language = javascript ]

Handle a source control menu selection.

checkItemModified

ClientMethod checkItemModified(item, type) [ Language = javascript ]

Pass in an item and type and test if the settings substantial to data storage definition (eg: values, type, etc.) have changed.

assignFactNumbers

ClientMethod assignFactNumbers() [ Language = javascript ]

Examine the cube definition object. If the cube's namedFactNums property is set, automatically assign a factNumber to any structural element that does not already have one defined.

analyzeCubeModel

ClientMethod analyzeCubeModel(cube, definedMsrNums, definedFactNums, sourceIndex, missing) [ Language = javascript ]

This will compare the current cube model with the compiled definition. It will return two arrays definedMsrNums, definedFactNums containing the known factNumbers that have been used in measures and levels/relationships, respectively. For those items that have factNumbers assigned, the mapping between column sources and factNumbers is returned in sourceIndex. Anything that has been modified in the current session or did not previously have a compiled fact number will be returned in the missing index.

If factNumbers of the model elements have not been explicitly set but have been previously assigned internally via the compile, the factNumbers in the current cube model will be set to those numbers. In the case of inherited cubes, only the compiled factNumbers of the supercube will be held constant.

setFactsModified

ClientMethod setFactsModified(value) [ Language = javascript ]

Set or Clear all isModified flags in the cube definition according to value.

getModifiedFactList

ClientMethod getModifiedFactList(specList) [ Language = javascript ]

Fetch the list of dimensions, measures, and relationships that are known to have been modified since the last build.

getLevelSourceForIndex

ClientMethod getLevelSourceForIndex(dimension, level) [ Language = javascript ]

Given the objects representing a dimension and a level, produce a string that can be used as an identifier in the sourceIndex when determining shared storage for fact table columns.

GetCompiledFactNumbers

ClassMethod GetCompiledFactNumbers(pCubeName) As %String [ ZenMethod ]

Return an index of the currently used fact numbers in the compiled metadata. This index is returned as a JSON object which takes the form:
Set tCompiledFactNums = { "measures":{ "[MEASURES].[NAME]":"M1" }, "dimensions":{ "[DIM].[HIER].[LEVEL]":"2" }, "relationships":{ "[RELNAME]":"3" } }