Class EssPlanningSnapshot
- All Implemented Interfaces:
AutoCloseable
The snapshot is the .zip a Planning application exports to. This finds the dimensions in
it and builds them into a cube, which is as close as an Essbase server can get to the shape of the
Planning application that produced it.
EssPlanningSnapshot snapshot = EssPlanningSnapshot.open(Path.of("Artifact Snapshot.zip"));
snapshot.getPlanTypes(); // [Vision, Plan1]
Report report = snapshot.importInto(cube, "Vision");
Best effort, and it says what it could not do. Planning outlines use member ids
where Essbase uses names, allow duplicate names where a plain Essbase outline does not, and carry
properties Essbase will refuse in combinations that only the server can judge. Every dimension is
attempted independently and the EssPlanningSnapshot.Report says what happened to each, so one awkward dimension
costs that dimension rather than the import.
Two files in the snapshot describe the outline and neither is sufficient alone. The dimension
.csv files carry the names, parents and properties - the hierarchy. The batch-outline-edit
.xml carries the attribute associations, which the CSVs do not, but addresses members by
Planning GUID; the CSVs' UUID column is what turns those back into names. Both are read.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classOne dimension's outcome.static classWhat a dimension in the snapshot looks like, without importing anything.static classWhat an import did, dimension by dimension. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()The Planning applications in the snapshot.getDimensionEntries(String planType) Every dimension file in the snapshot, by dimension name.The plan types - the cubes - the snapshot describes.importInto(EssCube cube, String planType) Builds every dimension in the snapshot into a cube.importInto(EssCube cube, String planType, Collection<String> only) Builds the dimensions the caller picked.static EssPlanningSnapshotOpens a snapshot.What the snapshot holds for a plan type, without changing anything.readDimension(String entry) Reads one dimension out of the snapshot.
-
Method Details
-
open
Opens a snapshot.- Parameters:
snapshot- the artifact snapshot.zip- Throws:
IOException- if it cannot be read
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
getApplicationNames
The Planning applications in the snapshot.A snapshot holds more than the application - Shared Services, FDMEE, the document repository - and the application's own folder is the one named
HP-<name>. -
getPlanTypes
The plan types - the cubes - the snapshot describes.One of these is what
importInto(com.appliedolap.essbase.EssCube, java.lang.String)needs, because a Planning application's dimensions are shared across its cubes and each records its own consolidation, storage and formula per member. Building for the wrong one silently produces a different outline. -
getDimensionEntries
Every dimension file in the snapshot, by dimension name.Three places hold them: the application's shared standard dimensions, its shared attribute dimensions, and a cube's own standard dimensions. A cube's own wins where a name is in both.
-
readDimension
Reads one dimension out of the snapshot.- Throws:
IOException
-
preview
What the snapshot holds for a plan type, without changing anything.For showing someone what they are about to import and letting them choose. Reads every dimension file, so it is a real piece of work rather than a directory listing - but it is the only way to say how many members a dimension has, which is most of what makes the choice.
- Parameters:
planType- which cube's members to count- Returns:
- one summary per dimension, standard dimensions first
-
importInto
Builds every dimension in the snapshot into a cube.The cube must exist and should be empty; this adds to whatever is there rather than replacing it. Each dimension is created, then its members, then the storage types that could only be set once the hierarchy existed, then the attribute associations - each step independent, so a step that Essbase refuses costs that step rather than the import.
- Parameters:
cube- where to buildplanType- which cube of the Planning application to take the properties from- Returns:
- what happened, dimension by dimension
-
importInto
public EssPlanningSnapshot.Report importInto(EssCube cube, String planType, Collection<String> only) Builds the dimensions the caller picked.- Parameters:
cube- where to buildplanType- which cube of the Planning application to take the properties fromonly- the dimension names to build, or null for all of them- Returns:
- what happened, dimension by dimension
-