skipcheck

TM1 client · Docs · Dimensions and hierarchies

AttributeService

import io.skipcheck.tm1.client.service.attribute.AttributeService;

Attribute definitions: which attributes a kind of object has, and their types, for each AttributeSet. Creating one adds it to every object of that kind; the values are cells of the matching }…Attributes control cube.

Add an attribute to every element of a hierarchy:

// A text attribute on every element of the Region hierarchy
return tm1.attributes()
    .create(AttributeSet.elements("Region", "Region"),
            AttributeDefinitionPatch.builder().name("Manager").type(AttributeType.STRING).build());

List the attributes a kind of object has, here cubes:

// The attributes that every cube has
return tm1.attributes()
    .list(AttributeSet.cubes(), ODataQuery.none().select(AttributeDefinition.NAME))
    .mapNotNull(AttributeDefinition::name);

Members

AttributeService constructorA service sending its requests through session.
listGET the set's attributes, streamed.
getGET one attribute of the set.
createAdds an attribute to every object of the set's kind.
deleteRemoves an attribute, with its values, from every object of the set's kind.

AttributeService

constructor
AttributeService(Tm1Session session)

A service sending its requests through session.

Parameters

session
the session

list

Flux<AttributeDefinition> list(AttributeSet set, ODataQuery query)

GET the set's attributes, streamed.

Parameters

set
which attributes
query
what to select, filter and order

Returns

the attribute definitions

get

Mono<AttributeDefinition> get(AttributeSet set, String name, ODataQuery query)

GET one attribute of the set.

Parameters

set
which attributes
name
the attribute's name
query
what to select

Returns

the attribute definition, or a Tm1NotFoundException if there's none

create

Mono<AttributeDefinition> create(AttributeSet set, AttributeDefinitionPatch attribute)

POST: adds an attribute to every object of the set's kind.

Parameters

set
which attributes
attribute
the new attribute: its name and type

Returns

the attribute as created

delete

Mono<Void> delete(AttributeSet set, String name)

DELETE: removes an attribute, with its values, from every object of the set's kind.

Parameters

set
which attributes
name
the attribute's name

Returns

completes when the attribute is deleted

Also in the Javadoc.