IRISLIB database
AbstractKPI Class Reference

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

Inheritance diagram for AbstractKPI:
Collaboration diagram for AbstractKPI:

Static Public Member Functions

_.Library.Status OnPage ()
 Draw the test page.
 
- Static Public Member Functions inherited from Page
_.Library.Status ConvertParameter (_.Library.String url, _.Library.String name, _.Library.String value)
 You pass this the <parameter>url</parameter> of the page you are going to and a. More...
 
_.Library.Binary Decrypt (_.Library.String data)
 Decrypts the input string using the session.Key value that is unique to. More...
 
_.Library.String Encrypt (_.Library.Binary data)
 Encrypts the input string using the session.Key value that is unique to this. More...
 
_.Library.String EscapeHTML (in)
 This method converts input HTML text into Escaped HTML text.
 
_.Library.String EscapeURL (_.Library.String in, _.Library.String charset)
 This method converts the in input URL string into Escaped URL string. More...
 
_.Library.String HyperEventCall (_.Library.String methodName, _.Library.String args, _.Library.Integer type, _.Library.Boolean mobile)
 This method returns the string that needs to be written to the current. More...
 
_.Library.String HyperEventHead (_.Library.Boolean iframeOnly, _.Library.Boolean strict, _.Library.Boolean optionalBroker)
 This method returns the string that needs to be written to the current. More...
 
 Include (_.Library.String url)
 Include another csp page or file in the output at this point. More...
 
_.Library.String InsertHiddenField (_.Library.String url, _.Library.String name, _.Library.String value, _.Library.String extra)
 Inserts a '<input type="hidden" name="Name" value="Value">' tag into the current document. More...
 
_.Library.String InsertHiddenFields (_.Library.String url, _.Library.String query)
 Return the string containing the hidden form tags. More...
 
_.Library.Boolean IsPrivate ()
 Returns 1 if this page is in fact a private page (see <parameter>PRIVATE</parameter>).
 
_.Library.String Link (_.Library.String link, _.Library.String query, _.Library.Boolean addQ)
 Tranforms the link specified by link into a URL and returns it as a string. More...
 
_.Library.Status OnHTTPHeader (_.Library.Boolean OutputBody)
 Event handler for PAGE event: this is invoked in order to
More...
 
 OnPageError (_.Library.Status sc)
 Event handler for any error that occurs on the page. More...
 
 OnPostHTTP ()
 Event handler for POSTPAGE event: this is invoked after the data. More...
 
_.Library.Status OnPostHyperEvent (_.Library.String class, _.Library.String method)
 Event handler which is invoked after a hyperevent method is called on this page.
 
_.Library.Boolean OnPreHTTP ()
 Event handler for PreHTTP event: this is invoked before. More...
 
_.Library.Status OnPreHyperEvent (_.Library.String class, _.Library.String method)
 Event handler which is invoked before a hyperevent method is called on this page. More...
 
_.Library.Status Page (_.Library.Boolean skipheader)
 Process a request to serve a CSPPage. More...
 
_.Library.String QuoteJS (in)
 This method converts input string into quoted JavaScript literal.
 
_.Library.String RewriteURL (_.Library.String url)
 This method will rewrite a URL to use #url()# if needed.
 
 ShowError (_.Library.Status sc)
 Display a <class>Status</class> error code to the CSP Page.
 
 StartTimer (_.Library.String name)
 Used to get performance information on your CSP pages. More...
 
 StopTimer (_.Library.String name)
 Used to time performance information on your CSP pages. More...
 
 ThrowError (_.Library.Status sc)
 Passed a <class>Status</class> code this goes to the error page passing this status code.
 
_.Library.String UnescapeHTML (in)
 This method converts Escaped HTML text into normal HTML text.
 
_.Library.String UnescapeURL (_.Library.String in, _.Library.String charset)
 This method converts the in Escaped URL string back to its original form. More...
 

Static Public Attributes

 FORCECOMPUTE = None
 If true, always recompute the value of this KPI when used within an MDX query. More...
 
 PUBLIC = None
 If true, this KPI is available for public use within dashboard (subject also. More...
 
 READONLYMODEL = None
 KPI cannot be modified from a client (part of DataModel API).
 
 RESOURCE = None
 The resource needed to use this KPI:
More...
 
- Static Public Attributes inherited from Page
 CHARSET = None
 The <CLASS>CSP.Page</CLASS> object serves as an event handler for CSP requests. More...
 
 CONTENTTYPE = None
 Specifies the default content type for the page. More...
 
 CONVERTINPUTSTREAM = None
 Specifies if input request.Content or request.MimeData values are converted from their. More...
 
 CSPFILE = None
 If this page was compiled from a .csp file, then this parameter contains the. More...
 
 CSPSTRICT = None
 The CSPSTRICT parameter is set to 1, if the DOCTYPE indicates that this. More...
 
 CSPURL = None
 This parameter is used to make sure that if multiple. More...
 
 CSPXHTML = None
 The CSPXHTML parameter is set to 1, if the DOCTYPE indicates that this. More...
 
 DOMAIN = None
 The default domain for csp:text, span and div tags. More...
 
 ENCODED = None
 Controls how the query parameters for this page are passed, it can. More...
 
 ERRORPAGE = None
 Specify a custom error page to call if there are any problems with generating this page. More...
 
 EXPIRES = None
 Specified the default value for the response.Expires. More...
 
 NOCHARSETCONVERT = None
 Specifies if we wish to turn off charset conversion for this page. More...
 
 PAGETIMING = None
 If this parameter is true then we automatically record timing statistics of how long it takes to. More...
 
 PRIVATE = None
 Controls the access to the page, it can be set to one of the following:
More...
 
 SECURITYRESOURCE = None
 This is a comma-delimited list of system Resources and associated. More...
 
 TIMINGSLOTS = None
 Used by the timing to decide how many slots a day should be divided up into. More...
 
 UseSession = None
 This parameter controls the CSP session support. More...
 
- Static Public Attributes inherited from ObjectDataModel
 DOMAIN = None
 This class is used to implement the Model portion of the Zen Model-View-Controller mechanism. More...
 
 DYNAMICPROPERTIES = None
 If true (the default), then this dataModel class supports dynamic properties: More...
 
- Static Public Attributes inherited from DataModel
 READONLYMODEL = None
 This is the abstract base class used by all model classes within the Zen Model-View-Controller mechanism. More...
 
- Static Public Attributes inherited from RegisteredObject
 CAPTION = None
 Optional name used by the Form Wizard for a class when generating forms. More...
 
 JAVATYPE = None
 The Java type to be used when exported.
 
 PROPERTYVALIDATION = None
 This parameter controls the default validation behavior for the object. More...
 

Private Member Functions

 ApplyDefaults ()
 Apply property defaults from the KPI model.
 
_.Library.String GetFilterKey ()
 Utility method. More...
 
_.Library.Status OnExecute ()
 Get data for this KPI manually. More...
 
_.Library.Status OnLoadKPI ()
 Notify subclass that KPI is has just be executed. More...
 
_.Library.Status OnLoadModel (_.Library.RegisteredObject pSource)
 This callback method does the actual work of loading values from the source object.
 

Static Private Member Functions

_.Library.Boolean CheckResource ()
 Test if the current user has access to this KPI.
 
_.Library.Status ClearKPICache ()
 Utility method. More...
 
_.Library.Status CreateKPIController (_.ZEN.Auxiliary.dataController pController, _.Library.String pKPIName, _.Library.String pFilters, _.Library.String pCellContext, _.Library.String pParentQueryKey)
 Set up the context for and execute this KPI. More...
 
_.Library.String GetFilterDisplayValue (_.Library.String pFilter, _.Library.String pValue, _.Library.String pDataSourceName)
 Given a filter and its logical value, return its display value.
 
_.Library.String GetFilterLogicalValue (_.Library.String pFilter, _.Library.String pText, _.Library.String pDataSourceName, pFilterValues)
 Given a filter and its display value (pText), return its logical value. More...
 
_.Library.String GetKPICaption ()
 Return the caption for this KPI. More...
 
_.Library.String GetKPICaptionName (_.Library.String pName)
 Return the caption as defined in the XML for this KPI.
 
_.Library.String GetKPIClassTimeStamp ()
 Return the last modified date for this KPI class.
 
_.Library.String GetKPIName (_.Library.String pName)
 Return the logical name in its original form for this KPI. More...
 
_.Library.String GetKPIPropertyCaption (_.Library.String pProperty)
 Return the display name for a property within this KPI.
 
_.Library.Status GetKPIValue (_.Library.String pKPIName, _.Library.String pValue, _.Library.String pKPIProperty, _.Library.String pSeries, _.Library.String pFilters, _.Library.String pCellContext, _.Library.String pCacheKey, _.Library.Integer pPctComplete, _.Library.String pParentQueryKey, _.Library.Status pKPIStatus)
 Get a specific value from this KPI. More...
 
_.Library.Status GetKPIValueArray (_.Library.String pKPIName, _.Library.String pValues, _.Library.List pPropertyList, _.Library.String pFilters)
 Get an array of values from this KPI. More...
 
_.Library.String GetSourceType ()
 Return the sourceType for this KPI.
 
_.Library.Boolean IsAsync ()
 Return true if this kpi should be computed asynchronously (for plug-ins).
 
_.Library.String IsCacheable ()
 Return the cube this KPI is based on.
 
_.Library.Boolean IsPublic ()
 Return true if this KPI is public.
 
_.Library.Status OnDashboardAction (_.Library.String pAction, _.ZEN.proxyObject pContext, _.Library.String pDataSourceName)
 This callback is invoked from a dashboard when an action defined by this dashboard is invoked. More...
 
_.Library.Status OnGetActionList (_.Library.List pActions, _.Library.String pDataSourceName)
 Callback to get additional actions for a KPI. More...
 
_.Library.Status OnGetFilterList (_.Library.List pFilters, _.Library.String pDataSourceName)
 Callback to get additional possible filters for this KPI. More...
 
_.Library.Status OnGetFilterMembers (_.Library.String pFilter, _.Library.List pMembers, _.Library.String pSearchKey, _.Library.String pDataSourceName, _.Library.String pFilterValues)
 Callback to get additional members for a KPI filter. More...
 
_.Library.String OnGetKPICaption ()
 This callback can return the (localized) caption for this KPI.
 
_.Library.Status OnGetKPIPropertyInfo (_.Library.String pList, _.Library.Integer pPropNo, _.Library.String pModelId)
 Add additional properties beyond those defined in the KPI block. More...
 
_.Library.Status OnGetListingResultSet (_.Library.String pFilters, _.Library.String pSelection, _.Library.String pListingName, _.SQL.StatementResult pRS)
 This callback, if implemented, can prepare and execute. More...
 
_.Library.String OnGetListingSQL (_.Library.String pFilters, _.Library.String pSelection, _.Library.String pListingName)
 This callback, if implemented, returns the text of an SQL query used to provide. More...
 
_.Library.Status OnGetPropertyInfo (_.Library.Integer pIndex, _.Library.String pList, _.Library.Boolean pExtended, _.Library.String pModelId)
 Return list of properties. More...
 
_.Library.Status PrintValue (_.Library.String pKPIProperty, _.Library.String pSeries, _.Library.String pFilters, _.Library.Boolean pAsync)
 Get the value of the given KPI property and print it to the console. More...
 

Additional Inherited Members

- Public Member Functions inherited from RegisteredObject
_.Library.Status OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount)
 This callback method is invoked when the current object is added to the SaveSet,. More...
 
_.Library.Status OnClose ()
 This callback method is invoked by the <METHOD>Close</METHOD> method to. More...
 
_.Library.Status OnConstructClone (_.Library.RegisteredObject object, _.Library.Boolean deep, _.Library.String cloned)
 This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More...
 
_.Library.Status OnNew ()
 This callback method is invoked by the <METHOD>New</METHOD> method to. More...
 
_.Library.Status OnValidateObject ()
 This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More...
 

Detailed Description

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

Member Function Documentation

◆ ClearKPICache()

_.Library.Status ClearKPICache ( )
staticprivate

Utility method.

Clear all KPI cache entries for this KPI.

◆ CreateKPIController()

_.Library.Status CreateKPIController ( _.ZEN.Auxiliary.dataController  pController,
_.Library.String  pKPIName,
_.Library.String  pFilters,
_.Library.String  pCellContext,
_.Library.String  pParentQueryKey 
)
staticprivate

Set up the context for and execute this KPI.

Return the instance of data controller used to drive the KPI.

◆ GetFilterKey()

_.Library.String GetFilterKey ( )
private

Utility method.

Compute a hash code based on the current filter values for this KPI. This is used for caching KPI results.

◆ GetFilterLogicalValue()

_.Library.String GetFilterLogicalValue ( _.Library.String  pFilter,
_.Library.String  pText,
_.Library.String  pDataSourceName,
  pFilterValues 
)
staticprivate

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.

◆ GetKPICaption()

_.Library.String GetKPICaption ( )
staticprivate

Return the caption for this KPI.


This is either: (a) the value returned by <method>OnGetKPICaption</method>, (b) the value of the caption attribute in the KPI definition, or (c) the name of the KPI, in that order.

◆ GetKPIName()

_.Library.String GetKPIName ( _.Library.String  pName)
staticprivate

Return the logical name in its original form for this KPI.

pName is the canonic form of the name.

Reimplemented in KPIWorksheet, and KPI.

◆ GetKPIValue()

_.Library.Status GetKPIValue ( _.Library.String  pKPIName,
_.Library.String  pValue,
_.Library.String  pKPIProperty,
_.Library.String  pSeries,
_.Library.String  pFilters,
_.Library.String  pCellContext,
_.Library.String  pCacheKey,
_.Library.Integer  pPctComplete,
_.Library.String  pParentQueryKey,
_.Library.Status  pKPIStatus 
)
staticprivate

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.

◆ GetKPIValueArray()

_.Library.Status GetKPIValueArray ( _.Library.String  pKPIName,
_.Library.String  pValues,
_.Library.List  pPropertyList,
_.Library.String  pFilters 
)
staticprivate

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
.

◆ OnDashboardAction()

_.Library.Status OnDashboardAction ( _.Library.String  pAction,
_.ZEN.proxyObject  pContext,
_.Library.String  pDataSourceName 
)
staticprivate

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.

Reimplemented in BaseKPI.

◆ OnExecute()

_.Library.Status OnExecute ( )
private

Get data for this KPI manually.

This is implemented by subclasses that provide manual data.

Reimplemented in SourceListFilterKPI, GenericKPI, and KPI.

◆ OnGetActionList()

_.Library.Status OnGetActionList ( _.Library.List  pActions,
_.Library.String  pDataSourceName 
)
staticprivate

Callback to get additional actions for a KPI.

This takes the form:
pActions($I(pActions))=$LB(name,caption)

Reimplemented in BaseKPI.

◆ OnGetFilterList()

_.Library.Status OnGetFilterList ( _.Library.List  pFilters,
_.Library.String  pDataSourceName 
)
staticprivate

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)

Reimplemented in SourceListFilterKPI, GenericKPI, BaseKPI, and KPI.

◆ OnGetFilterMembers()

_.Library.Status OnGetFilterMembers ( _.Library.String  pFilter,
_.Library.List  pMembers,
_.Library.String  pSearchKey,
_.Library.String  pDataSourceName,
_.Library.String  pFilterValues 
)
staticprivate

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.

Reimplemented in KPIPlugIn.

◆ OnGetKPIPropertyInfo()

_.Library.Status OnGetKPIPropertyInfo ( _.Library.String  pList,
_.Library.Integer  pPropNo,
_.Library.String  pModelId 
)
staticprivate

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.

Reimplemented in SourceListFilterKPI, GenericKPI, KPIWorksheet, and KPI.

◆ OnGetListingResultSet()

_.Library.Status OnGetListingResultSet ( _.Library.String  pFilters,
_.Library.String  pSelection,
_.Library.String  pListingName,
_.SQL.StatementResult  pRS 
)
staticprivate

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.

Reimplemented in GenericKPI, and KPI.

◆ OnGetListingSQL()

_.Library.String OnGetListingSQL ( _.Library.String  pFilters,
_.Library.String  pSelection,
_.Library.String  pListingName 
)
staticprivate

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 <method>OnGetListingResultSet</method> method. It takes precedence over the <method>OnGetListingResultSet</method> method.

Reimplemented in KPI.

◆ OnGetPropertyInfo()

_.Library.Status OnGetPropertyInfo ( _.Library.Integer  pIndex,
_.Library.String  pList,
_.Library.Boolean  pExtended,
_.Library.String  pModelId 
)
staticprivate

Return list of properties.

This is part of the DataModel API; this version returns the set of properties

defined by this KPI.

◆ OnLoadKPI()

_.Library.Status OnLoadKPI ( )
private

Notify subclass that KPI is has just be executed.

This is a good place to override properties, such as range and threshold.

Reimplemented in KPIWorksheet, and KPIPlugIn.

◆ PrintValue()

_.Library.Status PrintValue ( _.Library.String  pKPIProperty,
_.Library.String  pSeries,
_.Library.String  pFilters,
_.Library.Boolean  pAsync 
)
staticprivate

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).

Member Data Documentation

◆ FORCECOMPUTE

FORCECOMPUTE = None
static

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.

◆ PUBLIC

PUBLIC = None
static

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.

◆ RESOURCE

RESOURCE = None
static

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.