com.ibm.maximo.oslc.OslcException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of maximo-restclient Show documentation
Show all versions of maximo-restclient Show documentation
The Maximo REST client library provides a set of driver API's which can be consumed by an JAVA based web component that would like to interface with a Maximo instance
/*
* Licensed Materials - Property of IBM
*
* (C) COPYRIGHT IBM CORP. 2015 All Rights Reserved
*
* US Government Users Restricted Rights - Use, duplication or
* disclosure restricted by GSA ADP Schedule Contract with
* IBM Corp.
*/
package com.ibm.maximo.oslc;
import javax.json.JsonObject;
public class OslcException extends Exception {
/**
*
*/
private int errorCode = 400;
public OslcException(int errorCode, String message, Throwable t) {
super(message, t);
}
public OslcException(int errorCode, String message) {
super(message);
}
public int getErrorCode() {
return this.errorCode;
}
public OslcException(String message) {
super(message);
}
public OslcException(JsonObject jo) {
super(jo.containsKey("Error") ? jo.getJsonObject("Error").getString(
"message") : (jo.containsKey("oslc:Error")?jo.getJsonObject("oslc:Error").getString(
"oslc:message"):""));
}
}