Fdc3Api

View as Markdown

FDC3 intents and context raised from a grid row, and checks for standard FDC3 types.

TypeScript
export interface

Methods

MethodReturnsDescription
broadcastFromPrimaryKey(primaryKeyValue, contextType, channel)Promise<void> | undefinedBroadcasts the given Context from the given Row Node with the given Primary Key Value
broadcastFromRow(rowNode, contextType, channel)Promise<void>Broadcasts the given Context from the given Row Node
buildContextDataForPrimaryKey(contextType, primaryKeyValue)Context | undefinedBuilds FDC3 Context Data based on the given Context Type and the Row Node with the given Primary Key Value
buildContextDataFromRow(contextType, rowNode)ContextBuilds FDC3 Context Data based on the given Context Type and Row Node
getContextLabel(contextType)stringReturns the human-friendly label for the given Context Type
getDesktopAgent()DesktopAgentReturns the FDC3 Desktop Agent
isStandardContextType(contextType)booleanWhether this context type is one of the FDC3 standard types.
isStandardIntentType(intentType)booleanWhether this intent is one of the FDC3 standard intents.
raiseIntentForContextFromPrimaryKey(primaryKeyValue, contextType, appIdentifier)Promise<IntentResolution> | undefinedFinds and raises an Intent based on the given Context from the given Row Node with the given Primary Key Value
raiseIntentForContextFromRow(rowNode, contextType, appIdentifier)Promise<IntentResolution>Finds and raises an Intent based on the given Context from the given Row Node
raiseIntentFromPrimaryKey(primaryKeyValue, intent, contextType, appIdentifier)Promise<IntentResolution> | undefinedRaises an Intent with the given Context from the given Row Node with the given Primary Key Value
raiseIntentFromRow(rowNode, intent, contextType, appIdentifier)Promise<IntentResolution>Raises an Intent with the given Context from the given Row Node

Method Details

broadcastFromPrimaryKey

Broadcasts the given Context from the given Row Node with the given Primary Key Value

TypeScript
broadcastFromPrimaryKey(primaryKeyValue: string | number, contextType: ContextType, channel?: Channel): Promise<void> | undefined;
Parameters
ParameterTypeDescription
primaryKeyValuestring | numberThe Primary Key Value
contextTypeContextTypeThe FDC3 Context Type
channelChannel(optional) Channel to broadcast to; if not provided, the Context will be broadcast to whatever User Channel the app is joined to
Returns

Broadcasts the given Context from the given Row Node with the given Primary Key Value

Promise<void> | undefined

broadcastFromRow

Broadcasts the given Context from the given Row Node

TypeScript
broadcastFromRow(rowNode: IRowNode, contextType: ContextType, channel?: Channel): Promise<void>;
Parameters
ParameterTypeDescription
rowNodeIRowNodeThe Row Node
contextTypeContextTypeThe FDC3 Context Type
channelChannel(optional) Channel to broadcast to; if not provided, the Context will be broadcast to whatever User Channel the app is joined to
Returns

Promise<void>

buildContextDataForPrimaryKey

Builds FDC3 Context Data based on the given Context Type and the Row Node with the given Primary Key Value

TypeScript
buildContextDataForPrimaryKey(contextType: ContextType, primaryKeyValue: string | number): Context | undefined;
Parameters
ParameterTypeDescription
contextTypeContextTypeThe FDC3 Context Type
primaryKeyValuestring | numberThe Primary Key Value
Returns

Builds FDC3 Context Data based on the given Context Type and the Row Node with the given Primary Key Value

Context | undefined

buildContextDataFromRow

Builds FDC3 Context Data based on the given Context Type and Row Node

TypeScript
buildContextDataFromRow(contextType: ContextType, rowNode: IRowNode): Context;
Parameters
ParameterTypeDescription
contextTypeContextTypeThe FDC3 Context Type
rowNodeIRowNodeThe Row Node
Returns

Builds FDC3 Context Data based on the given Context Type and Row Node

Context

getContextLabel

Returns the human-friendly label for the given Context Type

TypeScript
getContextLabel(contextType: ContextType): string;
Parameters
ParameterTypeDescription
contextTypeContextTypeThe FDC3 Context Type
Returns

The human-friendly label for the given Context Type

string

getDesktopAgent

Returns the FDC3 Desktop Agent

TypeScript
getDesktopAgent(): DesktopAgent;
Returns

The FDC3 Desktop Agent

DesktopAgent

isStandardContextType

Whether this context type is one of the FDC3 standard types.

TypeScript
isStandardContextType(contextType: string): boolean;
Parameters
ParameterTypeDescription
contextTypestringContext type to check, for example fdc3.instrument
Returns

true when this context type is one of the FDC3 standard types

boolean

isStandardIntentType

Whether this intent is one of the FDC3 standard intents.

TypeScript
isStandardIntentType(intentType: string): boolean;
Parameters
ParameterTypeDescription
intentTypestringIntent to check, for example ViewChart
Returns

true when this intent is one of the FDC3 standard intents

boolean

raiseIntentForContextFromPrimaryKey

Finds and raises an Intent based on the given Context from the given Row Node with the given Primary Key Value

TypeScript
raiseIntentForContextFromPrimaryKey(primaryKeyValue: string | number, contextType: ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution> | undefined;
Parameters
ParameterTypeDescription
primaryKeyValuestring | numberThe Primary Key Value
contextTypeContextTypeThe FDC3 Context Type
appIdentifierAppIdentifierThe App Identifier
Returns

The intent resolution, or undefined when the row cannot be found

Promise<IntentResolution> | undefined

raiseIntentForContextFromRow

Finds and raises an Intent based on the given Context from the given Row Node

TypeScript
raiseIntentForContextFromRow(rowNode: IRowNode, contextType: ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution>;
Parameters
ParameterTypeDescription
rowNodeIRowNodeThe Row Node
contextTypeContextTypeThe FDC3 Context Type
appIdentifierAppIdentifierThe App Identifier
Returns

The intent resolution from the app that handled it

Promise<IntentResolution>

raiseIntentFromPrimaryKey

Raises an Intent with the given Context from the given Row Node with the given Primary Key Value

TypeScript
raiseIntentFromPrimaryKey(primaryKeyValue: string | number, intent: Intent, contextType: ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution> | undefined;
Parameters
ParameterTypeDescription
primaryKeyValuestring | numberThe Primary Key Value
intentIntentThe FDC3 Intent
contextTypeContextTypeThe FDC3 Context Type
appIdentifierAppIdentifierThe App Identifier
Returns

Raises an Intent with the given Context from the given Row Node with the given Primary Key Value

Promise<IntentResolution> | undefined

raiseIntentFromRow

Raises an Intent with the given Context from the given Row Node

TypeScript
raiseIntentFromRow(rowNode: IRowNode, intent: Intent, contextType: ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution>;
Parameters
ParameterTypeDescription
rowNodeIRowNodeThe Row Node
intentIntentThe FDC3 Intent
contextTypeContextTypeThe FDC3 Context Type
appIdentifierAppIdentifierThe App Identifier
Returns

Raises an Intent with the given Context from the given Row Node

Promise<IntentResolution>