Class AttributeService

java.lang.Object
io.skipcheck.tm1.client.service.attribute.AttributeService

public final class AttributeService extends Object
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);
  • Constructor Details

    • AttributeService

      public AttributeService(Tm1Session session)
      A service sending its requests through session.
      Parameters:
      session - the session
  • Method Details