Interface IConnection

All Known Implementing Classes:
Connection

public interface IConnection
represent a connection to server
Author:
khaddadin
  • Method Details

    • getConnectionConfiguration

      IConnectionConfiguration getConnectionConfiguration()
      get the connection configuration of this connection. The configuration includes information like host,port,user name,password and timeout.
      Returns:
      connection configuration of this connection
    • getServerInfo

      IConnectionInfo getServerInfo()
      get the server info object of this connection. Server info object include information like major,minor and bug fix version numbers.
      Returns:
      server info object of this connection
    • isConnected

      boolean isConnected()
      get the server connection status.
      Returns:
      true if connection is opened, false otherwise
    • open

      String open() throws PaloException
      open the connection. This should be called before working on the connection.
      Returns:
      the olap session
      Throws:
      PaloException - exception from OLAP server
    • close

      @Deprecated default void close() throws PaloException
      Deprecated.
      This method is deprecated, use close(boolean) instead and set stop to false.
      close the connection. This should be done when finished from the connection to expire the olap session.
      Throws:
      PaloException - exception from OLAP server
    • close

      void close(boolean stop) throws PaloException
      close the connection. This should be done when finished from the connection to expire the olap session.
      Parameters:
      stop - true will stop any active job for this session will be stopped, false no jobs will be stopped.
      Throws:
      PaloException - exception from OLAP server
    • getDatabases

      IDatabase[] getDatabases() throws PaloException, PaloJException
      get a list of the databases on this server.
      Returns:
      list of the databases.
      Throws:
      PaloException - exception from OLAP server
      PaloJException - exception from the library itself
    • addDatabase

      IDatabase addDatabase(String name) throws PaloException, PaloJException
      create a new database
      Parameters:
      name - the name of the database
      Returns:
      the newly created database
      Throws:
      PaloException - exception from OLAP server
      PaloJException - exception from the library itself
    • addDatabase

      create a new database
      Parameters:
      name - the name of the database
      type - type of the database (normal, user info) *
      Returns:
      the newly created database
      Throws:
      PaloException - exception from OLAP server
      PaloJException - exception from the library itself
    • addDatabase

      IDatabase addDatabase(String name, IDatabase.DatabaseType type, String backupPath) throws PaloException, PaloJException
      create a new database
      Parameters:
      name - the name of the database
      type - type of the database (normal, user info) *
      backupPath - Path to backup file where the database will be loaded from.
      Returns:
      the newly created database
      Throws:
      PaloException - exception from OLAP server
      PaloJException - exception from the library itself
    • addDatabase

      IDatabase addDatabase(String name, String backupPath) throws PaloException, PaloJException
      create a new database
      Parameters:
      name - the name of the database
      backupPath - Path to backup file where the database will be loaded from.
      Returns:
      the newly created database
      Throws:
      PaloException - exception from OLAP server
      PaloJException - exception from the library itself
    • getDatabaseByName

      IDatabase getDatabaseByName(String name) throws PaloJException, PaloException
      get database using its name
      Parameters:
      name - database name
      Returns:
      database object or null if it does not exist
      Throws:
      PaloException - exception from OLAP server
      PaloJException - exception from the library itself
    • save

      @Deprecated default void save() throws PaloException, PaloJException
      Deprecated.
      This method is deprecated, use save(boolean) instead and set complete to false.
      help method that calls IDatabase.save(boolean) with value false for all server databases.
      Throws:
      PaloException - exception from OLAP server
      PaloJException - exception from the library itself
    • save

      void save(boolean complete) throws PaloException, PaloJException
      saves the server data, i. e. identifiers and database names.
      Parameters:
      complete - when true then also databases and all cubes data will be saved, otherwise false.
      Throws:
      PaloException - exception from OLAP server
      PaloJException - exception from the library itself
    • getSvsInfo

      SvsInfo getSvsInfo() throws PaloException, PaloJException
      get the info of supervision server SvsInfo
      Returns:
      svs info
      Throws:
      PaloException - exception from OLAP server
      PaloJException - exception from the library itself
    • getUserInfo

      UserInfo getUserInfo(boolean withPermission) throws PaloException, PaloJException
      get User info of the logged user.
      Parameters:
      withPermission - whether the right_object should also be returned
      Returns:
      user info for the logged user UserInfo
      Throws:
      PaloException - exception from OLAP server
      PaloJException - exception from the library itself
    • removeDatabase

      void removeDatabase(IDatabase database) throws PaloException, PaloJException
      delete a database
      Parameters:
      database - the database to be removed
      Throws:
      PaloException - exception from OLAP server
      PaloJException - exception from the library itself
    • getScriptHandler

      default IScriptHandler getScriptHandler()
    • changePassword

      default void changePassword(String user, String password)
      Change a user password
      Parameters:
      user - The name of the user whose password should be changed. (If null the password is changed for current user)
      password - The plain text new password.