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

com.bazaarvoice.emodb.uac.api.EmoRoleExistsException Maven / Gradle / Ivy

There is a newer version: 6.5.190
Show newest version
package com.bazaarvoice.emodb.uac.api;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Objects;

/**
 * Exception thrown when attempting to create a role which already exists.
 */
@JsonIgnoreProperties({"cause", "localizedMessage", "stackTrace"})
public class EmoRoleExistsException extends RuntimeException {
    private final String _group;
    private final String _id;

    public EmoRoleExistsException() {
        this("unknown", "unknown");
    }

    @JsonCreator
    public EmoRoleExistsException(@JsonProperty("group") String group, @JsonProperty("id") String id) {
        super("Role exists");
        _group = Objects.firstNonNull(group, EmoRoleKey.NO_GROUP);
        _id = id;
    }

    public String getGroup() {
        return _group;
    }

    public String getId() {
        return _id;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy