Package com.appliedolap.essbase
Interface EssScript
- All Superinterfaces:
EssObject
- All Known Implementing Classes:
EssScriptImpl
A calculation or MDX script on a cube.
Both kinds live behind one set of endpoints, told apart by a file query parameter, so
they are one type here too - see EssScript.ScriptType.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumWhich kind of script this is, which decides both the endpoint'sfileparameter and how the script is run.Nested classes/interfaces inherited from interface com.appliedolap.essbase.EssObject
EssObject.Type -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()voidexecute()Runs the script and waits for it.The script's text, fetched from the server.getCube()The cube this script belongs to.Which kind of script this is.getSize()voidReplaces the script's text on the server.validate()Checks the script without running it.
-
Method Details
-
getScriptType
EssScript.ScriptType getScriptType()Which kind of script this is.- Returns:
- the type, never null
-
getCube
EssCube getCube()The cube this script belongs to.- Returns:
- the cube
-
getModifiedTime
Long getModifiedTime() -
getSize
Long getSize() -
getContent
String getContent()The script's text, fetched from the server.- Returns:
- the content
-
save
Replaces the script's text on the server.- Parameters:
content- the new text
-
validate
Checks the script without running it.Worth doing before a save as well as before a run: Essbase validates against the live outline, so it catches a member name that no longer exists.
- Returns:
- empty when the script is valid, otherwise the server's complaint
-
delete
void delete() -
execute
void execute()Runs the script and waits for it.A calculation and an MDX script are both jobs, but not the same one and not parameterised the same way - a calc is identified by its bare name and an MDX script by its file name. That difference is handled here rather than by the caller.
- Throws:
EssApiException- if the script fails, carrying the server's reason
-