Package org.pentaho.platform.api.repository.datasource

Examples of org.pentaho.platform.api.repository.datasource.DatasourceMgmtServiceException


      }
      // } catch(PasswordServiceException pse) {
      // throw new DatasourceMgmtServiceException(Messages.getInstance().getErrorString(
      //      "DatasourceMgmtService.ERROR_0007_UNABLE_TO_ENCRYPT_PASSWORD"), pse ); //$NON-NLS-1$
    } catch ( UnifiedRepositoryException ure ) {
      throw new DatasourceMgmtServiceException(
          Messages
              .getInstance()
              .getErrorString(
                  "DatasourceMgmtService.ERROR_0001_UNABLE_TO_CREATE_DATASOURCE", databaseConnection.getName(), ure.getLocalizedMessage() ), ure ); //$NON-NLS-1$
    }
View Full Code Here


    DatasourceMgmtServiceException {
    RepositoryFile fileToDelete = null;
    try {
      fileToDelete = repository.getFile( getPath( name ) );
    } catch ( UnifiedRepositoryException ure ) {
      throw new DatasourceMgmtServiceException(
          Messages
              .getInstance()
              .getErrorString(
                  "DatasourceMgmtService.ERROR_0002_UNABLE_TO_DELETE_DATASOURCE", fileToDelete.getName(), ure.getLocalizedMessage() ), ure ); //$NON-NLS-1$
    }
View Full Code Here

  public void deleteDatasourceById( String id ) throws NonExistingDatasourceException, DatasourceMgmtServiceException {
    RepositoryFile fileToDelete = null;
    try {
      fileToDelete = repository.getFileById( id );
    } catch ( UnifiedRepositoryException ure ) {
      throw new DatasourceMgmtServiceException(
          Messages
              .getInstance()
              .getErrorString(
                  "DatasourceMgmtService.ERROR_0002_UNABLE_TO_DELETE_DATASOURCE", fileToDelete.getName(), ure.getLocalizedMessage() ), ure ); //$NON-NLS-1$
    }
View Full Code Here

    try {
      if ( file != null ) {
        // Permanently Deletes the File
        repository.deleteFile( file.getId(), true, null );
      } else {
        throw new DatasourceMgmtServiceException( Messages.getInstance().getErrorString(
            "DatasourceMgmtService.ERROR_0002_UNABLE_TO_DELETE_DATASOURCE", "", "" ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$      
      }
    } catch ( UnifiedRepositoryException ure ) {
      throw new DatasourceMgmtServiceException(
          Messages
              .getInstance()
              .getErrorString(
                  "DatasourceMgmtService.ERROR_0002_UNABLE_TO_DELETE_DATASOURCE", file.getName(), ure.getLocalizedMessage() ), ure ); //$NON-NLS-1$
    }
View Full Code Here

  public IDatabaseConnection getDatasourceByName( String name ) throws DatasourceMgmtServiceException {
    RepositoryFile file = null;
    try {
      file = repository.getFile( getPath( name ) );
    } catch ( UnifiedRepositoryException ure ) {
      throw new DatasourceMgmtServiceException( Messages.getInstance().getErrorString(
          "DatasourceMgmtService.ERROR_0004_UNABLE_TO_RETRIEVE_DATASOURCE", name, ure.getLocalizedMessage() ), ure ); //$NON-NLS-1$
    }
    if ( file != null ) {
      return getDatasource( file );
    }
View Full Code Here

  public IDatabaseConnection getDatasourceById( String id ) throws DatasourceMgmtServiceException {
    RepositoryFile file = null;
    try {
      file = repository.getFileById( id );
    } catch ( UnifiedRepositoryException ure ) {
      throw new DatasourceMgmtServiceException( Messages.getInstance().getErrorString(
          "DatasourceMgmtService.ERROR_0004_UNABLE_TO_RETRIEVE_DATASOURCE", file.getName() ), ure ); //$NON-NLS-1$
    }
    if ( file != null ) {
      return getDatasource( file );
    }
View Full Code Here

        // IPasswordService passwordService = PentahoSystem.get(IPasswordService.class,
        // PentahoSessionHolder.getSession());
        // databaseMeta.setPassword(passwordService.decrypt(databaseMeta.getPassword()));
        return databaseConnection;
      } else {
        throw new DatasourceMgmtServiceException( Messages.getInstance().getErrorString(
            "DatasourceMgmtService.ERROR_0004_UNABLE_TO_RETRIEVE_DATASOURCE", "", "" ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
      }
      // } catch(PasswordServiceException pse) {
      // throw new DatasourceMgmtServiceException(Messages.getInstance()
      //      .getErrorString("DatasourceMgmtService.ERROR_0008_UNABLE_TO_DECRYPT_PASSWORD"), pse ); //$NON-NLS-1$
    } catch ( UnifiedRepositoryException ure ) {
      throw new DatasourceMgmtServiceException(
          Messages
              .getInstance()
              .getErrorString(
                  "DatasourceMgmtService.ERROR_0004_UNABLE_TO_RETRIEVE_DATASOURCE", file.getName(), ure.getLocalizedMessage() ), ure ); //$NON-NLS-1$
    }
View Full Code Here

      return datasourceList;
      // } catch(PasswordServiceException pse) {
      // throw new DatasourceMgmtServiceException(Messages.getInstance()
      //      .getErrorString("DatasourceMgmtService.ERROR_0008_UNABLE_TO_DECRYPT_PASSWORD"), pse ); //$NON-NLS-1$
    } catch ( UnifiedRepositoryException ure ) {
      throw new DatasourceMgmtServiceException( Messages.getInstance().getErrorString(
          "DatasourceMgmtService.ERROR_0004_UNABLE_TO_RETRIEVE_DATASOURCE", "", ure.getLocalizedMessage() ), ure ); //$NON-NLS-1$ //$NON-NLS-2$
    }
  }
View Full Code Here

          datasourceList.add( file.getId().toString() );
        }
      }
      return datasourceList;
    } catch ( UnifiedRepositoryException ure ) {
      throw new DatasourceMgmtServiceException( Messages.getInstance().getErrorString(
          "DatasourceMgmtService.ERROR_0004_UNABLE_TO_RETRIEVE_DATASOURCE", "", ure.getLocalizedMessage() ), ure ); //$NON-NLS-1$ //$NON-NLS-2$
    }
  }
View Full Code Here

    throws NonExistingDatasourceException, DatasourceMgmtServiceException {
    RepositoryFile file = null;
    try {
      file = repository.getFileById( id );
    } catch ( UnifiedRepositoryException ure ) {
      throw new DatasourceMgmtServiceException(
          Messages
              .getInstance()
              .getErrorString(
                  "DatasourceMgmtService.ERROR_0003_UNABLE_TO_UPDATE_DATASOURCE", databaseConnection.getName(), ure.getLocalizedMessage() ), ure ); //$NON-NLS-1$
    }
View Full Code Here

TOP

Related Classes of org.pentaho.platform.api.repository.datasource.DatasourceMgmtServiceException

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.