class %DeepSee.UI.Architect
extends %DeepSee.UI.standardPage, %CSP.Portal.SourceControl.Base
DeepSee Architect page.
parameter DEFAULTVIEWMODE = "cube";
If this page has multiple views, this is its initial display mode.
parameter DOCBOOKID = "D2MODEL_intro_architect";
Docbook ID for this page.
parameter PAGENAME = "Architect";
Displayed name of this page.
parameter RESOURCE = "%DeepSee_Architect,%DeepSee_ArchitectEdit";
All Analytics pages require %DeepSee_Portal USE.
property %model
as %DeepSee.Model.cube;
Local copy of cube model object.
property DocumaticPage
as %String;
property canWrite
as %ZEN.Datatype.boolean [ InitialExpression = 1 ];
If true, user can modify (non-read-only) cube definitions,
otherwise they can only view.
property compileErrorOnLoad
as %ZEN.Datatype.boolean;
This will be true if the cube being loaded logged an error on the last compile.
property cubeClass
as %ZEN.Datatype.string;
Class name of Cube being viewed.
This is determined from the cube name.
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.
property cubeDescription
as %ZEN.Datatype.string;
Description of Cube being viewed.
This is determined from the cube name.
property cubeDomain
as %ZEN.Datatype.string;
Domain of Cube being viewed.
This is handled seperately from json.
property cubeFullName
as %ZEN.Datatype.string(ZENURL="CUBE");
Name of Cube (with extension).
property cubeName
as %ZEN.Datatype.string;
Name of Cube being viewed.
property currItem
as %ZEN.Datatype.integer [ InitialExpression = -1 ];
ID (index number, 0-based) of current selected item.
property currItemType
as %ZEN.Datatype.string;
Type of the current selected item.
property dataSource
as %ZEN.Datatype.string;
Data source. This is a copy of the value in the cube model.
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.
property hlpDropTooltip
as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Create new %1") ];
property hlpMoveDown
as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Move this item down") ];
property hlpMoveUp
as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Move this item up") ];
property hlpRemove
as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Remove this item") ];
property hlpShowHide
as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Hide or show the properties box") ];
property inheritsFrom
as %ZEN.Datatype.string;
Name of the inherited cube, if it exists.
property lblAgeLevel
as %ZEN.Datatype.caption [ InitialExpression = $$$TextHTML("Level (type=age)") ];
property lblDataLevel
as %ZEN.Datatype.caption [ InitialExpression = $$$TextHTML("Level (type=data)") ];
property lblExpression
as %ZEN.Datatype.caption [ InitialExpression = $$$TextHTML("(expression)") ];
property lblTimeLevel
as %ZEN.Datatype.caption [ InitialExpression = $$$TextHTML("Level (type=time)") ];
property msgCubeInherited
as %ZEN.Datatype.caption [ InitialExpression = $$$Text("This cube inherits items from the %1 cube") ];
property msgInvalid
as %ZEN.Datatype.caption [ InitialExpression = $$$TextHTML("Please click [Open] to select a model definition.") ];
property msgItemInherited
as %ZEN.Datatype.caption [ InitialExpression = $$$Text("This item has been inherited from the %1 cube") ];
property msgItemOverride
as %ZEN.Datatype.caption [ InitialExpression = $$$Text("This is an override of an inherited cube item") ];
property msgOpenModel
as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Please open a model definition first.") ];
property readOnly
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, user cannot modify the current cube definition.
property timeFunctions
as %ZEN.Datatype.string;
method %GetLocatorLinks(Output pLink)
as %Status
Return the array of links to show in the locator bar.
pLink(n)=$LB(caption,link)
method %OnAfterCreatePage()
as %Status
This class method callback is called just before the server-side page
object is created.
method %OnDrawHTMLHead()
as %Status
This callback is called at the end of the HTML HEAD section of the page.
method %OnGetPageName()
as %String
Get the (localized) name of the page.
method %OnGetProductName()
as %String
Get the product name for the page.
method %OnGetTitle()
as %String
Get the (localized) title string for the page.
This should be implemented in a subclass.
classmethod CheckBuildLock(pCubeName)
as %Boolean
[ ZenMethod ]
Check to see if the current cube has a build lock, indicating there is an update underway
method DrawTableHeader(pSeed As %String)
as %Status
Draw the contents of the Table Header (the region between the diagram and the table).
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"
}
}
method GetCubeDefinition(ByRef pParms, Output pObject As %RegisteredObject)
as %Status
Get Cube definition for JSON provider.
classmethod GetDataSourceInfo(pRoot As %String, Output pTree, ByRef pParms)
as %Status
Provide contents of the data source tree.
method GetInheritedCubeDefinition(ByRef pParms, Output pObject As %RegisteredObject)
as %Status
Get the inherited Cube definition for JSON provider.
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.
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.
classmethod GetTimeLevelClasses(pSubClass, pCalendar="gregorian")
as %String
Produces a list of Time level class delimited by commas.
method LoadListingSource()
as %String
Return Data Connector list
method OnDrawRibbon()
as %Status
Draw additional stuff in the ribbon bar
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.
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.
method 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
method addItem()
[ Language = javascript ]
Invoke dialog to add a new item to the model.
method addNewItemToModel(typenewname)
[ Language = javascript ]
Add a new item to the model and select it.
method addUndoAction()
[ Language = javascript ]
Remember the current state in the undo buffer.
method adjustSizes()
[ Language = javascript ]
Adjust sizes of components on the page.
method 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.
method applyDependsOn(value)
[ Language = javascript ]
user modified DependsOn. Since it is not part of json, handle it seperately.
method applyDescription(what)
[ Language = javascript ]
Set textarea description back into the text description field.
method applyDetails()
[ Language = javascript ]
Apply changes from detail form.
method applyDomain(value)
[ Language = javascript ]
user modified Domain. Since it is not part of json, handle it seperately.
method 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.
method browseClass(popupName)
[ Language = javascript ]
Invoke class finder dialog. popupName="sourceclasses" or "cubes"
method buildCube()
[ Language = javascript ]
Rebuild the cube.
method canUndo()
[ Language = javascript ]
Return true if it is possible to undo an action
method canUserBuild()
[ Language = javascript ]
Test if the user has build privileges.
method canUserModify()
[ Language = javascript ]
Test if the user has write privilege.
method cancelDetailForm()
[ Language = javascript ]
Cancel changes from detail form.
method changeDataSource()
[ Language = javascript ]
Launch the data source dialog.
method changeSubjectArea()
[ Language = javascript ]
Launch the cube finder dialog.
method changeType(idfield)
[ Language = javascript ]
This function takes care of certain fields when their values are changed.
method changeUndoState(undostate)
[ Language = javascript ]
Change Undo button state and View button state (opposite of Undo button)
method changeUseSQL()
[ Language = javascript ]
User checked/unchecked the Use SQL field
method 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.
method chooseSCMenu(menuName, commandName, saveFlags)
[ Language = javascript ]
Handle a source control menu selection.
method clearUndoBuffer()
[ Language = javascript ]
method cloneObject(obj, clone)
[ Language = javascript ]
Create a clone of the given object.
method commandBtnTimeout()
[ Language = javascript ]
Timeout for the timer managing the compile button
method compile()
[ Language = javascript ]
Compile the cube.
method constrainDragX(engine, wrapper, intendedX)
[ Language = javascript ]
Callback to limit horizontal resizing
method constrainDragY(engine, wrapper, intendedY)
[ Language = javascript ]
Callback to limit vertical resizing
method createDim(newname, dimtype, sourceprop, caption)
[ Language = javascript ]
Create new dimension. If drag & drop, sourceprop passed in will not be null.
method createHier(newname)
[ Language = javascript ]
Create new hierarchy.
method createLevel(newname, newsource)
[ Language = javascript ]
Create new level If drag & drop, newsource passed in will not be null.
method createListing(newname, fieldName)
[ Language = javascript ]
Create new listing object. If drag & drop, fieldName passed in will not be null.
method createListingField(newname, fieldExpression)
[ Language = javascript ]
Create new listing object. If drag & drop, fieldExpression passed in will not be null.
method createMeasure(newname, newsource, type)
[ Language = javascript ]
Create a new measure. 'type' passed in is 'number', 'date', 'boolean' or 'string'
method createProp(newname, newsource)
[ Language = javascript ]
Create new property. If drag & drop, newsource passed in will not be null.
method createRelationship(newname)
[ Language = javascript ]
Create new relationship object.
method doDocument()
[ Language = javascript ]
Open Documatic page to view all details (if user has not modified anything).
method dropDetailListingFieldExpression(dragData)
[ Language = javascript ]
method editDescription(what)
[ Language = javascript ]
Toggle to show/hide Description textarea; set what's in text into textarea.
method editItem(what)
[ Language = javascript ]
Invoke dialog to edit certain items: RangeExpression, FormatString, SourceProperty, SourceExpression, CubeResource, ListingResource, ListingField.
method enableItem(row, flag)
[ Language = javascript ]
Enable/disable a row in the table.
method endDrag(engine, wrapper)
[ Language = javascript ]
Callback to wrap up window resize event
method fetchCube()
[ Language = javascript ]
This method is called from child pages (reorder) to get a live javaScript object of the cube
method 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.
method 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.
method getCSSForType(type)
[ Language = javascript ]
Find the css class for the given row type.
method getClientModel()
[ Language = javascript ]
Get the jsonProvider object on the client.
method getCubeObject()
[ Language = javascript ]
Return the cube definition object.
method getCurrentName()
[ Language = javascript ]
Return the current name of the class/object being modified.
method getDimName(item, name)
[ Language = javascript ]
Given the base name, return the new name with proper index number
method getHierName(item, name)
[ Language = javascript ]
Given the base name, return the new name with proper index number
method getInheritedCubeObject()
[ Language = javascript ]
Return the cube definition object for the inherited cube.
method getLevName(item, name)
[ Language = javascript ]
Given the base name, return the new name with proper index number
method 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.
method getListName()
[ Language = javascript ]
Return new list name. Starting "New_listing1".
method getListingFieldName(cube, name)
[ Language = javascript ]
Return new list name. Starting "New_listing1".
method getMeaName(item, name)
[ Language = javascript ]
Given the base name, return the new name with proper index number
method getModifiedFactList(specList)
[ Language = javascript ]
Fetch the list of dimensions, measures, and relationships that are known to have been modified
since the last build.
method getPageTitle()
as %String
[ Language = javascript ]
Get the title string to add to the locator row.
This should be implemented in a subclass.
method getPropName(item, name)
[ Language = javascript ]
Given the base name, return the new name with proper index number
method getSelectedItem()
[ Language = javascript ]
Return the current selected item.
method getTimeFunctionsForCalendar(calendar)
[ Language = javascript ]
Report the supported functions for a given calendar.
method getiKnowMeasures()
[ Language = javascript ]
Return a list of iKnow measures
method isClosed(cube, item)
[ Language = javascript ]
method itemIsOverride(item)
[ Language = javascript ]
If it exists, search the inherited cube object for the same
logical definition as item.
method moveItemDown(type, row, index, hier, level, prop)
[ Language = javascript ]
method moveItemUp(type, row, index, hier, level, prop)
[ Language = javascript ]
method newCube()
[ Language = javascript ]
Invoke dialog to add a new cube.
method onDocumentLoadComplete()
[ Language = javascript ]
Callback method invoked after we have successfully loaded the current document.
method onPopupAction(popupName, action, value)
[ Language = javascript ]
This client event is fired when the a popup page launched from this page fires an action.
method onlayoutHandler(load)
[ Language = javascript ]
Adjust sizes of components on the page.
method 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.
method overrideInheritedItem()
[ Language = javascript ]
Called by the Override button to override an inherited item in the local cube definition.
method removeItem(type, row, index, hier, level, prop)
[ Language = javascript ]
Remove a row from the table.
method 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.
method renderTable()
[ Language = javascript ]
Update the contents of the model table.
method reorder()
[ Language = javascript ]
Invoke dialog to reorder certain elements of the model.
method rowClick(type, row)
[ Language = javascript ]
User click on a row in the table.
method rowMouseOut(div)
[ Language = javascript ]
method for when mouse out
method rowMouseOver(element, div)
[ Language = javascript ]
method for when user mouse over a row in the table
method save()
[ Language = javascript ]
Save the cube.
method saveCube()
[ Language = javascript ]
Do save now. This method is called from compile also.
method selectItem(type, row, force)
[ Language = javascript ]
Select a row in the table.
method selectNewItem(newItem, newType)
[ Language = javascript ]
Helper method: select an item, make sure it is visible
and give focus to the details panel.
method setCommandsFromBuildState()
[ Language = javascript ]
This method is responsible for controlling the Compile button's availability
according to the build lock.
method setDataSource(cls)
[ Language = javascript ]
Set the dataSource for the current cube.
method setDetailContentDisabled(setDisabled)
[ Language = javascript ]
This prevents a user from making changes to the item details using the cover pane.
method setFactsModified(value)
[ Language = javascript ]
Set or Clear all isModified flags in the cube definition according to value.
method setModified(flag)
[ Language = javascript ]
Set the modified flag for the page.
method setReadOnly(readOnly)
[ Language = javascript ]
method used by Source Control to set the value of the readOnly flag.
method setViewModeHandler(mode)
[ Language = javascript ]
Do the actual work of updating the view to match the current view mode.
method startDrag(engine, wrapper)
[ Language = javascript ]
Callback to initiate window resize event
method tableDropHandler(dragData)
[ Language = javascript ]
Drop handler for model table.
method toggleDisclosure(key)
[ Language = javascript ]
User click on disclosure icon in table.
method toggleExpand(flag)
[ Language = javascript ]
user clicked Expand All (flag=1) or Collapsed All (flag=0).
method toggleSettings()
[ Language = javascript ]
Toggle display of settings (property tabs) box.
method toggleSource(element, type)
[ Language = javascript ]
method toolAnalyzer()
[ Language = javascript ]
Show analyzer in a new window.
method toolQuery()
[ Language = javascript ]
Show query tool in a new window.
method transformToSQLExpression(expr)
[ Language = javascript ]
method undo()
[ Language = javascript ]
Undo the most recent change.
method updateTable()
[ Language = javascript ]
Update the contents of the model table.
method viewCube()
[ Language = javascript ]
Open CubeView page to view all details (if user has not modified anything).