skipcheck

TM1 client · Docs · Versions and capabilities

Tm1Capability

import io.skipcheck.tm1.client.version.Tm1Capability;

Something a request needs the server to define in its $metadata: an entity set, a singleton, an operation or a property. A request can declare one, and the session checks it against the connected server before sending anything.

// Does the server's $metadata define the cube's tm1.Reserve action?
Tm1Capability reserve = Tm1Capability.boundOperation("tm1.Cube", "tm1.Reserve").since("11.8.34");
return session.capabilities().map(capabilities -> capabilities.supports(reserve));

Names are qualified by namespace or alias (tm1.Cube or ibm.tm1.api.v1.Cube), as in $metadata. since records the schema version that added it, from Core.Revisions, so a server that lacks it can be told why; the generated model fills it in.

Members

Tm1Capability constructorChecks the components fit together.
entitySet staticAn entity set.
singleton staticA singleton.
boundOperation staticAn action or function bound to a type, or to one of its base types.
unboundOperation staticAn action or function import, invoked from the service root.
property staticA structural or navigation property of a type, or of one of its base types.
sinceA copy recording the schema version that added it.
addedInVersionThe schema version that added it.
describeHow it reads in messages, with aliases and namespaces dropped.
toString
hashCode
equals
kind
type
name
addedIn

Tm1Capability

constructor
Tm1Capability(Tm1Capability.Kind kind, String type, String name, String addedIn)

Checks the components fit together.

Throws

IllegalArgumentException
if a bound operation or property has no type

entitySet

static
static Tm1Capability entitySet(String name)

An entity set.

Parameters

name
its name, such as GitPlans

Returns

the capability

singleton

static
static Tm1Capability singleton(String name)

A singleton.

Parameters

name
its name, such as ActiveSession

Returns

the capability

boundOperation

static
static Tm1Capability boundOperation(String bindingType, String operation)

An action or function bound to a type, or to one of its base types.

Parameters

bindingType
the qualified type, such as tm1.Cube
operation
the qualified operation name, such as tm1.Reserve

Returns

the capability

unboundOperation

static
static Tm1Capability unboundOperation(String name)

An action or function import, invoked from the service root.

Parameters

name
the import's name, such as ExecuteMDX

Returns

the capability

property

static
static Tm1Capability property(String type, String property)

A structural or navigation property of a type, or of one of its base types.

Parameters

type
the qualified type, such as tm1.Cube
property
the property's name, such as Rules

Returns

the capability

since

Tm1Capability since(String schemaVersion)

A copy recording the schema version that added it.

Parameters

schemaVersion
the version from Core.Revisions, such as 11.8.34

Returns

the copy

addedInVersion

Optional<String> addedInVersion()

The schema version that added it.

Returns

the version, or empty if not known

describe

String describe()

How it reads in messages, with aliases and namespaces dropped: Cube.Reserve, entity set GitPlans.

Returns

the description

toString

String toString()

hashCode

int hashCode()

equals

boolean equals(Object o)

kind

Tm1Capability.Kind kind()

type

String type()

name

String name()

addedIn

String addedIn()

Also in the Javadoc.