Enum Class Tm1Seed

java.lang.Object
java.lang.Enum<Tm1Seed>
io.skipcheck.tm1.testcontainers.Tm1Seed
All Implemented Interfaces:
Serializable, Comparable<Tm1Seed>, Constable

public enum Tm1Seed extends Enum<Tm1Seed>
Objects the image puts into an empty database on first start (its TM1_SEED setting). The samples come from the TM1 install itself, so they're only available where the install includes them.

A server seeded with IBM's SData sample:

Tm1Source source = Tm1Source.discover().orElseThrow();
// SData's login is admin / apple, and the server must be this version
try (var server = new Tm1ServerContainer(source).withSeed(Tm1Seed.SDATA)
	.withExpectedVersion(Tm1Version.parse("11.8.03500.6"))) {
	server.start();
	Tm1Client tm1 = Tm1Client.builder()
		.baseUrl(server.getRestUrl())
		.basicAuth(server.getUsername(), server.getPassword())
		.build();
	try {
		// SData's cubes, such as SalesCube
		return tm1.cubes()
			.modelCubes(ODataQuery.none().select(Cube.NAME))
			.map(Cube::name)
			.collectList()
			.block(WAIT);
	}
	finally {
		tm1.close().block(WAIT); // before the container stops
	}
}
  • Enum Constant Details

    • EMPTY

      public static final Tm1Seed EMPTY
      No objects: an empty database with the login admin and no password.
    • SDATA

      public static final Tm1Seed SDATA
      IBM's SData sample, with the login admin / apple.
  • Method Details

    • values

      public static Tm1Seed[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Tm1Seed valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null