All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ibm.maximo.oslc.OslcException Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.0.2
Show newest version
/*
* 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"):""));
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy