Home > Class Reference > ENSLIB namespace > %DeepSee.AbstractKPI

%DeepSee.AbstractKPI

abstract class %DeepSee.AbstractKPI extends %CSP.Page, %ZEN.DataModel.ObjectDataModel, %DeepSee.QuerySource

This is a common base class to different types of KPI.

Property Inventory

Method Inventory

Parameters

parameter FORCECOMPUTE = 0;
If true, always recompute the value of this KPI when used within an MDX query.
Typically a KPI (especially a plug-in) used within an MDX query does not need to be recalculated unless the class defining the KPI is recompiled. For KPIs that depend on external data, it may be convenient to always recompute the KPI value. Setting this parameter to true has the same effect as recompiling the KPI class before each use.
parameter PUBLIC = 1;
If true, this KPI is available for public use within dashboard (subject also to the RESOURCE parameter).
If false it is not listed as an available KPI within the dashboard tools, but it can be used within pivot tables and may be visible within the Analyzer.
parameter READONLYMODEL = 1;
KPI cannot be modified from a client (part of DataModel API).
parameter RESOURCE;
The resource needed to use this KPI:
If defined and the current user holds the USE privilege on this resource, then the user may view (run queries against) this item.

Properties

property %filterValues as %ZEN.proxyObject (ZENHIDDEN = 1);
Proxy object containing filter values from the client.
Property methods: %filterValuesGet(), %filterValuesGetSwizzled(), %filterValuesIsValid(), %filterValuesNewObject(), %filterValuesSet()
property %fromCache as %String (ZENHIDDEN = 1) [ InitialExpression = 0 ];
Set true if the current results are from the cache.
Property methods: %fromCacheDisplayToLogical(), %fromCacheGet(), %fromCacheIsValid(), %fromCacheLogicalToDisplay(), %fromCacheLogicalToOdbc(), %fromCacheNormalize(), %fromCacheSet()
property %message as %String (ZENHIDDEN = 1);
Message to be displayed by dashboard widget.
Property methods: %messageDisplayToLogical(), %messageGet(), %messageIsValid(), %messageLogicalToDisplay(), %messageLogicalToOdbc(), %messageNormalize(), %messageSet()
property %rangeLower as %Double (ZENHIDDEN = 1);
Lower range value for any meters connected to this KPI.
Property methods: %rangeLowerDisplayToLogical(), %rangeLowerGet(), %rangeLowerIsValid(), %rangeLowerLogicalToDisplay(), %rangeLowerNormalize(), %rangeLowerOdbcToLogical(), %rangeLowerSet()
property %rangeUpper as %Double (ZENHIDDEN = 1);
Upper range value for any meters connected to this KPI.
Property methods: %rangeUpperDisplayToLogical(), %rangeUpperGet(), %rangeUpperIsValid(), %rangeUpperLogicalToDisplay(), %rangeUpperNormalize(), %rangeUpperOdbcToLogical(), %rangeUpperSet()
property %thresholdLower as %Double (ZENHIDDEN = 1);
Lower threshold value for any meters connected to this KPI.
Property methods: %thresholdLowerDisplayToLogical(), %thresholdLowerGet(), %thresholdLowerIsValid(), %thresholdLowerLogicalToDisplay(), %thresholdLowerNormalize(), %thresholdLowerOdbcToLogical(), %thresholdLowerSet()
property %thresholdUpper as %Double (ZENHIDDEN = 1);
Upper threshold value for any meters connected to this KPI.
Property methods: %thresholdUpperDisplayToLogical(), %thresholdUpperGet(), %thresholdUpperIsValid(), %thresholdUpperLogicalToDisplay(), %thresholdUpperNormalize(), %thresholdUpperOdbcToLogical(), %thresholdUpperSet()

Methods

method %ApplyDefaults() [ Language = objectscript ]
Apply property defaults from the KPI model.
classmethod %CheckResource() as %Boolean [ Language = objectscript ]
Test if the current user has access to this KPI.
classmethod %ClearKPICache() as %Status [ Language = objectscript ]
Utility method. Clear all KPI cache entries for this KPI.
classmethod %CreateKPIController(Output pController As %ZEN.Auxiliary.dataController, pKPIName As %String, ByRef pFilters As %String, pCellContext As %String = "", pParentQueryKey As %String = "") as %Status [ Language = objectscript ]
Set up the context for and execute this KPI. Return the instance of data controller used to drive the KPI.
classmethod %GetFilterDisplayValue(pFilter As %String, pValue As %String, pDataSourceName As %String = "") as %String [ Language = objectscript ]
Given a filter and its logical value, return its display value.
method %GetFilterKey() as %String [ Language = objectscript ]
Utility method. Compute a hash code based on the current filter values for this KPI. This is used for caching KPI results.
classmethod %GetFilterLogicalValue(pFilter As %String, pText As %String, pDataSourceName As %String = "", ByRef pFilterValues) as %String [ Language = objectscript ]
Given a filter and its display value (pText), return its logical value. If there is not a one-to-one correspondence for logic and display values, then the result of this call is indeterminate.
final classmethod %GetKPICaption() as %String [ Language = objectscript ]
Return the caption for this KPI.
This is either: (a) the value returned by %OnGetKPICaption(), (b) the value of the caption attribute in the KPI definition, or (c) the name of the KPI, in that order.
classmethod %GetKPICaptionName(pName As %String = "") as %String [ Language = objectscript ]
Return the caption as defined in the XML for this KPI.
classmethod %GetKPIClassTimeStamp() as %String [ Language = objectscript ]
Return the last modified date for this KPI class.
classmethod %GetKPIName(pName As %String = "") as %String [ Language = objectscript ]
Return the logical name in its original form for this KPI. pName is the canonic form of the name.
classmethod %GetKPIPropertyCaption(pProperty As %String) as %String [ Language = objectscript ]
Return the display name for a property within this KPI.
classmethod %GetKPIValue(pKPIName As %String, Output pValue As %String, pKPIProperty As %String = "", pSeries As %String = "", ByRef pFilters As %String, pCellContext As %String = "", ByRef pCacheKey As %String, Output pPctComplete As %Integer, pParentQueryKey As %String = "", Output pKPIStatus As %Status) as %Status [ Language = objectscript ]
Get a specific value from this KPI.
This is best used with simple KPIs implemented in manual mode as it can be expensive otherwise.
On return, pPctComplete indicates whether this value is completely computed (100) or in progress (that is, it is being computed by a background agent).
pCacheKey is the cache key associated with this request in the case of an asynchronous KPI. This is returned by reference.
pFilters is an array of filters and their (display) values.
pCellContext is the cell context passed in by the %KPI function.
classmethod %GetKPIValueArray(pKPIName As %String, Output pValues As %String, pPropertyList As %List, ByRef pFilters As %String) as %Status [ Language = objectscript ]
Get an array of values from this KPI.
pPropertyList is a $List of property names: $LB(prop1,prop2). On return, pValues contains an array of values of the properties listed in pPropertyList: pValues(n) = $LB(prop1,prop2)
Use "%series" in property list to get the series name
.
classmethod %GetSourceType() as %String [ Language = objectscript ]
Return the sourceType for this KPI
classmethod %IsAsync() as %Boolean [ Language = objectscript ]
Return true if this kpi should be computed asynchronously (for plug-ins).
classmethod %IsCacheable() as %String [ Language = objectscript ]
Return the cube this KPI is based on.
classmethod %IsPublic() as %Boolean [ Language = objectscript ]
Return true if this KPI is public.
classmethod %OnDashboardAction(pAction As %String, pContext As %ZEN.proxyObject, pDataSourceName As %String = "") as %Status [ Language = objectscript ]
This callback is invoked from a dashboard when an action defined by this dashboard is invoked.
pAction is the logical name of the action.
pContext is a proxy object that contains various information about the action and provides a way for the method to return information to the client.
method %OnExecute() as %Status [ Language = objectscript ]
Get data for this KPI manually. This is implemented by subclasses that provide manual data.
classmethod %OnGetActionList(ByRef pActions As %List, pDataSourceName As %String = "") as %Status [ Language = objectscript ]
Callback to get additional actions for a KPI. This takes the form:
pActions($I(pActions))=$LB(name,caption)
classmethod %OnGetFilterList(Output pFilters As %List, pDataSourceName As %String = "") as %Status [ Language = objectscript ]
Callback to get additional possible filters for this KPI. This drives the list of filter selections for widget connected to this KPI. This takes the form:
pFilters($I(pFilters))=$LB(name,caption,value,multiSelect,dependsOn)
classmethod %OnGetFilterMembers(pFilter As %String, Output pMembers As %List, pSearchKey As %String = "", pDataSourceName As %String = "", ByRef pFilterValues As %String) as %Status [ Language = objectscript ]
Callback to get additional members for a KPI filter. This takes the form:
pMembers($I(pMembers))=$LB(text,value)
pSearchKey is the search key entered by the user, if applicable.
pFilterValues is an array of all current filter values.
classmethod %OnGetKPICaption() as %String [ Language = objectscript ]
This callback can return the (localized) caption for this KPI.
classmethod %OnGetKPIPropertyInfo(ByRef pList As %String, pPropNo As %Integer, pModelId As %String = "") as %Status [ Language = objectscript ]
Add additional properties beyond those defined in the KPI block. This takes the form:
pList(n) = name
pList(n,"defaultValue") = value
pList(n,"columnNo") = #
pPropNo is the number of next open slot in the list.
classmethod %OnGetListingResultSet(ByRef pFilters As %String, ByRef pSelection As %String, pListingName As %String = "", Output pRS As %SQL.StatementResult) as %Status [ Language = objectscript ]
This callback, if implemented, can prepare and execute a listing query used to provide a "detail listing" for this KPI. pFilters is an array of current filter values.
pListingName is the name of the listing to display. This is reserved for future use.
classmethod %OnGetListingSQL(ByRef pFilters As %String, ByRef pSelection As %String, pListingName As %String = "") as %String [ Language = objectscript ]
This callback, if implemented, returns the text of an SQL query used to provide a "detail listing" for this KPI.
pFilters is an array of current filter values: pFilters(name)=value.
pSelection is an array containing information about the current selected items in the pivot. It contains 2 values:
pSelection("selectedRange") contains the current selected cells in the pivot as a string in the form "startRow,startCol,endRow,endCol" (1-based). "" if no cells are selected.
pSelection("rowValues") contains a csv-list of "row" values for the selected rows in the pivot (similar to the $$$VALUELIST value used for OpenWindow URLs. This may contain "\," for "," within the data values.
pListingName is the name of the listing to display. This is reserved for future use.
This method is simply a convenient alternative to the %OnGetListingResultSet() method. It takes precedence over the %OnGetListingResultSet() method.
final classmethod %OnGetPropertyInfo(pIndex As %Library.Integer, ByRef pList As %Library.String, pExtended As %Library.Boolean = 0, pModelId As %Library.String = "", pContainer As %Library.String = "") as %Status [ Language = objectscript ]
Return list of properties. This is part of the DataModel API; this version returns the set of properties defined by this KPI.
method %OnLoadKPI() as %Status [ Language = objectscript ]
Notify subclass that KPI is has just be executed. This is a good place to override properties, such as range and threshold.
method %OnLoadModel(pSource As %RegisteredObject) as %Status [ Language = objectscript ]
This callback method does the actual work of loading values from the source object.
classmethod %PrintValue(pKPIProperty As %String = "", pSeries As %String = "", ByRef pFilters As %String, pAsync As %Boolean = 0) as %Status [ Language = objectscript ]
Get the value of the given KPI property and print it to the console.
This is provided as a diagnostic aid for KPIs. The KPI is forced to execute in the foreground, even if it is defined to be asynchronous, unless pAsync is set to true (1).
classmethod OnPage() as %Status [ Language = objectscript ]
Draw the test page.

Inherited Members

Inherited Properties

Inherited Methods

Subclasses