Home Manual Reference Source

Typedef

Static Public Summary
public

ActionExecution(intentType: StandardIntent | string, intentOptions: Object): Object: function(intenType: IntentType, options: Object): Promise<Object> | Object

The execute function of an Action

public

The metadata of an action.

public

The metadata of a collection of actions implemented in one action.js file.

public
public

Context: Object<EntityType, Array<EntityId> | Array<EntityObject>>

The result of a context query.

public

Callback function to inform an application that the context of an insightProvider has changed.

public

An Object whose keys are the EntityTypes to query and whose values are the ContextQueryOptions for the requested entity.

public

The options for a context query for a specific EntityType.

public

Indicates the return type of the context query.

public
this typedef is experimental.

Enum of context return types.

public

enum of ContextSelector's . Exposed into global namespace sap.pdms.ipro.api.ContextSelector

public

Defines what result set should be returned from a getContext call.

public

An identifier for a single entity.

public

An object which describes an entity.

public

An EntityType as string.

public
this typedef is experimental.

The supported features of an ipro.

public
this typedef was deprecated. In PDMS 1.0 SP00 the application was loading UI5 and NATIVE (other) ipros differently. As of PDMS 1.0 SP02 all ipros are loaded in the same way, hence this information is not required anymore.

the ui framework being used by the ipro.

public
this typedef is experimental. Not actively used by any application as of PDMS 1.0 FP02.

The data input and output for an ipro.

public

The metadata of an ipro.

public

Options for creating an ipro

public

IntentHandler(insightProvider: Object, intentType: StandardIntent | string, intentParams: IntentParams): function(): void

Callback function to inform an application of an intent of an insightProvider.

public

The intent specific parameters.

public
this typedef is experimental. Not actively used by any application or ipro as of PDMS 1.0 FP02.

Allows to restrict the number of entities returned from a context query.

public

The size of an ipro

public

enum for standard intents.

Static Public

public ActionExecution(intentType: StandardIntent | string, intentOptions: Object): Object: function(intenType: IntentType, options: Object): Promise<Object> | Object source

The execute function of an Action

Return:

Object

The return object of an action execution

public ActionMetadata: Object source

The metadata of an action.

Properties:

NameTypeAttributeDescription
execute ActionExecution

The execute function of an action

apiVersion string
  • nullable: false

The API version of an action. This document describes API version "3.0.0". apiVersion adheres to semantic versioning.

public ActionsMetadata: Object<IntentType, ActionMetadata> source

The metadata of a collection of actions implemented in one action.js file.

Example:

Sample ActionsMetadata
{
 sampleAlertAction: {
   execute: function(options() {
     ...
   })
 }
}

public Configuration: Object source

Properties:

NameTypeAttributeDescription
id string

The id of an ipro configuration

public Context: Object<EntityType, Array<EntityId> | Array<EntityObject>> source

The result of a context query. A ContextResult is an object whose keys are EntityTypes and whose values are Arrays of EntityIds or EntityObjects

Example:

Sample context query result
{
 PrimaryObject: ['1000', '1001', '1003'],
 DerivedSignal: [{foo: 'bar'}, {hello: 'world'}]
}

public ContextChangeHandler: function(ipro: InsightProvider, contextQuery: ContextQuery): void source

Callback function to inform an application that the context of an insightProvider has changed. In a typical implementation of this function an application will evaluate which context has changed, call the getContext method of insightProvider to retrieve the new context, and then call setContext of interested ipros to pass in the new context. {Object} insightProvider - The ipro that has changed the context {ContextQuery} contextQuery - The context that has changed.

public ContextQuery: Object<EntityType, ContextQueryOptions> source

An Object whose keys are the EntityTypes to query and whose values are the ContextQueryOptions for the requested entity. In general the ContextQuery expresses which information the application requests from the ipro.

Example:

{PrimaryObject: {selector: sap.pdms.ipro.api.ContextSelector.SELECTED}}

public ContextQueryOptions: Object source

The options for a context query for a specific EntityType.

Properties:

NameTypeAttributeDescription
selector ContextSelector

Choose which slice of the overall ipro context should be returned from getContext call. It's similar to a filter. Is either sap.pdms.ipro.api.ContextSelector.SELECTED or sap.pdms.ipro.api.ContextSelector.ALL.

contextResultType ContextResultType
  • optional

The type / structure an ipro should return for the given contextQuery.

pagination Pagination
  • optional

Allows to limit the resultset size and skip a number of elements in the resultset.

public ContextResultType: string source

Indicates the return type of the context query. Possible values are sap.pdms.ipro.api.ContextReturnType.ID or sap.pdms.ipro.api.ContextReturnType.OBJECT. If sap.pdms.ipro.api.ContextReturnType.OBJECT is specified an array of ids is returned. If sap.pdms.ipro.api.ContextReturnType.OBJECT is specified an array of plain JavaScript objects is returned.

public ContextReturnType: Object source

this typedef is experimental.

Enum of context return types. Exposed into global namespace sap.pdms.ipro.api.ContextReturnType

Properties:

NameTypeAttributeDescription
ID string

return only the id of the requested entities. E.g. ['ID1001','ID2000']

OBJECT string

return information about the entity itself as object. e.g. [{id:'ID1001', name: 'train xyz'}, {id: 'ID2002', name: 'train foo'}]

public ContextSelector: Object source

enum of ContextSelector's . Exposed into global namespace sap.pdms.ipro.api.ContextSelector

Properties:

NameTypeAttributeDescription
SELECTED string

return only selected items in a given context

ALL string

return all items in a given context

public ContextSelector: string source

Defines what result set should be returned from a getContext call. Possible values are: sap.pdms.ipro.api.ContextSelector.SELECTED or sap.pdms.ipro.api.ContextSelector.ALL. sap.pdms.ipro.api.ContextSelector.SELECTED indicates that the ipro is supposed to return all entities that are currently selected usually through a user interaction. E.g. In table based ipro this refers normally to the selected rows or more specifically the context of those selected rows (e.g. all primaryObjectsIds associated with the selected context). sap.pdms.ipro.api.ContextSelector.ALL indicates that the ipro is supposed to return all entities.

public EntityId: string source

An identifier for a single entity. E.g. an asset with id LC-5001.

public EntityObject: Object source

An object which describes an entity. The object structure is specific to every EntityType.

public EntityType: string source

An EntityType as string. E.g. Asset, DerivedSignal.

public Feature: Object source

this typedef is experimental.

The supported features of an ipro.

Properties:

NameTypeAttributeDescription
pagination boolean
  • optional

public Framework: Object source

this typedef was deprecated. In PDMS 1.0 SP00 the application was loading UI5 and NATIVE (other) ipros differently. As of PDMS 1.0 SP02 all ipros are loaded in the same way, hence this information is not required anymore.

the ui framework being used by the ipro. Exposed into global namespace sap.pdms.ipro.api.Framework

Properties:

NameTypeAttributeDescription
UI5 string

when using sapui5.

NATIVE string

when using any other framework than ui5.

public InsightProviderDataInterface: Object source

this typedef is experimental. Not actively used by any application as of PDMS 1.0 FP02.

The data input and output for an ipro. Whenever the context for an EntityType listed in input has changed the application will call the ipro setContext method to pass in the new context. By adding a EntityType to output an ipro signals to an application that it might change the context for that EntityType. Declaring input and output enables an application to discover possible data flows between ipros. An output context of one ipro can be declared as an input context of another. Declaring a InsightProviderDataInterface is optional. If not declared the following InsightProviderDataInterface is assumed by default:

{
 input: ['PrimaryObject'],
 output: ['PrimaryObject']
}

Properties:

NameTypeAttributeDescription
input Array<EntityType>
  • optional
output Array<EntityType>
  • optional

public InsightProviderMetadata: Object source

The metadata of an ipro.

Properties:

NameTypeAttributeDescription
apiVersion string
  • nullable: false

The API version of an ipro ui. This document describes API version "3.0.0". apiVersion adheres to semantic versioning.

type string
  • nullable: false

The unique type id of an ipro. This should match the ID field in the mtad.yaml file. E.g. com.sap.pdms.ipro.api.3dviz.

uiFramework string
  • optional

defines the ui framework used by the implementation. Possible values are sap.pdms.ipro.api.Framework.NATIVE (default) and sap.pdms.ipro.api.Framework.UI5.

dataInterface InsightProviderDataInterface
  • optional

<Experimental> Defines the data interface of an ipro.

features Feature
  • optional

<Experimental> The supported features of an ipro.

preferredSize Size
  • optional

<Experimental> The preferred size of an ipro.

public InsightProviderOptions: Object source

Options for creating an ipro

Properties:

NameTypeAttributeDescription
baseUrl string

The base url of the ipro. This is the absolute path or url under which the ipro.js is externally exposed via pdms-router. For example if the ipro.js is exposed under /ipro/work-activity/ipro.js baseUrl shall contain /ipro/work-activity. Commonly baseUrl will contain the path taken from serviceUrl which the ipro used to register at service catalog. An ipro's UI can use the baseUrl to load assets / files relative to it's own ipro.js location. E.g. baseUrl + '/assets/mycss.csswill resolve to/ipro/work-activity/assets/mycss.css. It's the applications' responsibility to determine thebaseUrl` of an ipro and pass it in as option for the construction of the ipro.

size Size
  • optional

The size of an ipro inside an application. This is the size the application 'asks' the ipro to render itself, so that it exactly fits in the uiContainer provided by the application.

locale string
  • optional

The locale which an ipro is supposed to use. If not provided the ipro has to determine the locale by itself or use an ipro specific default.

uiContainer Element

The DOM element into which the ipro is requested to render / place itself.

config Configuration
  • optional

The requested configuration / variant of the ipro.

variantId string
  • optional

The variantId an ipro should load. This is to be consumed by variant management enabled ipros. Variant management enabled ipros should not consume the older config.id property anymore!

contextChangeHandler ContextChangeHandler
  • optional

(deprecated) The contextChangeHandler callback function.

intentHandler IntentHandler
  • optional

(deprecated) The intentHandler callback function (depricated with v2.1.0).

intentManager IntentManager
  • optional

intentManager to execute intents.

public IntentHandler(insightProvider: Object, intentType: StandardIntent | string, intentParams: IntentParams): function(): void source

Callback function to inform an application of an intent of an insightProvider. An intent is an action that an ipro wants to trigger without knowing the exact details of that action. The one intent currently being defined is sap.pdms.ipro.api.StandardIntent.NAVIGATE_TO_CONTEXT. For instance, an ipro might expose a "Details" button to allow the user to navigate to the details page for a given EntityType. The ipro does not know what would be a suitable details page for this EntityType. So it communicates to the application the intent to navigate and then it is up to the application to implement the actual navigation. An intent can be thought of as an action whose implementation details are unknown to the ipro and thus represents an additional level of decoupling between actors expressing an intent and actors reacting to it.

public IntentParams: any source

The intent specific parameters. The expected parameter structure has to be defined by the intent type.

Example:

Parameter for an intent of type `sap.pdms.ipro.api.StandardIntent.NAVIGATE_TO_CONTEXT`
{PrimaryObject: '1001'}

public Pagination: Object source

this typedef is experimental. Not actively used by any application or ipro as of PDMS 1.0 FP02.

Allows to restrict the number of entities returned from a context query. This parameter implies that the context query results are returned in a specific order.

Properties:

NameTypeAttributeDescription
skip number

Specifies the number of entities according to that order of the list.

top number

Defines the offset.

public Size: Object source

The size of an ipro

Properties:

NameTypeAttributeDescription
width number
height number

public StandardIntent: Object source

enum for standard intents. Exposed into global namespace sap.pdms.ipro.api.StandardIntent

Properties:

NameTypeAttributeDescription
NAVIGATE_TO_CONTEXT string

navigation intent

NAVIGATE_TO_TARGET string

navigation intent for specified target

PROMOTE_CONTEXT string

intent to promote of context to other ipros

WORKACTIVITY_CREATE string

intent to create work activity

SCHEDULE_MAINTENANCE string

intent to schedule maintenance