com.geotab.http.exception.InvalidMyAdminUserException Maven / Gradle / Ivy
/*
*
* 2020 Copyright (C) Geotab Inc. All rights reserved.
*/
package com.geotab.http.exception;
import lombok.Getter;
/**
* This exception is thrown on a MyAdmin databaseName logon with an incorrect user/password
* combination or when the MyAdmin user's credentials become invalid on a databaseName.
*/
public class InvalidMyAdminUserException extends JsonRpcErrorDataException {
@Getter
private String database;
@Getter
private String server;
/**
* Initializes a new instance.
*/
public InvalidMyAdminUserException() {
}
/**
* Initializes a new instance.
*
* @param databaseName The databaseName the user is trying to log in to.
* @param server The server attempted against.
*/
public InvalidMyAdminUserException(String databaseName, String server) {
super(databaseName + "@" + server);
this.server = server;
this.database = databaseName;
}
/**
* Initializes a new instance.
*
* @param exception Inner exception.
*/
public InvalidMyAdminUserException(InvalidMyAdminUserException exception) {
super(exception.getMessage(), exception);
this.server = exception.getServer();
this.database = exception.getDatabase();
}
/**
* Initializes a new instance.
*
* @param message Error message.
*/
public InvalidMyAdminUserException(String message) {
super(message);
}
}