Package com.jedox.palojlib.main
Class Connection
java.lang.Object
com.jedox.palojlib.main.Connection
- All Implemented Interfaces:
IConnection
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConnection(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 databasevoidchangePassword(String user, String password) Change a user passwordcheckLicense(String required, String optional) voidclose(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 serverSvsInfogetUserInfo(boolean withPermission) get User info of the logged user.booleanget the server connection status.open()open the connection.voiddelete a databasevoidvoidsave(boolean complete) saves the server data, i.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
PaloExceptionPaloJException
-
-
Method Details
-
getConnectionConfiguration
Description copied from interface:IConnectionget the connection configuration of this connection. The configuration includes information like host,port,user name,password and timeout.- Specified by:
getConnectionConfigurationin interfaceIConnection- Returns:
- connection configuration of this connection
-
isConnected
public boolean isConnected()Description copied from interface:IConnectionget the server connection status.- Specified by:
isConnectedin interfaceIConnection- Returns:
- true if connection is opened, false otherwise
-
getServerInfo
Description copied from interface:IConnectionget the server info object of this connection. Server info object include information like major,minor and bug fix version numbers.- Specified by:
getServerInfoin interfaceIConnection- Returns:
- server info object of this connection
-
open
Description copied from interface:IConnectionopen the connection. This should be called before working on the connection.- Specified by:
openin interfaceIConnection- Returns:
- the olap session
- Throws:
PaloException- exception from OLAP serverRuntimeException
-
openInternal
- Throws:
RuntimeException
-
close
Description copied from interface:IConnectionclose the connection. This should be done when finished from the connection to expire the olap session.- Specified by:
closein 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:IConnectionget a list of the databases on this server.- Specified by:
getDatabasesin interfaceIConnection- Returns:
- list of the databases.
- Throws:
PaloException- exception from OLAP serverPaloJException- exception from the library itself
-
addDatabase
Description copied from interface:IConnectioncreate a new database- Specified by:
addDatabasein 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:IConnectioncreate a new database- Specified by:
addDatabasein 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:IConnectionget database using its name- Specified by:
getDatabaseByNamein 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:IConnectionsaves the server data, i. e. identifiers and database names.- Specified by:
savein 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:IConnectionget the info of supervision serverSvsInfo- Specified by:
getSvsInfoin interfaceIConnection- Returns:
- svs info
- Throws:
PaloException- exception from OLAP serverPaloJException- exception from the library itself
-
getUserInfo
Description copied from interface:IConnectionget User info of the logged user.- Specified by:
getUserInfoin 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:IConnectiondelete a database- Specified by:
removeDatabasein 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:IConnectioncreate a new database- Specified by:
addDatabasein 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:IConnectioncreate a new database- Specified by:
addDatabasein 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:
getScriptHandlerin interfaceIConnection
-
checkLicense
- Throws:
RuntimeException
-
getLicenseKey
- Throws:
PaloException
-
changePassword
Description copied from interface:IConnectionChange a user password- Specified by:
changePasswordin 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
-