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

org.springframework.social.partnercenter.api.ApiFault Maven / Gradle / Ivy

Go to download

A provider extension for Spring Social to enable connectivity with Microsoft and an API binding for Microsoft's Partner Center API.

There is a newer version: 10.11.0
Show newest version
package org.springframework.social.partnercenter.api;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;

import com.fasterxml.jackson.annotation.JsonProperty;

public class ApiFault {
	@JsonProperty("code")
	private String errorCode;
	@JsonProperty("description")
	private String errorMessage;
	@JsonProperty("data")
	private Map attributes = new HashMap<>();

	public String getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}

	public String getErrorMessage() {
		return errorMessage;
	}

	public void setErrorMessage(String errorMessage) {
		this.errorMessage = errorMessage;
	}

	public Map getAttributes() {
		return attributes;
	}

	public void setAttributes(List attributes) {
		attributes.forEach((String s) -> {
			StringTokenizer tokenizer = new StringTokenizer(s, ":");
			if (tokenizer.countTokens() == 2){
				this.attributes.put(tokenizer.nextToken().trim(), tokenizer.nextToken().trim());
			}
		});
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy