Class EssCubeImpl
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classDeprecated.since 2.1.0.Nested classes/interfaces inherited from interface com.appliedolap.essbase.EssCube
EssCube.MdxIdentifierType, EssCube.MdxOutputTypeNested classes/interfaces inherited from interface com.appliedolap.essbase.EssObject
EssObject.Type -
Field Summary
Fields inherited from class com.appliedolap.essbase.AbstractEssObject
api -
Constructor Summary
ConstructorsConstructorDescriptionEssCubeImpl(ApiContext api, EssApplication application, com.appliedolap.essbase.client.model.Cube cube) -
Method Summary
Modifier and TypeMethodDescriptionApplies a batch outline edit built withEssBatchOutlineEdit.batchOutlineEdit(String xml) Posts a batch outline edit document and reads the server's log back.voidCALC ALL is what "the default calculation" means for a block storage cube.voidRuns a calculation given as script text rather than a stored script.createDrillthroughDataSource(String name, String dataSourceName, List<String> columns, Map<String, EssDrillthroughColumnMapping> columnMappings, List<String> drillRegions) Creates a drill-through report that reads its detail from a data source.createDrillthroughURL(String urlName, String urlLink, List<String> drillRegions) Creates a URL-type drill-through on the cube,createScript(EssScript.ScriptType scriptType, String name, String content) Creates a script on this cube.createVariable(String name, String value) Defines a new variable on this cube, shadowing any application or server variable of the same name for anything running against it.executeMdx(String query) Runs an MDX query and returns its cells.voidexecuteMdx(String query, EssCube.MdxOutputType outputType, EssCubeImpl.MdxOptions mdxOptions, OutputStream outputStream) Deprecated.executeMdx(String query, EssMdxOptions options) Runs an MDX query and returns its cells along with the dimensions on each axis.voidexecuteMdx(String query, EssMdxOptions options, EssCube.MdxOutputType outputType, OutputStream outputStream) Runs an MDX query and writes the server's answer, in the given format, to a stream.Runs the Excel export job and waits for it.getAi()The generative-AI features this cube offers - notably turning a question asked in English into an MDX query.Gets the names of this cube's alias tables.Gets the parent application of this cube.Get the list of scripts associated with this cube.Gets the list of dimensions on the cube, if any.getDrillthrough(String drillthroughName) Gets a drill-through report with a specific name.Get list of drill-through reports on the cube.Every variable this cube can actually see, with the definition that wins and the ones it hides.getLockedObjects(Integer offset, Integer limit) List Locked Objects Returns all the locked objects from the specified application and databaseThe MDX functions this server understands, in the server's own groups.The MDX scripts on this cube.Gets a reference to a particular member in the cube outline.getName()Gets the name of this object.Gets an outline object for this cube.Gets the list of scenarios on the cube, if any.getScripts(EssScript.ScriptType scriptType) Lists the scripts of one kind.Gets the list of sessions on this cube.Whether this cube is started.getType()Gets the type of this object.voidimportExcel(String path, String filename) Updates this cube using an Excel workbook.voidimportFile(File file) Acts as a convenience function for uploading a file to a cube's storage folder.booleanChecks if this cube has scenarios enabled.voidkillSessions(boolean logoff) Ends every session on this cube, leaving the rest of the application's alone.voidlockObject(EssLock unlockedObject) Lock Object Locks the object in the specified application and database and returns the details of the locked objectOpens a live, ad hoc grid view on this cube using its default layout - the REST analog of the Java API'sIEssCube.openCubeView.openCubeView(String layoutName) Opens a live, ad hoc grid view on this cube using a specific saved layout by name, rather than whatever is currently saved as "Default".Asks the server for this cube's status again, and updates this object with the answer.voidThe layout to delete is named after the current user, so this needs to know who that is.voidstart()Starts this cube, and with it the application that owns it - a cube cannot run in a stopped application, so the server starts both.voidstop()Stops this cube, leaving its application running.voidunlockObject(EssLock lockedObject) Unlock Object Unlocks the object in the specified application and database
-
Constructor Details
-
EssCubeImpl
public EssCubeImpl(ApiContext api, EssApplication application, com.appliedolap.essbase.client.model.Cube cube)
-
-
Method Details
-
getName
Description copied from interface:EssObjectGets the name of this object. This will generally be the "nice" and "unique" name of this object, such as the application name, cube, member, variable, or whatever. -
getType
Description copied from interface:EssObjectGets the type of this object. -
getCalcScripts
Description copied from interface:EssCubeGet the list of scripts associated with this cube.- Specified by:
getCalcScriptsin interfaceEssCube- Returns:
- the scripts on this cube
-
getMdxScripts
Description copied from interface:EssCubeThe MDX scripts on this cube. Same endpoints as the calc scripts, told apart by a type parameter - seeEssScript.ScriptType.- Specified by:
getMdxScriptsin interfaceEssCube- Returns:
- the MDX scripts
-
getScripts
Lists the scripts of one kind.Not through the generated client: the type has to travel on every scripts call and the generated signature makes it optional, which produces the server's least helpful error. See
EssScripts.- Specified by:
getScriptsin interfaceEssCube- Parameters:
scriptType- which kind- Returns:
- the scripts
-
createScript
Description copied from interface:EssCubeCreates a script on this cube.- Specified by:
createScriptin interfaceEssCube- Parameters:
scriptType- which kindname- the script name, without an extensioncontent- the script text- Returns:
- the script as created
-
getApplication
Description copied from interface:EssCubeGets the parent application of this cube.- Specified by:
getApplicationin interfaceEssCube- Returns:
- the parent application
-
getSessions
Description copied from interface:EssCubeGets the list of sessions on this cube.- Specified by:
getSessionsin interfaceEssCube- Returns:
- the current cube sessions
-
killSessions
public void killSessions(boolean logoff) Description copied from interface:EssCubeEnds every session on this cube, leaving the rest of the application's alone.What you want before restructuring: the server takes the application and database as filters, so this is one call rather than a walk over
EssCube.getSessions()killing each.- Specified by:
killSessionsin interfaceEssCube- Parameters:
logoff- true to disconnect the users as well as ending their requests
-
createVariable
Description copied from interface:EssCubeDefines a new variable on this cube, shadowing any application or server variable of the same name for anything running against it.- Specified by:
createVariablein interfaceEssCube- Parameters:
name- the variable namevalue- its value- Returns:
- the created variable
-
getEffectiveVariables
Description copied from interface:EssCubeEvery variable this cube can actually see, with the definition that wins and the ones it hides.Three requests, merged here, because the server will not do it: each variable endpoint reports only its own level, so nothing on the server can tell you which definition of a name a query against this cube would resolve to. Nearest wins - cube over application over server.
- Specified by:
getEffectiveVariablesin interfaceEssCube- Returns:
- one entry per distinct name, ordered by name
-
getVariables
- Specified by:
getVariablesin interfaceEssCube
-
getOutline
Description copied from interface:EssCubeGets an outline object for this cube.- Specified by:
getOutlinein interfaceEssCube- Returns:
- an outline object
-
isScenariosEnabled
public boolean isScenariosEnabled()Description copied from interface:EssCubeChecks if this cube has scenarios enabled.- Specified by:
isScenariosEnabledin interfaceEssCube- Returns:
- true if scenarios are enabled, false otherwise
-
createDrillthroughDataSource
public EssDrillthrough createDrillthroughDataSource(String name, String dataSourceName, List<String> columns, Map<String, EssDrillthroughColumnMapping> columnMappings, List<String> drillRegions) Description copied from interface:EssCubeCreates a drill-through report that reads its detail from a data source.The other half of
EssCube.createDrillthroughURL(java.lang.String, java.lang.String, java.util.List<java.lang.String>): where that one records a URL for a client to open, this one Essbase can execute itself, returning the rows behind a cell - seeEssDrillthrough.execute(java.util.Map).The data source must already exist; naming one that does not is refused outright with
No datasource exists with name '...'.- Specified by:
createDrillthroughDataSourcein interfaceEssCube- Parameters:
name- the report namedataSourceName- the data source holding the detailcolumns- the source columns to return, in ordercolumnMappings- which column is filtered by which dimension, keyed by column namedrillRegions- the regions whose cells may be drilled- Returns:
- the created report
-
createDrillthroughURL
public EssDrillthrough createDrillthroughURL(String urlName, String urlLink, List<String> drillRegions) Description copied from interface:EssCubeCreates a URL-type drill-through on the cube,- Specified by:
createDrillthroughURLin interfaceEssCube- Parameters:
urlName- the name (no spaces?!)urlLink- the drill-through linkdrillRegions- the drillable regions- Returns:
- a new drill-through object
-
getDrillthroughs
Description copied from interface:EssCubeGet list of drill-through reports on the cube.- Specified by:
getDrillthroughsin interfaceEssCube- Returns:
- the list of cube drill-through reports
-
getDrillthrough
Description copied from interface:EssCubeGets a drill-through report with a specific name. Note that the current implementation of this method hits the drill-through report list endpoint and filters based on the name, so you will likely end up with two trips to the server: one to get the list, and one to get the details of the report, which will happen when you access most detailed properties in the drill-through report.- Specified by:
getDrillthroughin interfaceEssCube- Parameters:
drillthroughName- the name of the drill-through report- Returns:
- a drill-through report object
-
getScenarios
Description copied from interface:EssCubeGets the list of scenarios on the cube, if any.- Specified by:
getScenariosin interfaceEssCube- Returns:
- the cube's scenarios
-
getMember
Description copied from interface:EssCubeGets a reference to a particular member in the cube outline. This method is likely to change in the future as the outline management and other classes come in to focus, to say nothing of how member IDs and unique members and such will need to be handled. -
getDimensions
Description copied from interface:EssCubeGets the list of dimensions on the cube, if any.- Specified by:
getDimensionsin interfaceEssCube- Returns:
- the cube's dimensions
-
getLockedObjects
Description copied from interface:EssCubeList Locked Objects Returns all the locked objects from the specified application and database- Specified by:
getLockedObjectsin interfaceEssCube- Parameters:
offset- Number of items to omit from the start of the result set. Default value is 0limit- Maximum number of objects to return. Default is 50- Returns:
- LockObjectLis
-
unlockObject
Description copied from interface:EssCubeUnlock Object Unlocks the object in the specified application and database- Specified by:
unlockObjectin interfaceEssCube- Parameters:
lockedObject- Details about object to be unlocked
-
lockObject
Description copied from interface:EssCubeLock Object Locks the object in the specified application and database and returns the details of the locked object- Specified by:
lockObjectin interfaceEssCube- Parameters:
unlockedObject- Object details to be locked (required)
-
exportExcel
Runs the Excel export job and waits for it.buildMethodis required and has to beGENERATION, which makes no sense for an export and is not in any documentation - the job simply fails without it:An argument buildMethod in parameters cannot be null or empty
and rejects every other value (LEVEL,PARENT_CHILD, ...) with "Invalid value of build method". The export job evidently shares a parameter validator with dimension build. This was true on both 21.7 and 26.1, so it has never worked without it.Waits rather than returning the job, because the caller wants the workbook and the workbook does not exist until the job is done. The job is submitted synchronously but runs in the background: a fresh submit comes back
IN_PROGRESSand turns into a real status a few seconds later.- Specified by:
exportExcelin interfaceEssCube- Returns:
- the catalogue path of the workbook, e.g.
/applications/Sample/Basic/Basic.xlsx
-
calculate
public void calculate()CALC ALL is what "the default calculation" means for a block storage cube. -
calculate
Description copied from interface:EssCubeRuns a calculation given as script text rather than a stored script.EssScript.execute()runs one that exists on the cube; this runs one that does not have to. The two are parameterised differently and neither is guessable - a stored calculation goes in the job'sfileparameter by bare name, while script text goes inscriptwithisScriptContentset. -
importExcel
Description copied from interface:EssCubeUpdates this cube using an Excel workbook. This API is likely to change soon to take an EssFile reference- Specified by:
importExcelin interfaceEssCube- Parameters:
path- the pathfilename- the filename
-
importFile
Description copied from interface:EssCubeActs as a convenience function for uploading a file to a cube's storage folder. The Essbase server maps the file location/applications/AppName/CubeName, which contains the cube files such as calc scripts, load rules, and whatnot.- Specified by:
importFilein interfaceEssCube- Parameters:
file- the file to upload to the cube
-
executeMdx
@Deprecated(since="2.1.0") public void executeMdx(String query, EssCube.MdxOutputType outputType, EssCubeImpl.MdxOptions mdxOptions, OutputStream outputStream) Deprecated.Description copied from interface:EssCubeRuns an MDX query and writes the server's answer, in the given format, to a stream.- Specified by:
executeMdxin interfaceEssCube- Parameters:
query- the queryoutputType- the format to writemdxOptions- ignored: this class never sent its options to the serveroutputStream- where to write the result; not closed
-
executeMdx
public void executeMdx(String query, EssMdxOptions options, EssCube.MdxOutputType outputType, OutputStream outputStream) Description copied from interface:EssCubeRuns an MDX query and writes the server's answer, in the given format, to a stream. JSON is the formatEssCube.executeMdx(String, EssMdxOptions)reads; the others are for handing on as they are.The options come second, unlike the deprecated method's, so that a call passing null for those still compiles against the deprecated method rather than matching both.
- Specified by:
executeMdxin interfaceEssCube- Parameters:
query- the queryoptions- how to present the result;EssMdxOptions.defaults()for the server's defaultsoutputType- the format to writeoutputStream- where to write the result; not closed
-
getStatus
Description copied from interface:EssCubeWhether this cube is started.A cube has a state of its own and does not simply inherit its application's: an application can be started with a cube inside it stopped, and only a started cube answers queries. Shares
EssApplication.Statusbecause the server reports both with the same vocabulary.- Specified by:
getStatusin interfaceEssCube- Returns:
- the cube's status,
EssApplication.Status.UNKNOWNfor a state this doesn't name
-
refreshStatus
Description copied from interface:EssCubeAsks the server for this cube's status again, and updates this object with the answer.Same reason as
EssApplication.refreshStatus(): a cube's status is a snapshot, and browsing into a cube starts the application that owns it, so the snapshot goes stale through ordinary use.- Specified by:
refreshStatusin interfaceEssCube- Returns:
- the status as of now
-
getAi
Description copied from interface:EssCubeThe generative-AI features this cube offers - notably turning a question asked in English into an MDX query.Returns a handle whether or not the server supports or has been set up for any of this; ask the handle's
EssCubeAi.getReadiness()rather than expecting this to fail or return null, since "can this cube use AI" is a question with several different answers and several different people who can fix them. -
executeMdx
Description copied from interface:EssCubeRuns an MDX query and returns its cells.The grid is an
EssMdxGrid, though declared as the plainer type for compatibility. UseEssCube.executeMdx(String, EssMdxOptions)to have it typed as one.- Specified by:
executeMdxin interfaceEssCube- Parameters:
query- the query- Returns:
- the result
-
executeMdx
Description copied from interface:EssCubeRuns an MDX query and returns its cells along with the dimensions on each axis.- Specified by:
executeMdxin interfaceEssCube- Parameters:
query- the queryoptions- how to present the result;EssMdxOptions.defaults()for the server's defaults- Returns:
- the result
-
openCubeView
Description copied from interface:EssCubeOpens a live, ad hoc grid view on this cube using its default layout - the REST analog of the Java API'sIEssCube.openCubeView.- Specified by:
openCubeViewin interfaceEssCube- Returns:
- a navigable cube view
-
openCubeView
Description copied from interface:EssCubeOpens a live, ad hoc grid view on this cube using a specific saved layout by name, rather than whatever is currently saved as "Default".- Specified by:
openCubeViewin interfaceEssCube- Parameters:
layoutName- the name of the saved layout to open- Returns:
- a navigable cube view
-
resetDefaultView
public void resetDefaultView()The layout to delete is named after the current user, so this needs to know who that is.It asks the authentication strategy first and only falls back to
GET /sessionwhen the strategy doesn't know - which is a strategy carrying a session or token rather than a name. That ordering is not just to save a round trip:GET /sessionanswers 500 on Essbase 26.1, so asking it first made this method, and therefore every fresh ad hoc grid, fail outright there.- Specified by:
resetDefaultViewin interfaceEssCube
-
getMdxFunctions
Description copied from interface:EssCubeThe MDX functions this server understands, in the server's own groups.Reference material rather than anything about this cube: the endpoint is cube-scoped, but a given server answers identically for every cube, and for a stopped application too. Offered here because this is where the path lives, and on
EssServer.getMdxFunctions()because that is what it actually describes.- Specified by:
getMdxFunctionsin interfaceEssCube- Returns:
- the function groups, in the order the server listed them
-
start
public void start()Description copied from interface:EssCubeStarts this cube, and with it the application that owns it - a cube cannot run in a stopped application, so the server starts both. -
stop
public void stop()Description copied from interface:EssCubeStops this cube, leaving its application running.Not the mirror of
EssCube.start(), and verified against a live server: starting a cube starts its application, but stopping one leaves the application started with its other cubes untouched. To stop the application as well, stop the application. -
batchOutlineEdit
Posts a batch outline edit document and reads the server's log back.By hand rather than through the generated
BatchOutlineEditingApi, which cannot send a usable document. ItsOtlEditMainmodelseditActionsas JAXB's ownname/value/nilwrapper rather than as the twenty-six action elements the schema actually defines, so there is no way to express an action through it; and itsrestructOptionenum is spelledALL_DATAwhere the server accepts onlyallData- sending the documented value answers HTTP 500.Accept: application/jsonbecause the response is the one part the generated model has right: a single-property object whosemessagesis the log. Read as text and handed toEssBatchOutlineEditResultrather than deserialized, so a server that answers in XML, or with a bare log, still produces a readable result instead of a parse failure.- Specified by:
batchOutlineEditin interfaceEssCube- Parameters:
xml- the document, withotlEditMainas its root element- Returns:
- what the server said it did
-
batchOutlineEdit
Description copied from interface:EssCubeApplies a batch outline edit built withEssBatchOutlineEdit.The same call as
EssCube.batchOutlineEdit(String)- and the same warning about reading the result - with the document written for you.- Specified by:
batchOutlineEditin interfaceEssCube- Parameters:
edit- the actions to apply, in order- Returns:
- what the server said it did
-
getAliasTables
Description copied from interface:EssCubeGets the names of this cube's alias tables.Always at least
Default, which is the table a cube has whether or not anyone has added others, and the one members are labelled from when none is asked for.- Specified by:
getAliasTablesin interfaceEssCube- Returns:
- the alias table names
-