Interface EssCubeView
- All Superinterfaces:
EssGrid
- All Known Implementing Classes:
EssCubeViewImpl
IEssCubeView.
Every operation re-executes the view against the server and replaces the grid held by this view
with the server's response.
This class describes actions and cells to the Essbase REST API and renders back whatever grid the engine returns - it does not model what a given action "should" do to the grid, or compute a request shaped to produce some intended result. The exceptions are all mechanical, not semantic - cases where the wire format itself has more than one field capable of naming a cell, and only one of them actually reaches the engine's implementation for a given kind of cell or action:
zoomOut(int, int)andkeepOnly(int, int)are sent as a "ranges" request (a single-cell range at the given position) rather than "coordinates" like the other operations, because the server silently no-ops "coordinates" for those two actions (200 OK, grid unchanged) - "ranges" is simply the only field that reaches their implementation at all.zoomIn(int, int)tries "ranges" first and falls back to "coordinates" only if the server rejects that shape outright (an engine-level error, not a 200). This isn't a guess based on inspecting the cell: "coordinates" turns out not to do a literal (row, col) grid lookup at all for a cell already on a real axis (as opposed to a POV placeholder dimension shown as a header but not yet on any axis) - it addresses POV placeholder dimensions by column, order-insensitively (coordinates[0,1],[1,0],[0,2], and[2,0]all landed on whichever POV dimension's column matched the nonzero value, never on the literal on-axis cell). Confirmed live: zooming in on "Year" (on the row axis at column 0) via "coordinates" silently expanded "Market" (an unrelated POV dimension) instead - not an error, just the wrong dimension, which is exactly why trying "ranges" first and reacting to an actual rejection is the only sound way to pick between the two: "coordinates" can't be trusted to fail loudly when it's wrong.
zoomOut(int, int) reliably collapses a cleanly-targeted dimension back to its total, but on a member
row that the engine doesn't accept for that request shape (or once more than one dimension is
zoomed in at once), it may do less than you'd expect, more than you'd expect, or return an
engine-level error - that's the engine's answer to the given description, not a bug in this layer.
EssGrid.getCell(int, int), getCellType(int, int), setMembers(java.util.List<com.appliedolap.essbase.EssCubeView.MemberPlacement>), zoomIn(int, int),
zoomOut(int, int), keepOnly(int, int), and refresh() are verified against a live server (see
EssCubeViewIT) in at least their most direct case - the grid content is asserted to actually
change, not just that the call doesn't throw.
removeOnly(int, int), pivot(int, int, int, int), and pivotToPov(int, int) are not verified: their
request wire shape appears correct (the server returns engine-level errors specific to the given
coordinates/ranges, rather than a malformed-request 400), but no verified-valid pair of
coordinates has been found yet - see the ignored tests in EssCubeViewIT. For removeOnly,
every coordinate/range tried (including removing only the aggregate/total row, in isolation)
fails with "This operation would generate a nonsensical report." Setting a *data* cell's value is
not implemented at all yet - the same dirty-cell/submit mechanism setMembers(java.util.List<com.appliedolap.essbase.EssCubeView.MemberPlacement>) uses was
tried against data positions too, but unlike member positions, the write never stuck even against
a confirmed leaf-level intersection.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumA coarse classification of a cell as either a data position or a member/label.static final recordAd hoc display/navigation preferences, mirroring the classic "Essbase Options" dialog to the extent the REST wire format supports.static enumHow indented member rows/columns are, mirroring the classic ad hoc "Indentation" setting.static final recordA member to place at a specific grid position, replacing whichever member currently occupies that spot on its row or column axis tier.static enumThe server's zoom-in behavior when a plainzoomIn(int, int)is used (no explicit member set). -
Method Summary
Modifier and TypeMethodDescriptiongetCellType(int row, int col) Classifies the cell at the given position asEssCubeView.CellType.DATAorEssCubeView.CellType.MEMBER.Reads the current session's ad hoc display/navigation preferences.voidkeepOnly(int row, int col) Keeps only the member at the given position.voidpivot(int fromRow, int fromCol, int toRow, int toCol) Swaps the positions of the members at the two given coordinates.voidpivotToPov(int row, int col) Pins the member at the given position into the POV, removing its dimension from whichever axis it currently occupies.voidrefresh()Re-executes the view as-is, picking up any data changes made since it was last retrieved.voidremoveOnly(int row, int col) Removes the member at the given position, keeping the rest.voidsetMembers(List<EssCubeView.MemberPlacement> placements) Replaces the members at the given positions, in one request.voidsetPreferences(EssCubeView.GridPreferences preferences) Replaces the current session's ad hoc display/navigation preferences.voidzoomIn(int row, int col) Zooms in on the member at the given position, using the server's default zoom-in preference.voidzoomOut(int row, int col) Zooms out from the member at the given position.Methods inherited from interface com.appliedolap.essbase.EssGrid
getCell, getColumns, getRows
-
Method Details
-
zoomIn
void zoomIn(int row, int col) Zooms in on the member at the given position, using the server's default zoom-in preference. See the class-level javadoc: this tries "ranges" first and only falls back to "coordinates" if the server itself rejects that shape - not a guess based on inspecting the cell, but a reaction to what the server says about the same literal click either way.- Parameters:
row- the row of the member to zoom in oncol- the column of the member to zoom in on
-
zoomOut
void zoomOut(int row, int col) Zooms out from the member at the given position. See the class-level javadoc: this describes the click as-is and returns whatever the server does with it, rather than computing a request shaped to force a particular collapse.- Parameters:
row- the row of the member to zoom out fromcol- the column of the member to zoom out from
-
keepOnly
void keepOnly(int row, int col) Keeps only the member at the given position. See the class-level javadoc: this describes the click as-is and returns whatever the server does with it, rather than computing a request shaped to force a particular outcome.- Parameters:
row- the row of the member to keepcol- the column of the member to keep
-
removeOnly
void removeOnly(int row, int col) Removes the member at the given position, keeping the rest.Not currently verified to work - every coordinate/range tried against a live server returns "This operation would generate a nonsensical report." See the class-level javadoc.
- Parameters:
row- the row of the member to removecol- the column of the member to remove
-
pivot
void pivot(int fromRow, int fromCol, int toRow, int toCol) Swaps the positions of the members at the two given coordinates.- Parameters:
fromRow- the row of the first memberfromCol- the column of the first membertoRow- the row of the second membertoCol- the column of the second member
-
pivotToPov
void pivotToPov(int row, int col) Pins the member at the given position into the POV, removing its dimension from whichever axis it currently occupies.- Parameters:
row- the row of the member to pin to the POVcol- the column of the member to pin to the POV
-
refresh
void refresh()Re-executes the view as-is, picking up any data changes made since it was last retrieved. -
getCellType
Classifies the cell at the given position asEssCubeView.CellType.DATAorEssCubeView.CellType.MEMBER. Based on whether the cell's (undocumented by Oracle)typescode is exactly"2"- verified, against a live server, to mark the data-cell position consistently whether or not the cell currently holds a real value (confirmed both with real data present, and later with every data cell blank/missing after a database reload). Deliberately compares by equality rather than treatingtypesas a bitmask: code"7"(blank filler cells) also has bit 2 set, but is not a data position, so a bitwise check misclassifies it.- Parameters:
row- the row of the cellcol- the column of the cell- Returns:
- the cell's type
-
setMembers
Replaces the members at the given positions, in one request. Verified live against a real server: this retargets an existing member-position on an existing axis tier to a different member (e.g. changing which Product shows in a given row) - it does not grow the grid to add rows or columns beyond what's already there, and the given member name must be valid for that position's dimension.- Parameters:
placements- the members to place, and where
-
getPreferences
EssCubeView.GridPreferences getPreferences()Reads the current session's ad hoc display/navigation preferences. -
setPreferences
Replaces the current session's ad hoc display/navigation preferences. SeeEssCubeView.GridPreferences: this takes effect for every subsequent grid operation on this connection, not just this view, and persists until changed again.- Parameters:
preferences- the preferences to apply
-