Search in sources :

Example 1 with PropertyServerException

use of org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException in project egeria-database-connectors by odpi.

the class PostgresDatabaseConnector method updateTableColumns.

/**
 * @param postgresTable         the Postgres table which contains the columns to be updates
 * @param  egeriaTable  the column data from Egeria
 * @throws AlreadyHandledException this exception has already been logged
 */
private void updateTableColumns(PostgresTable postgresTable, DatabaseTableElement egeriaTable) throws AlreadyHandledException {
    final String methodName = "updateTableColumns";
    PostgresSourceDatabase source = new PostgresSourceDatabase(this.connectionProperties);
    String tableGuid = egeriaTable.getElementHeader().getGUID();
    try {
        List<PostgresColumn> postgresColumns = source.getColumns(postgresTable.getTable_name());
        List<DatabaseColumnElement> egeriaColumns = getContext().getColumnsForDatabaseTable(tableGuid, startFrom, pageSize);
        List<String> primarykeys = source.getPrimaryKeyColumnNamesForTable(postgresTable.getTable_name());
        if (egeriaColumns != null && postgresColumns.size() > 0) {
            egeriaColumns = deleteTableColumns(postgresColumns, egeriaColumns);
        }
        for (PostgresColumn postgresColumn : postgresColumns) {
            boolean found = false;
            /*
                    we have no columns in Egeria
                    so all columns are new
                     */
            if (egeriaColumns == null) {
                if (postgresColumns.size() > 0) {
                    addColumn(postgresColumn, tableGuid);
                }
            } else {
                /*
                        check if the database table is known to Egeria
                        and needs to be updated
                         */
                for (DatabaseColumnElement egeriaColumn : egeriaColumns) {
                    if (egeriaColumn.getDatabaseColumnProperties().getQualifiedName().equals(postgresColumn.getQualifiedName())) {
                        /*
                            we have found an exact instance to update
                             */
                        found = true;
                        // updateColumn(postgresColumn, egeriaColumn);
                        break;
                    }
                    if (primarykeys.contains(egeriaColumn.getDatabaseColumnProperties().getDisplayName())) {
                        DatabasePrimaryKeyProperties props = new DatabasePrimaryKeyProperties();
                        getContext().setPrimaryKeyOnColumn(egeriaColumn.getElementHeader().getGUID(), props);
                    } else {
                        // was this a primary key previously.
                        if (egeriaColumn.getPrimaryKeyProperties() != null) {
                            getContext().removePrimaryKeyFromColumn(egeriaColumn.getElementHeader().getGUID());
                        }
                    }
                }
                /*
                        this is a new database so add it
                         */
                if (!found) {
                    addColumn(postgresColumn, tableGuid);
                }
            }
        }
    } catch (SQLException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.ERROR_READING_POSTGRES.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.ERROR_READING_FROM_POSTGRES.getMessageDefinition(methodName));
    } catch (InvalidParameterException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.INVALID_PARAMETER_EXCEPTION.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.INVALID_PARAMETER_EXCEPTION.getMessageDefinition(methodName));
    } catch (UserNotAuthorizedException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.USER_NOT_AUTHORIZED_EXCEPTION.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.USER_NOT_AUTHORIZED_EXCEPTION.getMessageDefinition(methodName));
    } catch (PropertyServerException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.PROPERTY_SERVER_EXCEPTION.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.PROPERTY_SERVER_EXCEPTION.getMessageDefinition(methodName));
    } catch (ConnectorCheckedException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.CONNECTOR_CHECKED_EXCEPTION.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.CONNECTOR_CHECKED_EXCEPTION.getMessageDefinition(methodName));
    } catch (Exception error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.UNEXPECTED_ERROR.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.UNEXPECTED_ERROR.getMessageDefinition(methodName));
    }
}
Also used : PropertyServerException(org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException) DatabaseColumnElement(org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseColumnElement) SQLException(java.sql.SQLException) InvalidParameterException(org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException) AlreadyHandledException(org.odpi.openmetadata.adapters.connectors.integration.postgres.ffdc.AlreadyHandledException) SQLException(java.sql.SQLException) UserNotAuthorizedException(org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException) ConnectorCheckedException(org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException) PropertyServerException(org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException) InvalidParameterException(org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException) PostgresColumn(org.odpi.openmetadata.adapters.connectors.integration.postgres.properties.PostgresColumn) UserNotAuthorizedException(org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException) ConnectorCheckedException(org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException)

Example 2 with PropertyServerException

use of org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException in project egeria-database-connectors by odpi.

the class PostgresDatabaseConnector method deleteTableColumns.

/**
 * Checks if any columns need to be removed from Egeria
 *
 * @param postgresColumns            a list of the bean properties of a Postgres cols
 * @param egeriaColumns               a list of the  cols already known to Egeria
 * @throws AlreadyHandledException this exception has already been logged
 */
private List<DatabaseColumnElement> deleteTableColumns(List<PostgresColumn> postgresColumns, List<DatabaseColumnElement> egeriaColumns) throws AlreadyHandledException {
    String methodName = "deleteTableColumns";
    try {
        if (egeriaColumns != null) {
            /*
                for each column already known to Egeria
                 */
            for (Iterator<DatabaseColumnElement> itr = egeriaColumns.iterator(); itr.hasNext(); ) {
                boolean found = false;
                DatabaseColumnElement egeriaColumn = itr.next();
                String knownName = egeriaColumn.getDatabaseColumnProperties().getQualifiedName();
                /*
                    check that the database is still present in Postgres
                     */
                for (PostgresColumn postgresColumn : postgresColumns) {
                    String sourceName = postgresColumn.getQualifiedName();
                    if (sourceName.equals(knownName)) {
                        /*
                            if found then check the next column
                             */
                        found = true;
                        break;
                    }
                }
                /*
                        not found in Postgres , so delete the table from Egeria
                         */
                if (!found) {
                    getContext().removeDatabaseView(egeriaColumn.getElementHeader().getGUID(), knownName);
                    itr.remove();
                }
            }
        }
    } catch (InvalidParameterException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.INVALID_PARAMETER_EXCEPTION.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.INVALID_PARAMETER_EXCEPTION.getMessageDefinition(methodName));
    } catch (PropertyServerException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.PROPERTY_SERVER_EXCEPTION.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.PROPERTY_SERVER_EXCEPTION.getMessageDefinition(methodName));
    } catch (UserNotAuthorizedException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.USER_NOT_AUTHORIZED_EXCEPTION.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.USER_NOT_AUTHORIZED_EXCEPTION.getMessageDefinition(methodName));
    } catch (ConnectorCheckedException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.CONNECTOR_CHECKED_EXCEPTION.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.CONNECTOR_CHECKED_EXCEPTION.getMessageDefinition(methodName));
    } catch (Exception error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.UNEXPECTED_ERROR.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.UNEXPECTED_ERROR.getMessageDefinition(methodName));
    }
    return egeriaColumns;
}
Also used : InvalidParameterException(org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException) PropertyServerException(org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException) DatabaseColumnElement(org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseColumnElement) PostgresColumn(org.odpi.openmetadata.adapters.connectors.integration.postgres.properties.PostgresColumn) UserNotAuthorizedException(org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException) ConnectorCheckedException(org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException) InvalidParameterException(org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException) AlreadyHandledException(org.odpi.openmetadata.adapters.connectors.integration.postgres.ffdc.AlreadyHandledException) SQLException(java.sql.SQLException) UserNotAuthorizedException(org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException) ConnectorCheckedException(org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException) PropertyServerException(org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException)

Example 3 with PropertyServerException

use of org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException in project egeria-database-connectors by odpi.

the class PostgresDatabaseConnector method updateViewColumns.

/**
 * @param postgresTable         the Postgres table which contains the columns to be updates
 * @param  egeriaTable  the column data from Egeria
 * @throws AlreadyHandledException this exception has already been logged
 */
private void updateViewColumns(PostgresTable postgresTable, DatabaseViewElement egeriaTable) throws AlreadyHandledException {
    final String methodName = "updateViewColumns";
    PostgresSourceDatabase source = new PostgresSourceDatabase(this.connectionProperties);
    String guid = egeriaTable.getElementHeader().getGUID();
    try {
        List<PostgresColumn> postgresColumns = source.getColumns(postgresTable.getTable_name());
        List<DatabaseColumnElement> egeriaColumns = getContext().getColumnsForDatabaseTable(egeriaTable.getElementHeader().getGUID(), startFrom, pageSize);
        if (egeriaColumns != null) {
            egeriaColumns = deleteViewColumns(postgresColumns, egeriaColumns);
        }
        for (PostgresColumn postgresColumn : postgresColumns) {
            boolean found = false;
            /*
                we have no tables in Egeria
                so all tables are new
                 */
            if (egeriaColumns == null) {
                if (postgresColumns.size() > 0) {
                    addColumn(postgresColumn, guid);
                }
            } else {
                /*
                    check if the database table is known to Egeria
                    and needs to be updated
                     */
                for (DatabaseColumnElement egeriaColumn : egeriaColumns) {
                    if (egeriaColumn.getDatabaseColumnProperties().getQualifiedName().equals(postgresColumn.getQualifiedName())) {
                        /*
                        we have found an exact instance to update
                         */
                        found = true;
                        updateColumn(postgresColumn, egeriaColumn);
                        break;
                    }
                }
                /*
                    this is a new column so add it
                     */
                if (!found) {
                    addColumn(postgresColumn, guid);
                }
            }
        }
    } catch (SQLException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.ERROR_READING_POSTGRES.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.ERROR_READING_FROM_POSTGRES.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()));
    } catch (InvalidParameterException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.INVALID_PARAMETER_EXCEPTION.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.INVALID_PARAMETER_EXCEPTION.getMessageDefinition(methodName));
    } catch (UserNotAuthorizedException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.USER_NOT_AUTHORIZED_EXCEPTION.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.USER_NOT_AUTHORIZED_EXCEPTION.getMessageDefinition(methodName));
    } catch (PropertyServerException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.PROPERTY_SERVER_EXCEPTION.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.PROPERTY_SERVER_EXCEPTION.getMessageDefinition(methodName));
    } catch (ConnectorCheckedException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.CONNECTOR_CHECKED_EXCEPTION.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.CONNECTOR_CHECKED_EXCEPTION.getMessageDefinition(methodName));
    } catch (Exception error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.UNEXPECTED_ERROR.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.UNEXPECTED_ERROR.getMessageDefinition(methodName));
    }
}
Also used : PropertyServerException(org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException) DatabaseColumnElement(org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseColumnElement) SQLException(java.sql.SQLException) InvalidParameterException(org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException) AlreadyHandledException(org.odpi.openmetadata.adapters.connectors.integration.postgres.ffdc.AlreadyHandledException) SQLException(java.sql.SQLException) UserNotAuthorizedException(org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException) ConnectorCheckedException(org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException) PropertyServerException(org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException) InvalidParameterException(org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException) PostgresColumn(org.odpi.openmetadata.adapters.connectors.integration.postgres.properties.PostgresColumn) UserNotAuthorizedException(org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException) ConnectorCheckedException(org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException)

Example 4 with PropertyServerException

use of org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException in project egeria-database-connectors by odpi.

the class PostgresDatabaseConnector method updateViews.

/**
 * @param postgresSchema the Postgres schema bean
 * @param egeriaSchema   the Egeria schema bean
 * @throws AlreadyHandledException this exception has already been logged
 */
private void updateViews(PostgresSchema postgresSchema, DatabaseSchemaElement egeriaSchema) throws AlreadyHandledException {
    final String methodName = "updateViews";
    String schemaGuid = egeriaSchema.getElementHeader().getGUID();
    PostgresSourceDatabase source = new PostgresSourceDatabase(this.connectionProperties);
    try {
        /*
            get a list of databases views currently hosted in Postgres
            and remove any tables that have been dropped since the last refresh
             */
        List<PostgresTable> postgresViews = source.getViews(postgresSchema.getSchema_name());
        List<DatabaseViewElement> egeriaViews = getContext().getViewsForDatabaseSchema(schemaGuid, startFrom, pageSize);
        egeriaViews = deleteViews(postgresViews, egeriaViews);
        for (PostgresTable postgresView : postgresViews) {
            boolean found = false;
            /*
                we have no views in Egeria
                so all views are new
                 */
            if (egeriaViews == null) {
                if (postgresViews.size() > 0) {
                    addView(postgresView, schemaGuid);
                }
            } else {
                /*
                    check if the database table is known to Egeria
                    and needs to be updated
                     */
                for (DatabaseViewElement egeriaView : egeriaViews) {
                    if (egeriaView.getDatabaseViewProperties().getQualifiedName().equals(postgresView.getQualifiedName())) {
                        /*
                        we have found an exact instance to update
                         */
                        found = true;
                        updateView(postgresView, egeriaView);
                        break;
                    }
                }
                /*
                    this is a new database view so add it
                     */
                if (!found) {
                    addView(postgresView, schemaGuid);
                }
            }
        }
    } catch (SQLException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.ERROR_READING_POSTGRES.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.ERROR_READING_FROM_POSTGRES.getMessageDefinition(methodName));
    } catch (InvalidParameterException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.INVALID_PARAMETER_EXCEPTION.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.INVALID_PARAMETER_EXCEPTION.getMessageDefinition(methodName));
    } catch (UserNotAuthorizedException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.USER_NOT_AUTHORIZED_EXCEPTION.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.USER_NOT_AUTHORIZED_EXCEPTION.getMessageDefinition(methodName));
    } catch (PropertyServerException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.PROPERTY_SERVER_EXCEPTION.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.PROPERTY_SERVER_EXCEPTION.getMessageDefinition(methodName));
    } catch (ConnectorCheckedException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.CONNECTOR_CHECKED_EXCEPTION.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.CONNECTOR_CHECKED_EXCEPTION.getMessageDefinition(methodName));
    } catch (Exception error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.UNEXPECTED_ERROR.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.UNEXPECTED_ERROR.getMessageDefinition(methodName));
    }
}
Also used : PropertyServerException(org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException) SQLException(java.sql.SQLException) DatabaseViewElement(org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseViewElement) InvalidParameterException(org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException) AlreadyHandledException(org.odpi.openmetadata.adapters.connectors.integration.postgres.ffdc.AlreadyHandledException) SQLException(java.sql.SQLException) UserNotAuthorizedException(org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException) ConnectorCheckedException(org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException) PropertyServerException(org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException) InvalidParameterException(org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException) UserNotAuthorizedException(org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException) ConnectorCheckedException(org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException) PostgresTable(org.odpi.openmetadata.adapters.connectors.integration.postgres.properties.PostgresTable)

Example 5 with PropertyServerException

use of org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException in project egeria-database-connectors by odpi.

the class PostgresDatabaseConnector method deleteViews.

/**
 * Checks if any views need to be removed from Egeria
 *
 * @param postgresViews            a list of the bean properties of a Postgres views
 * @param egeriaViews               a list of the  views already known to Egeria
 * @throws AlreadyHandledException this exception has already been logged
 */
private List<DatabaseViewElement> deleteViews(List<PostgresTable> postgresViews, List<DatabaseViewElement> egeriaViews) throws AlreadyHandledException {
    String methodName = "deleteViews";
    try {
        if (egeriaViews != null) {
            /*
                for each view already known to Egeria
                 */
            for (Iterator<DatabaseViewElement> itr = egeriaViews.iterator(); itr.hasNext(); ) {
                boolean found = false;
                DatabaseViewElement egeriaView = itr.next();
                String knownName = egeriaView.getDatabaseViewProperties().getQualifiedName();
                /*
                    check that the database is still present in Postgres
                     */
                for (PostgresTable postgresView : postgresViews) {
                    String sourceName = postgresView.getQualifiedName();
                    if (sourceName.equals(knownName)) {
                        /*
                            if found then check the next table
                             */
                        found = true;
                        break;
                    }
                }
                /*
                        not found in Postgres , so delete the table from Egeria
                         */
                if (!found) {
                    getContext().removeDatabaseView(egeriaView.getElementHeader().getGUID(), knownName);
                    itr.remove();
                }
            }
        }
    } catch (InvalidParameterException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.INVALID_PARAMETER_EXCEPTION.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.INVALID_PARAMETER_EXCEPTION.getMessageDefinition(methodName));
    } catch (PropertyServerException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.PROPERTY_SERVER_EXCEPTION.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.PROPERTY_SERVER_EXCEPTION.getMessageDefinition(methodName));
    } catch (UserNotAuthorizedException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.USER_NOT_AUTHORIZED_EXCEPTION.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.USER_NOT_AUTHORIZED_EXCEPTION.getMessageDefinition(methodName));
    } catch (ConnectorCheckedException error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.CONNECTOR_CHECKED_EXCEPTION.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.CONNECTOR_CHECKED_EXCEPTION.getMessageDefinition(methodName));
    } catch (Exception error) {
        ExceptionHandler.handleException(auditLog, this.getClass().getName(), methodName, error, PostgresConnectorAuditCode.UNEXPECTED_ERROR.getMessageDefinition(methodName, error.getClass().getName(), error.getMessage()), PostgresConnectorErrorCode.UNEXPECTED_ERROR.getMessageDefinition(methodName));
    }
    return egeriaViews;
}
Also used : InvalidParameterException(org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException) PropertyServerException(org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException) UserNotAuthorizedException(org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException) DatabaseViewElement(org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseViewElement) ConnectorCheckedException(org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException) InvalidParameterException(org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException) AlreadyHandledException(org.odpi.openmetadata.adapters.connectors.integration.postgres.ffdc.AlreadyHandledException) SQLException(java.sql.SQLException) UserNotAuthorizedException(org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException) ConnectorCheckedException(org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException) PropertyServerException(org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException) PostgresTable(org.odpi.openmetadata.adapters.connectors.integration.postgres.properties.PostgresTable)

Aggregations

SQLException (java.sql.SQLException)12 AlreadyHandledException (org.odpi.openmetadata.adapters.connectors.integration.postgres.ffdc.AlreadyHandledException)12 ConnectorCheckedException (org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException)12 InvalidParameterException (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException)12 PropertyServerException (org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException)12 UserNotAuthorizedException (org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException)12 DatabaseColumnElement (org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseColumnElement)5 PostgresTable (org.odpi.openmetadata.adapters.connectors.integration.postgres.properties.PostgresTable)5 PostgresColumn (org.odpi.openmetadata.adapters.connectors.integration.postgres.properties.PostgresColumn)4 DatabaseSchemaElement (org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseSchemaElement)2 DatabaseTableElement (org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseTableElement)2 DatabaseViewElement (org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseViewElement)2 PostgresSchema (org.odpi.openmetadata.adapters.connectors.integration.postgres.properties.PostgresSchema)2 ArrayList (java.util.ArrayList)1 DatabaseElement (org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseElement)1 PostgresDatabase (org.odpi.openmetadata.adapters.connectors.integration.postgres.properties.PostgresDatabase)1 PostgresForeignKeyLinks (org.odpi.openmetadata.adapters.connectors.integration.postgres.properties.PostgresForeignKeyLinks)1