Class EssBatchOutlineEdit
Batch outline editing changes many things about an outline in one transaction, applied in the
order they are listed - so this builds a document rather than making calls, and
EssCube.batchOutlineEdit(EssBatchOutlineEdit) sends the whole thing once.
EssBatchOutlineEdit edit = EssBatchOutlineEdit.create();
edit.addMember("Widget", "Product")
.consolidation(Consolidation.ADD)
.alias("Our widget")
.uda("New");
edit.updateMember("Cola").formula("100-10;");
edit.deleteMember("Discontinued");
EssBatchOutlineEditResult result = cube.batchOutlineEdit(edit);
Written out by hand rather than through the generated OtlEditMain, which cannot express
an action at all, and whose restructOption is spelled in a way the server answers HTTP 500
to. The vocabulary here is Essbase's own mbredit.xsd, which ships inside the install at
products/Essbase/EssbaseServer/bin/mbredit.xsd and is the only complete description of this
format - the published REST spec erases it.
Covers the member and dimension actions. The smart-list and dependency-list families the schema
also defines are not here: they are Planning-oriented, and adding them without a way to exercise
them would be guessing in public. EssCube.batchOutlineEdit(String) takes a document as text
for anything this does not model.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classOne action in the document.static enumWhich members adataStorageSetapplies to.static enumHow the server consolidates a member into its parent.static enumWhere a member's data lives.static classAdimUpdate, which carries apropertiesblock rather than ambrInfo.static enumA dimension's type, in the schema's vocabulary.static enumWhether a dimension's blocks are dense or sparse.static enumHow a hierarchy under a dimension is aggregated.static classAn action carrying ambrInfoblock - add, addOrUpdate, update.static enumWhat to restructure after the edit.static enumWhat a time-balance member skips.static enumstatic enumTime balance, for an accounts dimension. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAn action this does not model, by its element name and attributes.Adds a member, failing with a warning if it already exists.addOrUpdateMember(String member, String parent) Adds the member, or updates it where it already exists.associateAttribute(String member, String attributeDimension, String attributeMember) Associates one attribute member with a base member.associateAttributeDimension(String dimension, String attributeDimension) Attaches an attribute dimension to a base dimension.static EssBatchOutlineEditcreate()deleteMarked(String dimension) deleteMember(String member) dissociateAttributes(String member) Removes every attribute association from a base member - all of them, not a named one.static EssBatchOutlineEditfromPlanningDimension(Path dimensionFile, String planType) An edit that rebuilds a dimension from an EPM Cloud artifact snapshot.keepTransaction(boolean keepTransaction) Whether to hold the edit open as a transaction.markForDelete(String dimension) Marks every member of a dimension for deletion, so a following build can spare the ones it mentions anddeleteMarked(String)removes the rest.moveMember(String member, String newParent) outlineVersion(int outlineVersion) The outline version this edit expects, for guarding against a concurrent change.renameMember(String member, String newName) restructure(EssBatchOutlineEdit.Restructure restructure) setDataStorage(String member, EssBatchOutlineEdit.DataStorage storage, EssBatchOutlineEdit.ApplyTo applyTo, Integer number) Sets data storage across a swathe of members at once.intsize()sortChildren(String member, EssBatchOutlineEdit.SortOrder order, boolean recursive) toString()toXml()The document, as the XML the endpoint takes.updateDimension(String dimension) Changes a dimension's own properties.updateMember(String member) Changes an existing member's properties.validate(boolean validate) Whether the server validates the outline after applying the edit.validateFormulas(boolean validateFormulas)
-
Constructor Details
-
EssBatchOutlineEdit
public EssBatchOutlineEdit()
-
-
Method Details
-
create
-
fromPlanningDimension
public static EssBatchOutlineEdit fromPlanningDimension(Path dimensionFile, String planType) throws IOException An edit that rebuilds a dimension from an EPM Cloud artifact snapshot.Reads the dimension's
.csv- not the batch-outline-edit XML that sits in the same snapshot, which cannot do this. That file addresses every member by a Planning GUID and carries no names, no parents and no hierarchy: it refreshes properties on members that already exist. The.csvis the one with the dimension in it. SeeEssPlanningDimensionFilefor where they live in a snapshot.EssBatchOutlineEdit edit = EssBatchOutlineEdit.fromPlanningDimension( Path.of("Artifact Snapshot/HP-Vision/resource/Global Artifacts/" + "Common Dimensions/Standard Dimensions/Account.csv"), "Vision"); EssBatchOutlineEditResult result = cube.batchOutlineEdit(edit);- Parameters:
dimensionFile- the dimension's.csvplanType- which cube's columns to read - Planning records consolidation, storage, formula and solve order per plan type, and they differ- Returns:
- an edit adding or updating every member of that dimension, parents first. Label-only and
dynamic-calc storage is not in it - see
EssPlanningDimensionFile.toStorageRefinement(java.lang.String), which is a second call for reasons explained there - Throws:
IOException- if the file cannot be read
-
outlineVersion
The outline version this edit expects, for guarding against a concurrent change.- Parameters:
outlineVersion- the version, or -1 to skip the check (the default)
-
validate
Whether the server validates the outline after applying the edit. Defaults to true, server-side. -
validateFormulas
-
keepTransaction
Whether to hold the edit open as a transaction. Required by a few actions - setting a dimension's data member among them - and off by default. -
restructure
-
addMember
Adds a member, failing with a warning if it already exists.The new member goes first among its parent's children unless
EssBatchOutlineEdit.Action.after(String)places it - so adding several in order means passing each the previous one.- Parameters:
member- the new member's nameparent- the parent to add it under- Returns:
- the action, for setting the new member's properties
-
addOrUpdateMember
Adds the member, or updates it where it already exists. -
updateMember
Changes an existing member's properties. -
deleteMember
-
renameMember
- Parameters:
newName- what the member should be called afterwards
-
moveMember
-
associateAttribute
public EssBatchOutlineEdit.Action associateAttribute(String member, String attributeDimension, String attributeMember) Associates one attribute member with a base member. -
dissociateAttributes
Removes every attribute association from a base member - all of them, not a named one. -
updateDimension
Changes a dimension's own properties. -
associateAttributeDimension
public EssBatchOutlineEdit.Action associateAttributeDimension(String dimension, String attributeDimension) Attaches an attribute dimension to a base dimension. -
sortChildren
public EssBatchOutlineEdit.Action sortChildren(String member, EssBatchOutlineEdit.SortOrder order, boolean recursive) -
setDataStorage
public EssBatchOutlineEdit.Action setDataStorage(String member, EssBatchOutlineEdit.DataStorage storage, EssBatchOutlineEdit.ApplyTo applyTo, Integer number) Sets data storage across a swathe of members at once. Level-0 members are skipped by the server.- Parameters:
number- the level or generation number, required whenapplyTois one of those
-
markForDelete
Marks every member of a dimension for deletion, so a following build can spare the ones it mentions anddeleteMarked(String)removes the rest. The two halves of how Essbase deletes members that a source system has stopped sending. -
deleteMarked
-
action
An action this does not model, by its element name and attributes.The escape hatch that keeps the rest of the builder honest: rather than pretend to cover the whole schema, anything missing - a smart list, a dependency list - can still be expressed here without dropping to raw XML for the entire document.
- Parameters:
element- the action's element name, asmbredit.xsdspells it
-
size
public int size()- Returns:
- how many actions this document carries
-
toXml
The document, as the XML the endpoint takes.- Returns:
- a complete
otlEditMaindocument
-
toString
-