use of org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_DELETE_SECRET in project carbon-identity-framework by wso2.
the class SecretDAOImpl method deleteSecretById.
@Override
public void deleteSecretById(String secretId, int tenantId) throws SecretManagementException {
NamedJdbcTemplate jdbcTemplate = getNewTemplate();
try {
jdbcTemplate.executeUpdate(SQLConstants.DELETE_SECRET_BY_ID, preparedStatement -> {
preparedStatement.setString(DB_SCHEMA_COLUMN_NAME_ID, secretId);
preparedStatement.setInt(DB_SCHEMA_COLUMN_NAME_TENANT_ID, tenantId);
});
} catch (DataAccessException e) {
throw handleServerException(ERROR_CODE_DELETE_SECRET, secretId, e);
}
}
use of org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_DELETE_SECRET in project carbon-identity-framework by wso2.
the class SecretDAOImpl method deleteSecretByName.
@Override
public void deleteSecretByName(String name, String secretTypeId, int tenantId) throws SecretManagementException {
NamedJdbcTemplate jdbcTemplate = getNewTemplate();
try {
jdbcTemplate.executeUpdate(SQLConstants.DELETE_SECRET, preparedStatement -> {
preparedStatement.setString(DB_SCHEMA_COLUMN_NAME_SECRET_NAME, name);
preparedStatement.setString(DB_SCHEMA_COLUMN_NAME_TYPE, secretTypeId);
preparedStatement.setInt(DB_SCHEMA_COLUMN_NAME_TENANT_ID, tenantId);
});
} catch (DataAccessException e) {
throw handleServerException(ERROR_CODE_DELETE_SECRET, e);
}
}
Aggregations