Class PentahoConnectionFactory
- java.lang.Object
-
- org.pentaho.platform.engine.services.connection.PentahoConnectionFactory
-
public class PentahoConnectionFactory extends Object
- Author:
- wseyler TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates
-
-
Constructor Summary
Constructors Constructor Description PentahoConnectionFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.pentaho.commons.connection.IPentahoConnection
getConnection(String datasourceType, String driver, String location, String userName, String password, org.pentaho.platform.api.engine.IPentahoSession session, org.pentaho.platform.api.engine.ILogger logger)
static org.pentaho.commons.connection.IPentahoConnection
getConnection(String datasourceType, String connectStr, org.pentaho.platform.api.engine.IPentahoSession session, org.pentaho.platform.api.engine.ILogger logger)
static org.pentaho.commons.connection.IPentahoConnection
getConnection(String datasourceType, Properties properties, org.pentaho.platform.api.engine.IPentahoSession session, org.pentaho.platform.api.engine.ILogger logger)
static org.pentaho.commons.connection.IPentahoConnection
getConnection(String datasourceType, org.pentaho.platform.api.engine.IPentahoSession session, org.pentaho.platform.api.engine.ILogger logger)
static boolean
hasSystemDataSourcePermission(org.pentaho.platform.api.engine.IPentahoSession session)
static boolean
isSystemConnection(Properties properties)
-
-
-
Method Detail
-
getConnection
public static org.pentaho.commons.connection.IPentahoConnection getConnection(String datasourceType, org.pentaho.platform.api.engine.IPentahoSession session, org.pentaho.platform.api.engine.ILogger logger)
- Parameters:
datasourceType
- valid type is defined as SQL_DATASOURCE or MDX_DATASOURCE- Returns:
- a connection object that can be queried against.
-
getConnection
public static org.pentaho.commons.connection.IPentahoConnection getConnection(String datasourceType, String connectStr, org.pentaho.platform.api.engine.IPentahoSession session, org.pentaho.platform.api.engine.ILogger logger)
- Parameters:
datasourceType
- valid type is defined as SQL_DATASOURCE or MDX_DATASOURCEconnectStr
- - In the case of SQL_DATASOURCE, the name of the JNDI connection to use. Or in the case of MDX_DATASOURCE a properly formatted connection String.- Returns:
- a connection object that can be queried against.
-
getConnection
public static org.pentaho.commons.connection.IPentahoConnection getConnection(String datasourceType, String driver, String location, String userName, String password, org.pentaho.platform.api.engine.IPentahoSession session, org.pentaho.platform.api.engine.ILogger logger)
- Parameters:
datasourceType
- valid types are defined as SQL_DATASOURCE, MDX_DATASOURCE and XML_DATASOURCElocation
- - A string specfic to the location and type of datasource. For an SQL instance it would be the URL string required by the implementing driver.userName
-password
-- Returns:
- a connection object that can be queried against.
-
getConnection
public static org.pentaho.commons.connection.IPentahoConnection getConnection(String datasourceType, Properties properties, org.pentaho.platform.api.engine.IPentahoSession session, org.pentaho.platform.api.engine.ILogger logger)
- Parameters:
datasourceType
-properties
- can be nullsession
- can be nulllogger
-- Returns:
-
isSystemConnection
public static boolean isSystemConnection(Properties properties)
-
hasSystemDataSourcePermission
public static boolean hasSystemDataSourcePermission(org.pentaho.platform.api.engine.IPentahoSession session)
-
-