Package org.pentaho.reporting.ui.datasources.jdbc.connection

Examples of org.pentaho.reporting.ui.datasources.jdbc.connection.JndiConnectionDefinition


        final JdbcConnectionDefinition definition = (JdbcConnectionDefinition) model.getElementAt(i);
        if (definition instanceof JndiConnectionDefinition == false)
        {
          continue;
        }
        final JndiConnectionDefinition dcd = (JndiConnectionDefinition) definition;

        if (ObjectUtilities.equal(dcd.getJndiName(), jcp.getConnectionPath()))
        {
          return dcd;
        }
      }
      return new JndiConnectionDefinition(getBundleSupport().getString("JdbcConnectionPanel.CustomConnection"),
          jcp.getConnectionPath(), null, jcp.getUsername(), jcp.getPassword());
    }
    return null;
  }
View Full Code Here


    final JdbcConnectionDefinition connectionDefinition =
        (JdbcConnectionDefinition) getDialogModel().getConnections().getSelectedItem();
    final OlapConnectionProvider connectionProvider;
    if (connectionDefinition instanceof JndiConnectionDefinition)
    {
      final JndiConnectionDefinition jcd = (JndiConnectionDefinition) connectionDefinition;
      final JndiConnectionProvider provider = new JndiConnectionProvider();
      provider.setConnectionPath(jcd.getJndiName());
      provider.setUsername(jcd.getUsername());
      provider.setPassword(jcd.getPassword());
      connectionProvider = provider;
    }
    else if (connectionDefinition instanceof DriverConnectionDefinition)
    {
      final DriverConnectionDefinition dcd = (DriverConnectionDefinition) connectionDefinition;
View Full Code Here

    final SimpleSQLReportDataFactory newDataFactory;

    if (connectionDefinition instanceof JndiConnectionDefinition)
    {
      final JndiConnectionDefinition jcd = (JndiConnectionDefinition) connectionDefinition;
      final JndiConnectionProvider provider = new JndiConnectionProvider();
      provider.setConnectionPath(jcd.getJndiName());
      provider.setUsername(jcd.getUsername());
      provider.setPassword(jcd.getPassword());
      newDataFactory = new SimpleSQLReportDataFactory(provider);
    }
    else if (connectionDefinition instanceof DriverConnectionDefinition)
    {
      final DriverConnectionDefinition dcd = (DriverConnectionDefinition) connectionDefinition;
View Full Code Here

    final JdbcConnectionDefinition connectionDefinition =
        (JdbcConnectionDefinition) getDialogModel().getConnections().getSelectedItem();

    if (connectionDefinition instanceof JndiConnectionDefinition)
    {
      final JndiConnectionDefinition jcd = (JndiConnectionDefinition) connectionDefinition;
      final JndiConnectionProvider provider = new JndiConnectionProvider();
      provider.setConnectionPath(jcd.getJndiName());
      provider.setUsername(jcd.getUsername());
      provider.setPassword(jcd.getPassword());
      return new SimpleDenormalizedMDXDataFactory(provider);
    }
    else if (connectionDefinition instanceof DriverConnectionDefinition)
    {
      final DriverConnectionDefinition dcd = (DriverConnectionDefinition) connectionDefinition;
View Full Code Here

    final JdbcConnectionDefinition connectionDefinition =
        (JdbcConnectionDefinition) getDialogModel().getConnections().getSelectedItem();

    if (connectionDefinition instanceof JndiConnectionDefinition)
    {
      final JndiConnectionDefinition jcd = (JndiConnectionDefinition) connectionDefinition;
      final JndiConnectionProvider provider = new JndiConnectionProvider();
      provider.setConnectionPath(jcd.getJndiName());
      provider.setUsername(jcd.getUsername());
      provider.setPassword(jcd.getPassword());
      returnDataFactory = new BandedMDXDataFactory(provider);
    }
    else if (connectionDefinition instanceof DriverConnectionDefinition)
    {
      final DriverConnectionDefinition dcd = (DriverConnectionDefinition) connectionDefinition;
View Full Code Here

    final JdbcConnectionDefinition connectionDefinition =
        (JdbcConnectionDefinition) getDialogModel().getConnections().getSelectedItem();

    if (connectionDefinition instanceof JndiConnectionDefinition)
    {
      final JndiConnectionDefinition jcd = (JndiConnectionDefinition) connectionDefinition;
      final JndiConnectionProvider provider = new JndiConnectionProvider();
      provider.setConnectionPath(jcd.getJndiName());
      provider.setUsername(jcd.getUsername());
      provider.setPassword(jcd.getPassword());
      returnDataFactory = new DenormalizedMDXDataFactory(provider);
    }
    else if (connectionDefinition instanceof DriverConnectionDefinition)
    {
      final DriverConnectionDefinition dcd = (DriverConnectionDefinition) connectionDefinition;
View Full Code Here

  private SQLReportDataFactory createDataFactory(final JdbcConnectionDefinition connectionDefinition)
  {
    final ConnectionProvider connectionProvider;
    if (connectionDefinition instanceof JndiConnectionDefinition)
    {
      final JndiConnectionDefinition jcd = (JndiConnectionDefinition) connectionDefinition;
      final JndiConnectionProvider provider = new JndiConnectionProvider();
      provider.setConnectionPath(jcd.getJndiName());
      provider.setUsername(jcd.getUsername());
      provider.setPassword(jcd.getPassword());
      connectionProvider = provider;
    }
    else if (connectionDefinition instanceof DriverConnectionDefinition)
    {
      final DriverConnectionDefinition dcd = (DriverConnectionDefinition) connectionDefinition;
View Full Code Here

    final JdbcConnectionDefinition connectionDefinition =
        (JdbcConnectionDefinition) getDialogModel().getConnections().getSelectedItem();

    if (connectionDefinition instanceof JndiConnectionDefinition)
    {
      final JndiConnectionDefinition jcd = (JndiConnectionDefinition) connectionDefinition;
      final JndiConnectionProvider provider = new JndiConnectionProvider();
      provider.setConnectionPath(jcd.getJndiName());
      provider.setUsername(jcd.getUsername());
      provider.setPassword(jcd.getPassword());
      return new SimpleDenormalizedMDXDataFactory(provider);
    }
    else if (connectionDefinition instanceof DriverConnectionDefinition)
    {
      final DriverConnectionDefinition dcd = (DriverConnectionDefinition) connectionDefinition;
View Full Code Here

        this.meta.addExtraOption(meta.getPluginId(), key, (String) entry.getValue());
      }
    }
    else if (def instanceof JndiConnectionDefinition)
    {
      final JndiConnectionDefinition jndiDef = (JndiConnectionDefinition) def;
      this.meta = new DatabaseMeta();
      this.meta.setDBName(jndiDef.getJndiName()); //JNDI name stored in DBname
      this.meta.setName(jndiDef.getName());
      try
      {
        if (jndiDef.getDatabaseType() != null)
        {
          this.meta.setDatabaseType(jndiDef.getDatabaseType());
        }
      }
      catch (RuntimeException re)
      {
        // even invalid values should not kill us.
View Full Code Here

  {
    if (meta.getAccessType() == DatabaseMeta.TYPE_ACCESS_JNDI)
    {
      final String username = meta.getUsername();
      final String password = meta.getPassword();
      return new JndiConnectionDefinition(meta.getName(),
          meta.getDatabaseName(),
          meta.getDatabaseInterface().getPluginName(),
          StringUtils.isEmpty(username) ? null : username,
          StringUtils.isEmpty(password) ? null : password);
    }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.ui.datasources.jdbc.connection.JndiConnectionDefinition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.