Package com.jedox.palojlib.main
Class Connection
java.lang.Object
com.jedox.palojlib.main.Connection
- All Implemented Interfaces:
IConnection
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Connection
(IConnectionConfiguration connectionConfiguration) -
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 databasevoid
changePassword
(String user, String password) Change a user passwordcheckLicense
(String required, String optional) void
close
(boolean stop) close the connection.get the connection configuration of this connection.getDatabaseByName
(String name) get database using its nameDatabase[]
get a list of the databases on this server.getLicenseKey
(String id) 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
delete a databasevoid
void
save
(boolean complete) saves the server data, i.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.jedox.palojlib.interfaces.IConnection
close, save
-
Field Details
-
isConnected
protected boolean isConnected -
connectionConfiguration
-
-
Constructor Details
-
Connection
protected Connection(IConnectionConfiguration connectionConfiguration) throws PaloException, PaloJException - Throws:
PaloException
PaloJException
-
-
Method Details
-
getConnectionConfiguration
Description copied from interface:IConnection
get the connection configuration of this connection. The configuration includes information like host,port,user name,password and timeout.- Specified by:
getConnectionConfiguration
in interfaceIConnection
- Returns:
- connection configuration of this connection
-
isConnected
public boolean isConnected()Description copied from interface:IConnection
get the server connection status.- Specified by:
isConnected
in interfaceIConnection
- Returns:
- true if connection is opened, false otherwise
-
getServerInfo
Description copied from interface:IConnection
get the server info object of this connection. Server info object include information like major,minor and bug fix version numbers.- Specified by:
getServerInfo
in interfaceIConnection
- Returns:
- server info object of this connection
-
open
Description copied from interface:IConnection
open the connection. This should be called before working on the connection.- Specified by:
open
in interfaceIConnection
- Returns:
- the olap session
- Throws:
PaloException
- exception from OLAP serverRuntimeException
-
openInternal
- Throws:
RuntimeException
-
close
Description copied from interface:IConnection
close the connection. This should be done when finished from the connection to expire the olap session.- Specified by:
close
in interfaceIConnection
- 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
Description copied from interface:IConnection
get a list of the databases on this server.- Specified by:
getDatabases
in interfaceIConnection
- Returns:
- list of the databases.
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
addDatabase
Description copied from interface:IConnection
create a new database- Specified by:
addDatabase
in interfaceIConnection
- Parameters:
name
- the name of the database- Returns:
- the newly created database
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
addDatabase
public IDatabase addDatabase(String name, IDatabase.DatabaseType type) throws PaloException, PaloJException Description copied from interface:IConnection
create a new database- Specified by:
addDatabase
in interfaceIConnection
- 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
-
getDatabaseByName
Description copied from interface:IConnection
get database using its name- Specified by:
getDatabaseByName
in interfaceIConnection
- 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
Description copied from interface:IConnection
saves the server data, i. e. identifiers and database names.- Specified by:
save
in interfaceIConnection
- 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
-
resetCache
public void resetCache() -
getSvsInfo
Description copied from interface:IConnection
get the info of supervision serverSvsInfo
- Specified by:
getSvsInfo
in interfaceIConnection
- Returns:
- svs info
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
getUserInfo
Description copied from interface:IConnection
get User info of the logged user.- Specified by:
getUserInfo
in interfaceIConnection
- 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
Description copied from interface:IConnection
delete a database- Specified by:
removeDatabase
in interfaceIConnection
- Parameters:
db
- the database to be removed- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
addDatabase
public IDatabase addDatabase(String name, IDatabase.DatabaseType type, String backupPath) throws PaloException, PaloJException Description copied from interface:IConnection
create a new database- Specified by:
addDatabase
in interfaceIConnection
- 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
Description copied from interface:IConnection
create a new database- Specified by:
addDatabase
in interfaceIConnection
- 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
-
getScriptHandler
- Specified by:
getScriptHandler
in interfaceIConnection
-
checkLicense
- Throws:
RuntimeException
-
getLicenseKey
- Throws:
PaloException
-
changePassword
Description copied from interface:IConnection
Change a user password- Specified by:
changePassword
in interfaceIConnection
- 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.- Throws:
PaloException
-