Class EssApplicationImpl
- All Implemented Interfaces:
EssApplication,EssObject
EssCubeImpl cubes.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.appliedolap.essbase.EssApplication
EssApplication.StatusNested classes/interfaces inherited from interface com.appliedolap.essbase.EssObject
EssObject.Type -
Field Summary
Fields inherited from class com.appliedolap.essbase.AbstractEssObject
api -
Constructor Summary
ConstructorsConstructorDescriptionEssApplicationImpl(ApiContext api, EssServer server, com.appliedolap.essbase.client.model.Application application) -
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) Fetched by hand because the endpoint answers with a spreadsheet, not a model.getApi()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.getName()Gets the name of this object.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.getType()Gets the type of this object.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.
-
Constructor Details
-
EssApplicationImpl
public EssApplicationImpl(ApiContext api, EssServer server, com.appliedolap.essbase.client.model.Application application)
-
-
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. -
getServer
Description copied from interface:EssApplicationGet the server that contains this application.- Specified by:
getServerin interfaceEssApplication- Returns:
- the parent server for the application
-
getCreated
Description copied from interface:EssApplicationGets the created time for this application.- Specified by:
getCreatedin interfaceEssApplication- Returns:
- when the application was created
-
getModified
Description copied from interface:EssApplicationGets the modified time for this application.- Specified by:
getModifiedin interfaceEssApplication- Returns:
- the modified time for this application
-
getCubes
Description copied from interface:EssApplicationGets the list of cubes in this application.- Specified by:
getCubesin interfaceEssApplication- Returns:
- the list of cubes for this application, or an empty list if there are none
-
getCube
Description copied from interface:EssApplicationGets a cube with the given name.- Specified by:
getCubein interfaceEssApplication- Parameters:
cubeName- the name of the cube- Returns:
- the cube
-
getApi
-
copy
Description copied from interface:EssApplicationCopies this application to a new application with the given name.- Specified by:
copyin interfaceEssApplication- Parameters:
copyName- the name of the copy
-
delete
public void delete()Description copied from interface:EssApplicationDeletes this application.- Specified by:
deletein interfaceEssApplication
-
rename
Description copied from interface:EssApplicationRenames this application.- Specified by:
renamein interfaceEssApplication- Parameters:
newName- the new name for the application
-
configuration
Description copied from interface:EssApplicationThis application's configuration, as something to read and change.- Specified by:
configurationin interfaceEssApplication- Returns:
- the configuration, never null
-
getConfigurations
Description copied from interface:EssApplicationGets the list of configuration for this application.- Specified by:
getConfigurationsin interfaceEssApplication- Returns:
- the configurations
-
getJobs
Description copied from interface:EssApplicationGet 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.- Specified by:
getJobsin interfaceEssApplication- Returns:
- list of jobs for this application, empty list if none
-
createVariable
Description copied from interface:EssApplicationDefines 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.- Specified by:
createVariablein interfaceEssApplication- Parameters:
name- the variable namevalue- its value- Returns:
- the created variable
-
getVariables
Description copied from interface:EssApplicationGets the list of variables specific to this application- Specified by:
getVariablesin interfaceEssApplication- Returns:
- the application variables
-
getStatus
Description copied from interface:EssApplicationGets 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.
- Specified by:
getStatusin interfaceEssApplication- Returns:
- the status of this application
-
refreshStatus
Description copied from interface:EssApplicationAsks 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.
- Specified by:
refreshStatusin interfaceEssApplication- Returns:
- the status as of now
-
stop
public void stop()Description copied from interface:EssApplicationStops the application.- Specified by:
stopin interfaceEssApplication
-
start
public void start()Description copied from interface:EssApplicationStarts the application- Specified by:
startin interfaceEssApplication
-
downloadLatestLog
Description copied from interface:EssApplicationWrites the latest application log to the given output stream.- Specified by:
downloadLatestLogin interfaceEssApplication- Parameters:
outputStream- the output stream
-
readLatestLog
Description copied from interface:EssApplicationReads 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
EssApplication.downloadLatestLog(OutputStream)instead to put it on disk without holding it in memory.- Specified by:
readLatestLogin interfaceEssApplication- Returns:
- the entries, oldest first
-
downloadAllLogsAsZip
Description copied from interface:EssApplicationWrites all logs to the given output stream.- Specified by:
downloadAllLogsAsZipin interfaceEssApplication- Parameters:
outputStream- the output stream
-
getPermissions
Description copied from interface:EssApplicationWho holds which role on this application - Application Manager, Database Manager, Database Update, Database Access.- Specified by:
getPermissionsin interfaceEssApplication- Returns:
- the application role assignments, empty where nobody is provisioned on it specifically
-
downloadProvisionReport
Fetched by hand because the endpoint answers with a spreadsheet, not a model. It also answers 406 to any specific Accept - asking for JSON, CSV or Excel all fail and only*/*succeeds - so the header has to be set deliberately rather than left to the generated client.- Specified by:
downloadProvisionReportin interfaceEssApplication- Parameters:
file- where to write it- Returns:
- the file written
-
getSessions
Description copied from interface:EssApplicationThe 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.- Specified by:
getSessionsin interfaceEssApplication- Returns:
- the sessions
-
killSessions
public void killSessions(boolean logoff) Description copied from interface:EssApplicationEnds every session on this application.- Specified by:
killSessionsin interfaceEssApplication- Parameters:
logoff- true to disconnect the users as well as ending their requests
-