Interface EssCubeView

All Superinterfaces:
EssGrid
All Known Implementing Classes:
EssCubeViewImpl

public interface EssCubeView extends EssGrid
A live, navigable ad hoc grid on a cube - the REST analog of the Java API's 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) and keepOnly(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.
Beyond those field-selection adjustments, no attempt is made to reverse, expand, or otherwise infer "the range that will produce a particular outcome" - whatever the server does with the literal single-cell description is authoritative. In practice this means, for instance, that 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 Classes
    Modifier and Type
    Interface
    Description
    static enum 
    A coarse classification of a cell as either a data position or a member/label.
    static final record 
    Ad hoc display/navigation preferences, mirroring the classic "Essbase Options" dialog to the extent the REST wire format supports.
    static enum 
    How indented member rows/columns are, mirroring the classic ad hoc "Indentation" setting.
    static final record 
    A member to place at a specific grid position, replacing whichever member currently occupies that spot on its row or column axis tier.
    static enum 
    The server's zoom-in behavior when a plain zoomIn(int, int) is used (no explicit member set).
  • Method Summary

    Modifier and Type
    Method
    Description
    getCellType(int row, int col)
    Classifies the cell at the given position as EssCubeView.CellType.DATA or EssCubeView.CellType.MEMBER.
    Reads the current session's ad hoc display/navigation preferences.
    void
    keepOnly(int row, int col)
    Keeps only the member at the given position.
    void
    pivot(int fromRow, int fromCol, int toRow, int toCol)
    Swaps the positions of the members at the two given coordinates.
    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.
    void
    Re-executes the view as-is, picking up any data changes made since it was last retrieved.
    void
    removeOnly(int row, int col)
    Removes the member at the given position, keeping the rest.
    void
    Replaces the members at the given positions, in one request.
    void
    Replaces the current session's ad hoc display/navigation preferences.
    void
    zoomIn(int row, int col)
    Zooms in on the member at the given position, using the server's default zoom-in preference.
    void
    zoomOut(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 on
      col - 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 from
      col - 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 keep
      col - 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 remove
      col - 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 member
      fromCol - the column of the first member
      toRow - the row of the second member
      toCol - 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 POV
      col - 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

      EssCubeView.CellType getCellType(int row, int col)
      Classifies the cell at the given position as EssCubeView.CellType.DATA or EssCubeView.CellType.MEMBER. Based on whether the cell's (undocumented by Oracle) types code 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 treating types as 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 cell
      col - the column of the cell
      Returns:
      the cell's type
    • setMembers

      void setMembers(List<EssCubeView.MemberPlacement> placements)
      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

      void setPreferences(EssCubeView.GridPreferences preferences)
      Replaces the current session's ad hoc display/navigation preferences. See EssCubeView.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