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 constructor | Checks the components fit together. |
entitySet static | An entity set. |
singleton static | A singleton. |
boundOperation static | An action or function bound to a type, or to one of its base types. |
unboundOperation static | An action or function import, invoked from the service root. |
property static | A structural or navigation property of a type, or of one of its base types. |
since | A copy recording the schema version that added it. |
addedInVersion | The schema version that added it. |
describe | How it reads in messages, with aliases and namespaces dropped. |
toString | |
hashCode | |
equals | |
kind | |
type | |
name | |
addedIn |
Tm1Capability
constructorTm1Capability(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
staticstatic Tm1Capability entitySet(String name)An entity set.
Parameters
name- its name, such as
GitPlans
Returns
- the capability
singleton
staticstatic Tm1Capability singleton(String name)A singleton.
Parameters
name- its name, such as
ActiveSession
Returns
- the capability
boundOperation
staticstatic 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
staticstatic 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
staticstatic 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 as11.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.