Interface EssApplication
- All Superinterfaces:
EssObject
- All Known Implementing Classes:
EssApplicationImpl
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumAn enumeration for the different application states.Nested classes/interfaces inherited from interface com.appliedolap.essbase.EssObject
EssObject.Type -
Method Summary
Modifier and TypeMethodDescriptionThis application's configuration, as something to read and change.voidCopies this application to a new application with the given name.createVariable(String name, String value) Defines a new variable on this application, visible to its cubes.voiddelete()Deletes this application.voiddownloadAllLogsAsZip(OutputStream outputStream) Writes all logs to the given output stream.voiddownloadLatestLog(OutputStream outputStream) Writes the latest application log to the given output stream.downloadProvisionReport(File file) Downloads this application's provisioning report.Gets the list of configuration for this application.Gets the created time for this application.Gets a cube with the given name.getCubes()Gets the list of cubes in this application.getJobs()Get the list of jobs associated with this application.Gets the modified time for this application.Who holds which role on this application - Application Manager, Database Manager, Database Update, Database Access.Get the server that contains this application.The sessions currently on this application, across all of its cubes.Gets the status of this application.Gets the list of variables specific to this applicationvoidkillSessions(boolean logoff) Ends every session on this application.Reads the latest application log and parses it.Asks the server for this application's status again, and updates this object with the answer.voidRenames this application.voidstart()Starts the applicationvoidstop()Stops the application.
-
Method Details
-
getServer
EssServer getServer()Get the server that contains this application.- Returns:
- the parent server for the application
-
getCreated
Instant getCreated()Gets the created time for this application.- Returns:
- when the application was created
-
getModified
Instant getModified()Gets the modified time for this application.- Returns:
- the modified time for this application
-
getCubes
Gets the list of cubes in this application.- Returns:
- the list of cubes for this application, or an empty list if there are none
-
getCube
Gets a cube with the given name.- Parameters:
cubeName- the name of the cube- Returns:
- the cube
-
copy
Copies this application to a new application with the given name.- Parameters:
copyName- the name of the copy
-
delete
void delete()Deletes this application. -
rename
Renames this application.- Parameters:
newName- the new name for the application
-
getConfigurations
List<EssApplicationConfiguration> getConfigurations()Gets the list of configuration for this application.- Returns:
- the configurations
-
configuration
EssApplicationConfig configuration()This application's configuration, as something to read and change.- Returns:
- the configuration, never null
-
getJobs
Get the list of jobs associated with this application. In the Essbase REST API there is no specific endpoint for jobs related to an application, but the general jobs service can take an application name to filter on. So this implementation serves as a convenience method to get the jobs specific to this application.- Returns:
- list of jobs for this application, empty list if none
-
getVariables
List<EssApplicationVariable> getVariables()Gets the list of variables specific to this application- Returns:
- the application variables
-
createVariable
Defines a new variable on this application, visible to its cubes.Creation only: the server refuses a name that already exists at this level. Use
EssVariable.setValue(String)on the existing one to change it.- Parameters:
name- the variable namevalue- its value- Returns:
- the created variable
-
getStatus
EssApplication.Status getStatus()Gets the status of this application. Known statuses are simplySTOPPEDandSTARTED; other statuses, if they exist, are not known at this time and will simply get converted toUNKNOWN.Note that this status represents the status when this object was instantiated. In other words, if the status of the app changes during the lifetime of this object, it won't be refreshed automatically.
- Returns:
- the status of this application
-
refreshStatus
EssApplication.Status refreshStatus()Asks the server for this application's status again, and updates this object with the answer.Needed because the status this object was built with is a snapshot, and an application's status changes as a side effect of ordinary work: reading a cube's dimensions starts the stopped application that owns it. So anything displaying a status alongside a tree the user is browsing will go stale simply by being browsed, and has to ask again.
- Returns:
- the status as of now
-
stop
void stop()Stops the application. -
start
void start()Starts the application -
downloadLatestLog
Writes the latest application log to the given output stream.- Parameters:
outputStream- the output stream
-
downloadAllLogsAsZip
Writes all logs to the given output stream.- Parameters:
outputStream- the output stream
-
readLatestLog
List<EssLogEntry> readLatestLog()Reads the latest application log and parses it.The whole log, which is a real amount of text - Sample's runs to several thousand entries after an afternoon's use - so a caller showing it should expect to filter. Use
downloadLatestLog(OutputStream)instead to put it on disk without holding it in memory.- Returns:
- the entries, oldest first
-
getPermissions
List<EssPermission> getPermissions()Who holds which role on this application - Application Manager, Database Manager, Database Update, Database Access.- Returns:
- the application role assignments, empty where nobody is provisioned on it specifically
-
downloadProvisionReport
Downloads this application's provisioning report.A spreadsheet rather than data: the endpoint answers with an .xlsx attachment, and 406 to any
Acceptthat asks for something else - which is why it looks broken until you stop asking for JSON.- Parameters:
file- where to write it- Returns:
- the file written
-
getSessions
List<EssSession> getSessions()The sessions currently on this application, across all of its cubes.Filtered by the server rather than here -
GET /sessionstakes an application - so this is one request whatever else is running elsewhere.- Returns:
- the sessions
-
killSessions
void killSessions(boolean logoff) Ends every session on this application.- Parameters:
logoff- true to disconnect the users as well as ending their requests
-