@JsonProperty(JSON_KEY_REDIRECT_URI) final URI redirectUri)
throws OmhException {
// Validate the owner.
if(owner == null) {
throw new OmhException("The owner is null.");
}
else {
this.owner = owner;
}
// Validate the redirect URI.
if(redirectUri == null) {
throw new OmhException("The redirect URI is null.");
}
else {
this.redirectUri = redirectUri;
}
// Validate the ID.
if(id == null) {
throw new OmhException("The ID is null.");
}
else {
String idTrimmed = id.trim();
if(idTrimmed.length() == 0) {
throw new OmhException("The ID is empty.");
}
else {
this.id = idTrimmed;
}
}
// Validate the shared secret.
if(sharedSecret == null) {
throw new OmhException("The shared secret is null.");
}
else {
String sharedSecretTrimmed = sharedSecret.trim();
if(sharedSecretTrimmed.length() == 0) {
throw new OmhException("The shared secret is empty.");
}
else {
this.sharedSecret = sharedSecretTrimmed;
}
}
// Validate the name.
if(name == null) {
throw new OmhException("The name is null.");
}
else {
String nameTrimmed = name.trim();
if(nameTrimmed.length() == 0) {
throw new OmhException("The name is empty.");
}
else {
this.name = nameTrimmed;
}
}
// Validate the description.
if(description == null) {
throw new OmhException("The description is null.");
}
else {
String descriptionTrimmed = description.trim();
if(descriptionTrimmed.length() == 0) {
throw new OmhException("The description is empty.");
}
else {
this.description = descriptionTrimmed;
}
}