Class EssCubeImpl

java.lang.Object
com.appliedolap.essbase.AbstractEssObject
com.appliedolap.essbase.impl.EssCubeImpl
All Implemented Interfaces:
EssCube, EssObject

public class EssCubeImpl extends AbstractEssObject implements EssCube
Represents an Essbase cube on the server.
  • Constructor Details

    • EssCubeImpl

      public EssCubeImpl(ApiContext api, EssApplication application, com.appliedolap.essbase.client.model.Cube cube)
  • Method Details

    • getName

      public String getName()
      Description copied from interface: EssObject
      Gets 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.
      Specified by:
      getName in interface EssObject
      Returns:
      the simple name of this object
    • getType

      public EssObject.Type getType()
      Description copied from interface: EssObject
      Gets the type of this object.
      Specified by:
      getType in interface EssObject
      Returns:
      the object type
    • getCalcScripts

      public List<EssScript> getCalcScripts()
      Description copied from interface: EssCube
      Get the list of scripts associated with this cube.
      Specified by:
      getCalcScripts in interface EssCube
      Returns:
      the scripts on this cube
    • getApplication

      public EssApplication getApplication()
      Description copied from interface: EssCube
      Gets the parent application of this cube.
      Specified by:
      getApplication in interface EssCube
      Returns:
      the parent application
    • getSessions

      public List<EssSession> getSessions()
      Description copied from interface: EssCube
      Gets the list of sessions on this cube.
      Specified by:
      getSessions in interface EssCube
      Returns:
      the current cube sessions
    • getVariables

      public List<EssCubeVariable> getVariables()
      Description copied from interface: EssCube
      Gets the list of variables specific to this cube. The return type is an EssVariableImpl, however, the actual implementation will be the subclass EssCubeVariableImpl. The EssVariableImpl.getScope() method can be used to check the variable type and cast as needed.
      Specified by:
      getVariables in interface EssCube
      Returns:
      the cube variables
    • getOutline

      public EssOutline getOutline()
      Description copied from interface: EssCube
      Gets an outline object for this cube.
      Specified by:
      getOutline in interface EssCube
      Returns:
      an outline object
    • isScenariosEnabled

      public boolean isScenariosEnabled()
      Description copied from interface: EssCube
      Checks if this cube has scenarios enabled.
      Specified by:
      isScenariosEnabled in interface EssCube
      Returns:
      true if scenarios are enabled, false otherwise
    • createDrillthroughURL

      public EssDrillthrough createDrillthroughURL(String urlName, String urlLink, List<String> drillRegions)
      Description copied from interface: EssCube
      Creates a URL-type drill-through on the cube,
      Specified by:
      createDrillthroughURL in interface EssCube
      Parameters:
      urlName - the name (no spaces?!)
      urlLink - the drill-through link
      drillRegions - the drillable regions
      Returns:
      a new drill-through object
    • getDrillthroughs

      public List<EssDrillthrough> getDrillthroughs()
      Description copied from interface: EssCube
      Get list of drill-through reports on the cube.
      Specified by:
      getDrillthroughs in interface EssCube
      Returns:
      the list of cube drill-through reports
    • getDrillthrough

      public EssDrillthrough getDrillthrough(String drillthroughName)
      Description copied from interface: EssCube
      Gets 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:
      getDrillthrough in interface EssCube
      Parameters:
      drillthroughName - the name of the drill-through report
      Returns:
      a drill-through report object
    • getScenarios

      public List<EssScenario> getScenarios()
      Description copied from interface: EssCube
      Gets the list of scenarios on the cube, if any.
      Specified by:
      getScenarios in interface EssCube
      Returns:
      the cube's scenarios
    • getMember

      public EssMember getMember(String memberName)
      Description copied from interface: EssCube
      Gets 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.
      Specified by:
      getMember in interface EssCube
      Parameters:
      memberName - the name of the member
      Returns:
      the member
    • getDimensions

      public List<EssDimension> getDimensions()
      Description copied from interface: EssCube
      Gets the list of dimensions on the cube, if any.
      Specified by:
      getDimensions in interface EssCube
      Returns:
      the cube's dimensions
    • getLockedObjects

      public List<EssLock> getLockedObjects(Integer offset, Integer limit)
      Description copied from interface: EssCube
      List Locked Objects Returns all the locked objects from the specified application and database
      Specified by:
      getLockedObjects in interface EssCube
      Parameters:
      offset - Number of items to omit from the start of the result set. Default value is 0
      limit - Maximum number of objects to return. Default is 50
      Returns:
      LockObjectLis
    • unlockObject

      public void unlockObject(EssLock lockedObject)
      Description copied from interface: EssCube
      Unlock Object Unlocks the object in the specified application and database
      Specified by:
      unlockObject in interface EssCube
      Parameters:
      lockedObject - Details about object to be unlocked
    • lockObject

      public void lockObject(EssLock unlockedObject)
      Description copied from interface: EssCube
      Lock Object Locks the object in the specified application and database and returns the details of the locked object
      Specified by:
      lockObject in interface EssCube
      Parameters:
      unlockedObject - Object details to be locked (required)
    • exportExcel

      public void exportExcel()
      Description copied from interface: EssCube
      Exports this cube to an Excel workbook.
      Specified by:
      exportExcel in interface EssCube
    • importExcel

      public void importExcel(String path, String filename)
      Description copied from interface: EssCube
      Updates this cube using an Excel workbook. This API is likely to change soon to take an EssFile reference
      Specified by:
      importExcel in interface EssCube
      Parameters:
      path - the path
      filename - the filename
    • importFile

      public void importFile(File file)
      Description copied from interface: EssCube
      Acts 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:
      importFile in interface EssCube
      Parameters:
      file - the file to upload to the cube
    • executeMdx

      public void executeMdx(String query, EssCube.MdxOutputType outputType, EssCubeImpl.MdxOptions mdxOptions, OutputStream outputStream)
      Specified by:
      executeMdx in interface EssCube
    • executeMdx

      public EssGrid executeMdx(String query)
      Specified by:
      executeMdx in interface EssCube
    • openCubeView

      public EssCubeView openCubeView()
      Description copied from interface: EssCube
      Opens a live, ad hoc grid view on this cube using its default layout - the REST analog of the Java API's IEssCube.openCubeView.
      Specified by:
      openCubeView in interface EssCube
      Returns:
      a navigable cube view
    • openCubeView

      public EssCubeView openCubeView(String layoutName)
      Description copied from interface: EssCube
      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".
      Specified by:
      openCubeView in interface EssCube
      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 /session when 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 /session answers 500 on Essbase 26.1, so asking it first made this method, and therefore every fresh ad hoc grid, fail outright there.

      Specified by:
      resetDefaultView in interface EssCube