Interface EssApplication

All Superinterfaces:
EssObject
All Known Implementing Classes:
EssApplicationImpl

public interface EssApplication extends EssObject
  • 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

      List<EssCube> 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

      EssCube getCube(String cubeName)
      Gets a cube with the given name.
      Parameters:
      cubeName - the name of the cube
      Returns:
      the cube
    • copy

      void copy(String copyName)
      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

      void rename(String newName)
      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

      List<EssJob> 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

      EssApplicationVariable createVariable(String name, String value)
      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 name
      value - its value
      Returns:
      the created variable
    • getStatus

      Gets the status of this application. Known statuses are simply STOPPED and STARTED; other statuses, if they exist, are not known at this time and will simply get converted to UNKNOWN.

      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

      void downloadLatestLog(OutputStream outputStream)
      Writes the latest application log to the given output stream.
      Parameters:
      outputStream - the output stream
    • downloadAllLogsAsZip

      void downloadAllLogsAsZip(OutputStream outputStream)
      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

      File downloadProvisionReport(File file)
      Downloads this application's provisioning report.

      A spreadsheet rather than data: the endpoint answers with an .xlsx attachment, and 406 to any Accept that 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 /sessions takes 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