Package com.jedox.palojlib.interfaces
Interface IConnection
- All Known Implementing Classes:
Connection
public interface IConnection
represent a connection to server
- Author:
- khaddadin
-
Method Summary
Modifier and TypeMethodDescriptionaddDatabase
(String name) create a new databaseaddDatabase
(String name, IDatabase.DatabaseType type) create a new databaseaddDatabase
(String name, IDatabase.DatabaseType type, String backupPath) create a new databaseaddDatabase
(String name, String backupPath) create a new databasedefault void
changePassword
(String user, String password) Change a user passworddefault void
close()
Deprecated.void
close
(boolean stop) close the connection.get the connection configuration of this connection.getDatabaseByName
(String name) get database using its nameget a list of the databases on this server.default IScriptHandler
get the server info object of this connection.get the info of supervision serverSvsInfo
getUserInfo
(boolean withPermission) get User info of the logged user.boolean
get the server connection status.open()
open the connection.void
removeDatabase
(IDatabase database) delete a databasedefault void
save()
Deprecated.void
save
(boolean complete) saves the server data, i.
-
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
open the connection. This should be called before working on the connection.- Returns:
- the olap session
- Throws:
PaloException
- exception from OLAP server
-
close
Deprecated.close the connection. This should be done when finished from the connection to expire the olap session.- Throws:
PaloException
- exception from OLAP server
-
close
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
get a list of the databases on this server.- Returns:
- list of the databases.
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
addDatabase
create a new database- Parameters:
name
- the name of the database- Returns:
- the newly created database
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
addDatabase
IDatabase addDatabase(String name, IDatabase.DatabaseType type) throws PaloException, PaloJException create a new database- Parameters:
name
- the name of the databasetype
- type of the database (normal, user info) *- Returns:
- the newly created database
- Throws:
PaloException
- exception from OLAP serverPaloJException
- 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 databasetype
- 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 serverPaloJException
- exception from the library itself
-
addDatabase
create a new database- Parameters:
name
- the name of the databasebackupPath
- Path to backup file where the database will be loaded from.- Returns:
- the newly created database
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
getDatabaseByName
get database using its name- Parameters:
name
- database name- Returns:
- database object or null if it does not exist
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
save
Deprecated.help method that callsIDatabase.save(boolean)
with value false for all server databases.- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
save
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 serverPaloJException
- exception from the library itself
-
getSvsInfo
get the info of supervision serverSvsInfo
- Returns:
- svs info
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
getUserInfo
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 serverPaloJException
- exception from the library itself
-
removeDatabase
delete a database- Parameters:
database
- the database to be removed- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
getScriptHandler
-
changePassword
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.
-
close(boolean)
instead and setstop
tofalse
.