Class Tm1Capabilities
java.lang.Object
io.skipcheck.tm1.client.version.Tm1Capabilities
What a connected TM1 server supports, read from its own
$metadata: the way
OData intends clients to detect features, with no version tables. It works for any TM1,
including versions the client has never seen.
// 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));
-
Method Summary
Modifier and TypeMethodDescriptioncheck(Tm1Capability capability, String server) Checks the server definescapability.metadata()The server's$metadata, for anything the checks here don't cover.static Tm1Capabilitiesof(CsdlDocument metadata, @Nullable Tm1Version productVersion) The capabilities a$metadatadocument describes.The server's product version, such as11.8.03500.6.The REST API schema version the server reports inCore.SchemaVersion, such as11.8.35.booleansupports(Tm1Capability capability) Whether the server definescapability.toString()
-
Method Details
-
of
The capabilities a$metadatadocument describes.- Parameters:
metadata- the server's$metadata, parsedproductVersion- the server's version (Server.ProductVersion), ornullif not known- Returns:
- the capabilities
-
schemaVersion
-
productVersion
The server's product version, such as11.8.03500.6.- Returns:
- the version, or empty if not known
-
metadata
The server's$metadata, for anything the checks here don't cover.- Returns:
- the parsed document
-
supports
Whether the server definescapability.- Parameters:
capability- what's needed- Returns:
trueif the server's$metadatadefines it
-
check
Checks the server definescapability.- Parameters:
capability- what's neededserver- the server, for the message, such as its service root- Returns:
- empty if it's defined, otherwise the exception to fail with, saying what's missing and comparing schema versions when the version that added it is known
-
toString
-