diff --git a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Address.java b/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Address.java deleted file mode 100644 index 626a9a8ca57..00000000000 --- a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Address.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Janssen Project software is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. - * - * Copyright (c) 2020, Janssen Project - */ - -package io.jans.configapi.model.user; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import io.jans.orm.annotation.AttributeName; - -@JsonIgnoreProperties(ignoreUnknown = true) -public class Address { - - public enum Type {WORK, HOME, OTHER} - - @AttributeName(name = "formatted") - private String formatted; - - @AttributeName(name = "streetAddress") - private String streetAddress; - - @AttributeName(name = "locality") - private String locality; - - @AttributeName(name = "region") - private String region; - - @AttributeName(name = "postalCode") - private String postalCode; - - @AttributeName(name = "country") - private String country; - - @AttributeName(name = "type") - private String type; - - @AttributeName(name = "primary") - private Boolean primary; - - public String getFormatted() { - return formatted; - } - - public void setFormatted(String formatted) { - this.formatted = formatted; - } - - public String getStreetAddress() { - return streetAddress; - } - - public void setStreetAddress(String streetAddress) { - this.streetAddress = streetAddress; - } - - public String getLocality() { - return locality; - } - - public void setLocality(String locality) { - this.locality = locality; - } - - public String getRegion() { - return region; - } - - public void setRegion(String region) { - this.region = region; - } - - public String getPostalCode() { - return postalCode; - } - - public void setPostalCode(String postalCode) { - this.postalCode = postalCode; - } - - public String getCountry() { - return country; - } - - public void setCountry(String country) { - this.country = country; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public void setType(Type type){ - setType(type.name().toLowerCase()); - } - - public Boolean getPrimary() { - return primary; - } - - public void setPrimary(Boolean primary) { - this.primary = primary; - } - - @Override - public String toString() { - return "Address [formatted=" + formatted + ", streetAddress=" + streetAddress + ", locality=" + locality - + ", region=" + region + ", postalCode=" + postalCode + ", country=" + country + ", type=" + type - + ", primary=" + primary + "]"; - } - -} diff --git a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Device.java b/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Device.java deleted file mode 100644 index e5909103cd4..00000000000 --- a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Device.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Janssen Project software is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. - * - * Copyright (c) 2020, Janssen Project - */ - -package io.jans.configapi.model.user; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import io.jans.orm.annotation.AttributeName; - - -public class Device { - private String addedOn; - - private String id; - - private String nickName; - - private boolean soft = false; - - public String getAddedOn() { - return addedOn; - } - - public void setAddedOn(String addedOn) { - this.addedOn = addedOn; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getNickName() { - return nickName; - } - - @Override - public String toString() { - return "Device [addedOn=" + addedOn + ", id=" + id + ", nickName=" + nickName + ", soft=" + soft + "]"; - } - - public void setNickName(String nickName) { - this.nickName = nickName; - } - - public boolean isSoft() { - return soft; - } - - public void setSoft(boolean soft) { - this.soft = soft; - } -} diff --git a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Email.java b/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Email.java deleted file mode 100644 index a0d0394dbe7..00000000000 --- a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Email.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Janssen Project software is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. - * - * Copyright (c) 2020, Janssen Project - */ - -package io.jans.configapi.model.user; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import io.jans.orm.annotation.AttributeName; - -@JsonIgnoreProperties(ignoreUnknown = true) -public class Email { - - public enum Type {WORK, HOME, OTHER} - - @AttributeName(name = "value") - private String value; - - @AttributeName(name = "display") - private String display; - - @AttributeName(name = "type") - private String type; - - @AttributeName(name = "primary") - private Boolean primary; - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public String getDisplay() { - return display; - } - - public void setDisplay(String display) { - this.display = display; - } - - public String getType() { - return type; - } - - @JsonProperty - public void setType(String type) { - this.type = type; - } - - public void setType(Type type){ - setType(type.name().toLowerCase()); - } - - public Boolean getPrimary() { - return primary; - } - - public void setPrimary(Boolean primary) { - this.primary = primary; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((value == null) ? 0 : value.hashCode()); - result = prime * result + ((display == null) ? 0 : display.hashCode()); - result = prime * result + ((type == null) ? 0 : type.hashCode()); - result = prime * result + ((primary == null) ? 0 : primary.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - Email other = (Email) obj; - if (value == null) { - if (other.value != null) { - return false; - } - } else if (!value.equals(other.value)) { - return false; - } - if (display == null) { - if (other.display != null) { - return false; - } - } else if (!display.equals(other.display)) { - return false; - } - if (type == null) { - if (other.type != null) { - return false; - } - } else if (!type.equals(other.type)) { - return false; - } - if (primary == null) { - if (other.primary != null) { - return false; - } - } else if (!primary.equals(other.primary)) { - return false; - } - return true; - } - - @Override - public String toString() { - return "Email [value=" + value + ", display=" + display + ", type=" + type + ", primary=" + primary + "]"; - } -} diff --git a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Entitlement.java b/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Entitlement.java deleted file mode 100644 index 39a9a16a720..00000000000 --- a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Entitlement.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Janssen Project software is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. - * - * Copyright (c) 2020, Janssen Project - */ -package io.jans.configapi.model.user; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import io.jans.orm.annotation.AttributeName; - -@JsonIgnoreProperties(ignoreUnknown = true) -public class Entitlement { - - @AttributeName(name = "value") - private String value; - - @AttributeName(name = "display") - private String display; - - @AttributeName(name = "type") - private String type; - - @AttributeName(name = "primary") - private Boolean primary; - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public String getDisplay() { - return display; - } - - public void setDisplay(String display) { - this.display = display; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public Boolean getPrimary() { - return primary; - } - - public void setPrimary(Boolean primary) { - this.primary = primary; - } - - @Override - public String toString() { - return "Entitlement [value=" + value + ", display=" + display + ", type=" + type + ", primary=" + primary + "]"; - } - -} diff --git a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Group.java b/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Group.java deleted file mode 100644 index 87445d0c74f..00000000000 --- a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Group.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Janssen Project software is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. - * - * Copyright (c) 2020, Janssen Project - */ - -package io.jans.configapi.model.user; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.jans.orm.annotation.AttributeName; - -@JsonIgnoreProperties(ignoreUnknown = true) -public class Group { - - public enum Type {DIRECT, INDIRECT} - - @AttributeName(name = "value") - private String value; - - @AttributeName(name = "ref") - private String ref; - - @AttributeName(name = "display") - private String display; - - @AttributeName(name = "type") - private String type; - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public String getRef() { - return ref; - } - - public void setRef(String ref) { - this.ref = ref; - } - - public String getDisplay() { - return display; - } - - public void setDisplay(String display) { - this.display = display; - } - - public String getType() { - return type; - } - - @JsonProperty - public void setType(String type) { - this.type = type; - } - - public void setType(Type type){ - setType(type.name().toLowerCase()); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((value == null) ? 0 : value.hashCode()); - result = prime * result + ((ref == null) ? 0 : ref.hashCode()); - result = prime * result + ((type == null) ? 0 : type.hashCode()); - result = prime * result + ((display == null) ? 0 : display.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - Group other = (Group) obj; - if (value == null) { - if (other.value != null) { - return false; - } - } else if (!value.equals(other.value)) { - return false; - } - if (ref == null) { - if (other.ref != null) { - return false; - } - } else if (!ref.equals(other.ref)) { - return false; - } - if (type == null) { - if (other.type != null) { - return false; - } - } else if (!type.equals(other.type)) { - return false; - } - if (display == null) { - if (other.display != null) { - return false; - } - } else if (!display.equals(other.display)) { - return false; - } - return true; - } - -} diff --git a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/InstantMessagingAddress.java b/jans-config-api/common/src/main/java/io/jans/configapi/model/user/InstantMessagingAddress.java deleted file mode 100644 index a17d558b578..00000000000 --- a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/InstantMessagingAddress.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Janssen Project software is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. - * - * Copyright (c) 2020, Janssen Project - */ - -package io.jans.configapi.model.user; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import io.jans.orm.annotation.AttributeName; - -@JsonIgnoreProperties(ignoreUnknown = true) -public class InstantMessagingAddress { - - public enum Type {AIM, GTALK, ICQ, XMPP, MSN, SKYPE, QQ, YAHOO, OTHER} - - @AttributeName(name = "value") - private String value; - - @AttributeName(name = "display") - private String display; - - @AttributeName(name = "type") - private String type; - - @AttributeName(name = "primary") - private Boolean primary; - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public String getDisplay() { - return display; - } - - public void setDisplay(String display) { - this.display = display; - } - - public String getType() { - return type; - } - - @JsonProperty - public void setType(String type) { - this.type = type; - } - - public void setType(Type type){ - setType(type.name().toLowerCase()); - } - - public Boolean getPrimary() { - return primary; - } - - public void setPrimary(Boolean primary) { - this.primary = primary; - } - -} diff --git a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Name.java b/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Name.java deleted file mode 100644 index 139dab470bd..00000000000 --- a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Name.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Janssen Project software is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. - * - * Copyright (c) 2020, Janssen Project - */ - -package io.jans.configapi.model.user; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import org.apache.commons.lang.StringUtils; - -import io.jans.orm.annotation.AttributeName; - -@JsonIgnoreProperties(ignoreUnknown = true) -public class Name { - - @AttributeName(name = "familyName") - private String familyName; - - @AttributeName(name = "givenName") - private String givenName; - - @AttributeName(name = "middleName") - private String middleName; - - @AttributeName(name = "honorificPrefix") - private String honorificPrefix; - - @AttributeName(name = "honorificSuffix") - private String honorificSuffix; - - @AttributeName(name = "formatted") - private String formatted; - - /** - * From this Name instance, it builds a string depicting a full name including all middle names, titles, and suffixes - * as appropriate for display if the {@link #getFormatted() formatted} field of this object is null or empty - * @return A string representing a full name. The formatted field will be set to this value - */ - public String computeFormattedName(){ - - if (StringUtils.isEmpty(formatted)) { - String formattedName = ""; - - formattedName+=StringUtils.isEmpty(honorificPrefix) ? "" : honorificPrefix + " "; - formattedName+=StringUtils.isEmpty(givenName) ? "" : givenName + " "; - formattedName+=StringUtils.isEmpty(middleName) ? "" : middleName + " "; - formattedName+=StringUtils.isEmpty(familyName) ? "" : familyName + " "; - formattedName+=StringUtils.isEmpty(honorificSuffix) ? "" : honorificSuffix; - formattedName=formattedName.trim(); - - formatted=formattedName.length()==0 ? null : formattedName; - } - return formatted; - - } - - public String getFormatted() { - return formatted; - } - - public void setFormatted(String formatted) { - this.formatted = formatted; - } - - public String getFamilyName() { - return familyName; - } - - public void setFamilyName(String familyName) { - this.familyName = familyName; - } - - public String getGivenName() { - return givenName; - } - - public void setGivenName(String givenName) { - this.givenName = givenName; - } - - public String getMiddleName() { - return middleName; - } - - public void setMiddleName(String middleName) { - this.middleName = middleName; - } - - public String getHonorificPrefix() { - return honorificPrefix; - } - - public void setHonorificPrefix(String honorificPrefix) { - this.honorificPrefix = honorificPrefix; - } - - public String getHonorificSuffix() { - return honorificSuffix; - } - - public void setHonorificSuffix(String honorificSuffix) { - this.honorificSuffix = honorificSuffix; - } - -} diff --git a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/OTPDevice.java b/jans-config-api/common/src/main/java/io/jans/configapi/model/user/OTPDevice.java deleted file mode 100644 index 38838a624b7..00000000000 --- a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/OTPDevice.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Janssen Project software is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. - * - * Copyright (c) 2020, Janssen Project - */ - -package io.jans.configapi.model.user; - -import java.util.ArrayList; - -public class OTPDevice { - - private ArrayList devices; - - public ArrayList getDevices() { - return this.devices; - } - - public void setDevices(ArrayList devices) { - this.devices = devices; - } - -} diff --git a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/PhoneNumber.java b/jans-config-api/common/src/main/java/io/jans/configapi/model/user/PhoneNumber.java deleted file mode 100644 index 4af45c6d269..00000000000 --- a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/PhoneNumber.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Janssen Project software is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. - * - * Copyright (c) 2020, Janssen Project - */ - -package io.jans.configapi.model.user; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import io.jans.orm.annotation.AttributeName; - -@JsonIgnoreProperties(ignoreUnknown = true) -public class PhoneNumber { - - public enum Type {WORK, HOME, MOBILE, FAX, PAGER, OTHER} - - @AttributeName(name = "value") - private String value; - - @AttributeName(name = "display") - private String display; - - @AttributeName(name = "type") - private String type; - - @AttributeName(name = "primary") - private Boolean primary; - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public String getDisplay() { - return display; - } - - public void setDisplay(String display) { - this.display = display; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public void setType(Type type){ - setType(type.name().toLowerCase()); - } - - public Boolean getPrimary() { - return primary; - } - - public void setPrimary(Boolean primary) { - this.primary = primary; - } - - @Override - public String toString() { - return "PhoneNumber [value=" + value + ", display=" + display + ", type=" + type + ", primary=" + primary + "]"; - } -} diff --git a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Photo.java b/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Photo.java deleted file mode 100644 index 63306f4bf1d..00000000000 --- a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Photo.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Janssen Project software is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. - * - * Copyright (c) 2020, Janssen Project - */ -package io.jans.configapi.model.user; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import io.jans.orm.annotation.AttributeName; - -@JsonIgnoreProperties(ignoreUnknown = true) -public class Photo { - - public enum Type {PHOTO, THUMBNAIL} - - @AttributeName(name = "value") - private String value; - - @AttributeName(name = "display") - private String display; - - @AttributeName(name = "type") - private String type; - - @AttributeName(name = "primary") - private Boolean primary; - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public String getDisplay() { - return display; - } - - public void setDisplay(String display) { - this.display = display; - } - - public String getType() { - return type; - } - - @JsonProperty - public void setType(String type) { - this.type = type; - } - - public void setType(Type type){ - setType(type.name().toLowerCase()); - } - - public Boolean getPrimary() { - return primary; - } - - public void setPrimary(Boolean primary) { - this.primary = primary; - } - - @Override - public String toString() { - return "Photo [value=" + value + ", display=" + display + ", type=" + type + ", primary=" + primary + "]"; - } - -} diff --git a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Role.java b/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Role.java deleted file mode 100644 index c3516bee571..00000000000 --- a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/Role.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Janssen Project software is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. - * - * Copyright (c) 2020, Janssen Project - */ - -package io.jans.configapi.model.user; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import io.jans.orm.annotation.AttributeName; -@JsonIgnoreProperties(ignoreUnknown = true) -public class Role { - - @AttributeName(name = "value") - private String value; - - @AttributeName(name = "display") - private String display; - - @AttributeName(name = "type") - private String type; - - @AttributeName(name = "primary") - private Boolean primary; - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public String getDisplay() { - return display; - } - - public void setDisplay(String display) { - this.display = display; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public Boolean getPrimary() { - return primary; - } - - public void setPrimary(Boolean primary) { - this.primary = primary; - } - - @Override - public String toString() { - return "Role [value=" + value + ", display=" + display + ", type=" + type + ", primary=" + primary + "]"; - } - -} diff --git a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/X509Certificate.java b/jans-config-api/common/src/main/java/io/jans/configapi/model/user/X509Certificate.java deleted file mode 100644 index 372c9bf2094..00000000000 --- a/jans-config-api/common/src/main/java/io/jans/configapi/model/user/X509Certificate.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Janssen Project software is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. - * - * Copyright (c) 2020, Janssen Project - */ - -package io.jans.configapi.model.user; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import io.jans.orm.annotation.AttributeName; -@JsonIgnoreProperties(ignoreUnknown = true) -public class X509Certificate { - - @AttributeName(name = "value") - private String value; - - @AttributeName(name = "display") - private String display; - - @AttributeName(name = "type") - private String type; - - @AttributeName(name = "primary") - private Boolean primary; - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public String getDisplay() { - return display; - } - - public void setDisplay(String display) { - this.display = display; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public Boolean getPrimary() { - return primary; - } - - public void setPrimary(Boolean primary) { - this.primary = primary; - } - - @Override - public String toString() { - return "X509Certificate [value=" + value + ", display=" + display + ", type=" + type + ", primary=" + primary - + "]"; - } -} diff --git a/jans-config-api/common/src/main/java/io/jans/configapi/rest/model/Person.java b/jans-config-api/common/src/main/java/io/jans/configapi/rest/model/Person.java deleted file mode 100644 index 10e7101c816..00000000000 --- a/jans-config-api/common/src/main/java/io/jans/configapi/rest/model/Person.java +++ /dev/null @@ -1,946 +0,0 @@ -/* - * Janssen Project software is available under the Apache License (2004). See http://www.apache.org/licenses/ for full text. - * - * Copyright (c) 2020, Janssen Project - */ - -package io.jans.configapi.rest.model.user; - -import io.jans.configapi.model.user.Address; -import io.jans.configapi.model.user.Email; -import io.jans.configapi.model.user.Entitlement; -import io.jans.configapi.model.user.InstantMessagingAddress; -import io.jans.configapi.model.user.OTPDevice; -import io.jans.configapi.model.user.PhoneNumber; -import io.jans.configapi.model.user.Photo; -import io.jans.configapi.model.user.Role; -import io.jans.configapi.model.user.X509Certificate; -import io.jans.model.GluuStatus; -import io.jans.orm.annotation.AttributeName; -import io.jans.orm.annotation.DataEntry; -import io.jans.orm.annotation.ObjectClass; -import io.jans.orm.model.base.CustomObjectAttribute; -import io.jans.util.StringHelper; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.Date; -import java.util.Iterator; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -@DataEntry -@ObjectClass(value = "jansPerson") -@JsonIgnoreProperties(ignoreUnknown = true) -public class Person extends BasePerson { - - private static final long serialVersionUID = 6634191420188575733L; - - @JsonProperty("inum") - @AttributeName(name = "inum", ignoreDuringUpdate = true) - private String inum; - - @AttributeName(name = "jansAssociatedClnt", consistency = true) - private List associatedClient; - - @AttributeName(name = "c") - private String countryName; - - @AttributeName(name = "displayName") - private String displayName; - - @AttributeName(name = "givenName") - private String givenName; - - @AttributeName(name = "jansManagedOrganizations") - private List managedOrganizations; - - @AttributeName(name = "jansOptOuts") - private List optOuts; - - @AttributeName(name = "jansStatus") - private GluuStatus status; - - @AttributeName(name = "mail") - private String mail; - - @AttributeName(name = "memberOf") - private List memberOf; - - @AttributeName(name = "o") - private String organization; - - @AttributeName(name = "jansExtUid") - private List externalUid; - - @AttributeName(name = "jansOTPCache") - private List otpCache; - - @AttributeName(name = "jansLastLogonTime") - private Date lastLogonTime; - - @AttributeName(name = "jansActive") - private boolean active; - - @AttributeName(name = "jansAddres") - private List
addres; - - @AttributeName(name = "jansEmail") - private List email; - - @AttributeName(name = "jansEntitlements") - private List entitlements; - - @AttributeName(name = "jansExtId") - private String extId; - - @AttributeName(name = "jansImsValue") - private List imsValue; - - @AttributeName(name = "jansLastLogonTime") - private Date created; - - @AttributeName(name = "jansMetaLastMod") - private Date lastModified; - - @AttributeName(name = "jansMetaLocation") - private String location; - - @AttributeName(name = "jansMetaVer") - private String version; - - @AttributeName(name = "jansNameFormatted") - private String nameFormatted; - - @AttributeName(name = "jansPhoneValue") - private List phoneValue; - - @AttributeName(name = "jansPhotos") - private List photos; - - @AttributeName(name = "jansProfileURL") - private String profileURL; - - @AttributeName(name = "jansRole") - private List roles; - - @AttributeName(name = "jansTitle") - private String title; - - @AttributeName(name = "jansUsrTyp") - private String userType; - - @AttributeName(name = "jansHonorificPrefix") - private String honorificPrefix; - - @AttributeName(name = "jansHonorificSuffix") - private String honorificSuffix; - - @AttributeName(name = "jans509Certificate") - private List x509Certificates; - - @AttributeName(name = "jansPassExpDate") - private Date passwordExpirationDate; - - @AttributeName(name = "persistentId") - private String persistentId; - - @AttributeName(name = "middleName") - private String middleName; - - @AttributeName(name = "nickname") - private String nickname; - - @AttributeName(name = "jansPrefUsrName") - private String preferredUsername; - - @AttributeName(name = "profile") - private String profile; - - @AttributeName(name = "picture") - private String picture; - - @AttributeName(name = "website") - private String website; - - @AttributeName(name = "emailVerified") - private boolean emailVerified; - - @AttributeName(name = "gender") - private String gender; - - @AttributeName(name = "birthdate") - private Date birthdate; - - @AttributeName(name = "zoneinfo") - private String timezone; - - @AttributeName(name = "locale") - private String locale; - - @AttributeName(name = "phoneNumberVerified") - private boolean phoneNumberVerified; - - @AttributeName(name = "address") - private List
address; - - @AttributeName(name = "updatedAt") - private Date updatedAt; - - @AttributeName(name = "preferredLanguage") - private String preferredLanguage; - - @AttributeName(name = "role") - private String role; - - @AttributeName(name = "secretAnswer") - private String secretAnswer; - - @AttributeName(name = "secretQuestion") - private String secretQuestion; - - @AttributeName(name = "seeAlso") - private String seeAlso; - - @AttributeName(name = "sn") - private String sn; - - @AttributeName(name = "cn") - private String cn; - - @AttributeName(name = "transientId") - private String transientId; - - @AttributeName(name = "userPassword") - private String userPassword; - - @AttributeName(name = "st") - private String state; - - @AttributeName(name = "street") - private String street; - - @AttributeName(name = "l") - private String city; - - @AttributeName(name = "jansCountInvalidLogin") - private Integer countInvalidLogin; - - @AttributeName(name = "jansEnrollmentCode") - private String enrollmentCode; - - @AttributeName(name = "jansIMAPData") - private String imapData; - - @AttributeName(name = "jansPPID") - private List ppid; - - @AttributeName(name = "jansGuid") - private String guid; - - @AttributeName(name = "jansPreferredMethod") - private String preferredMethod; - - @AttributeName(name = "userCertificate") - private String userCertificate; - - @AttributeName(name = "jansOTPDevices") - private OTPDevice otpDevices; - - @AttributeName(name = "jansMobileDevices") - private String mobileDevices; - - @AttributeName(name = "jansTrustedDevices") - private String trustedDevices; - - @AttributeName(name = "jansStrongAuthPolicy") - private String strongAuthPolicy; - - @AttributeName(name = "jansUnlinkedExternalUids") - private List unlinkedExternalUids; - - @AttributeName(name = "jansBackchannelDeviceRegistrationTkn") - private String backchannelDeviceRegistrationTkn; - - @AttributeName(name = "jansBackchannelUsrCode") - private String backchannelUsrCode; - - - public String getInum() { - return inum; - } - - public void setInum(String inum) { - this.inum = inum; - } - - public List getAssociatedClient() { - return associatedClient; - } - - public void setAssociatedClient(List associatedClient) { - this.associatedClient = associatedClient; - } - - public String getCountryName() { - return countryName; - } - - public void setCountryName(String countryName) { - this.countryName = countryName; - } - - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - public String getGivenName() { - return givenName; - } - - public void setGivenName(String givenName) { - this.givenName = givenName; - } - - public List getManagedOrganizations() { - return managedOrganizations; - } - - public void setManagedOrganizations(List managedOrganizations) { - this.managedOrganizations = managedOrganizations; - } - - public List getOptOuts() { - return optOuts; - } - - public void setOptOuts(List optOuts) { - this.optOuts = optOuts; - } - - public GluuStatus getStatus() { - return status; - } - - public void setStatus(GluuStatus status) { - this.status = status; - } - - public String getMail() { - return mail; - } - - public void setMail(String mail) { - this.mail = mail; - } - - public List getMemberOf() { - return memberOf; - } - - public void setMemberOf(List memberOf) { - this.memberOf = memberOf; - } - - public String getOrganization() { - return organization; - } - - public void setOrganization(String organization) { - this.organization = organization; - } - - public List getExternalUid() { - return externalUid; - } - - public void setExternalUid(List externalUid) { - this.externalUid = externalUid; - } - - public List getOtpCache() { - return otpCache; - } - - public void setOtpCache(List otpCache) { - this.otpCache = otpCache; - } - - public Date getLastLogonTime() { - return lastLogonTime; - } - - public void setLastLogonTime(Date lastLogonTime) { - this.lastLogonTime = lastLogonTime; - } - - public boolean isActive() { - return active; - } - - public void setActive(boolean active) { - this.active = active; - } - - public List
getAddres() { - return addres; - } - - public void setAddres(List
addres) { - this.addres = addres; - } - - public List getEmail() { - return email; - } - - public void setEmail(List email) { - this.email = email; - } - - public List getEntitlements() { - return entitlements; - } - - public void setEntitlements(List entitlements) { - this.entitlements = entitlements; - } - - public String getExtId() { - return extId; - } - - public void setExtId(String extId) { - this.extId = extId; - } - - public List getImsValue() { - return imsValue; - } - - public void setImsValue(List imsValue) { - this.imsValue = imsValue; - } - - public Date getCreated() { - return created; - } - - public void setCreated(Date created) { - this.created = created; - } - - public Date getLastModified() { - return lastModified; - } - - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } - - public String getLocation() { - return location; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public String getNameFormatted() { - return nameFormatted; - } - - public void setNameFormatted(String nameFormatted) { - this.nameFormatted = nameFormatted; - } - - public List getPhoneValue() { - return phoneValue; - } - - public void setPhoneValue(List phoneValue) { - this.phoneValue = phoneValue; - } - - public List getPhotos() { - return photos; - } - - public void setPhotos(List photos) { - this.photos = photos; - } - - public String getProfileURL() { - return profileURL; - } - - public void setProfileURL(String profileURL) { - this.profileURL = profileURL; - } - - public List getRoles() { - return roles; - } - - public void setRoles(List roles) { - this.roles = roles; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getUserType() { - return userType; - } - - public void setUserType(String userType) { - this.userType = userType; - } - - public String getHonorificPrefix() { - return honorificPrefix; - } - - public void setHonorificPrefix(String honorificPrefix) { - this.honorificPrefix = honorificPrefix; - } - - public String getHonorificSuffix() { - return honorificSuffix; - } - - public void setHonorificSuffix(String honorificSuffix) { - this.honorificSuffix = honorificSuffix; - } - - public List getX509Certificates() { - return x509Certificates; - } - - public void setX509Certificates(List x509Certificates) { - this.x509Certificates = x509Certificates; - } - - public Date getPasswordExpirationDate() { - return passwordExpirationDate; - } - - public void setPasswordExpirationDate(Date passwordExpirationDate) { - this.passwordExpirationDate = passwordExpirationDate; - } - - public String getPersistentId() { - return persistentId; - } - - public void setPersistentId(String persistentId) { - this.persistentId = persistentId; - } - - public String getMiddleName() { - return middleName; - } - - public void setMiddleName(String middleName) { - this.middleName = middleName; - } - - public String getNickname() { - return nickname; - } - - public void setNickname(String nickname) { - this.nickname = nickname; - } - - public String getPreferredUsername() { - return preferredUsername; - } - - public void setPreferredUsername(String preferredUsername) { - this.preferredUsername = preferredUsername; - } - - public String getProfile() { - return profile; - } - - public void setProfile(String profile) { - this.profile = profile; - } - - public String getPicture() { - return picture; - } - - public void setPicture(String picture) { - this.picture = picture; - } - - public String getWebsite() { - return website; - } - - public void setWebsite(String website) { - this.website = website; - } - - public boolean isEmailVerified() { - return emailVerified; - } - - public void setEmailVerified(boolean emailVerified) { - this.emailVerified = emailVerified; - } - - public String getGender() { - return gender; - } - - public void setGender(String gender) { - this.gender = gender; - } - - public Date getBirthdate() { - return birthdate; - } - - public void setBirthdate(Date birthdate) { - this.birthdate = birthdate; - } - - public String getTimezone() { - return timezone; - } - - public void setTimezone(String timezone) { - this.timezone = timezone; - } - - public String getLocale() { - return locale; - } - - public void setLocale(String locale) { - this.locale = locale; - } - - public boolean isPhoneNumberVerified() { - return phoneNumberVerified; - } - - public void setPhoneNumberVerified(boolean phoneNumberVerified) { - this.phoneNumberVerified = phoneNumberVerified; - } - - public List
getAddress() { - return address; - } - - public void setAddress(List
address) { - this.address = address; - } - - public Date getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(Date updatedAt) { - this.updatedAt = updatedAt; - } - - public String getPreferredLanguage() { - return preferredLanguage; - } - - public void setPreferredLanguage(String preferredLanguage) { - this.preferredLanguage = preferredLanguage; - } - - public String getRole() { - return role; - } - - public void setRole(String role) { - this.role = role; - } - - public String getSecretAnswer() { - return secretAnswer; - } - - public void setSecretAnswer(String secretAnswer) { - this.secretAnswer = secretAnswer; - } - - public String getSecretQuestion() { - return secretQuestion; - } - - public void setSecretQuestion(String secretQuestion) { - this.secretQuestion = secretQuestion; - } - - public String getSeeAlso() { - return seeAlso; - } - - public void setSeeAlso(String seeAlso) { - this.seeAlso = seeAlso; - } - - public String getSn() { - return sn; - } - - public void setSn(String sn) { - this.sn = sn; - } - - public String getCn() { - return cn; - } - - public void setCn(String cn) { - this.cn = cn; - } - - public String getTransientId() { - return transientId; - } - - public void setTransientId(String transientId) { - this.transientId = transientId; - } - - public String getUserPassword() { - return userPassword; - } - - public void setUserPassword(String userPassword) { - this.userPassword = userPassword; - } - - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public String getStreet() { - return street; - } - - public void setStreet(String street) { - this.street = street; - } - - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - public Integer getCountInvalidLogin() { - return countInvalidLogin; - } - - public void setCountInvalidLogin(Integer countInvalidLogin) { - this.countInvalidLogin = countInvalidLogin; - } - - public String getEnrollmentCode() { - return enrollmentCode; - } - - public void setEnrollmentCode(String enrollmentCode) { - this.enrollmentCode = enrollmentCode; - } - - public String getImapData() { - return imapData; - } - - public void setImapData(String imapData) { - this.imapData = imapData; - } - - public List getPpid() { - return ppid; - } - - - public void setPpid(List ppid) { - this.ppid = ppid; - } - - public String getGuid() { - return guid; - } - - - public void setGuid(String guid) { - this.guid = guid; - } - - - public String getPreferredMethod() { - return preferredMethod; - } - - - public void setPreferredMethod(String preferredMethod) { - this.preferredMethod = preferredMethod; - } - - - public String getUserCertificate() { - return userCertificate; - } - - - public void setUserCertificate(String userCertificate) { - this.userCertificate = userCertificate; - } - - - public OTPDevice getOtpDevices() { - return otpDevices; - } - - - public void setOtpDevices(OTPDevice otpDevices) { - this.otpDevices = otpDevices; - } - - - public String getMobileDevices() { - return mobileDevices; - } - - - public void setMobileDevices(String mobileDevices) { - this.mobileDevices = mobileDevices; - } - - - public String getTrustedDevices() { - return trustedDevices; - } - - - public void setTrustedDevices(String trustedDevices) { - this.trustedDevices = trustedDevices; - } - - - public String getStrongAuthPolicy() { - return strongAuthPolicy; - } - - - public void setStrongAuthPolicy(String strongAuthPolicy) { - this.strongAuthPolicy = strongAuthPolicy; - } - - - public List getUnlinkedExternalUids() { - return unlinkedExternalUids; - } - - - public void setUnlinkedExternalUids(List unlinkedExternalUids) { - this.unlinkedExternalUids = unlinkedExternalUids; - } - - - public String getBackchannelDeviceRegistrationTkn() { - return backchannelDeviceRegistrationTkn; - } - - - public void setBackchannelDeviceRegistrationTkn(String backchannelDeviceRegistrationTkn) { - this.backchannelDeviceRegistrationTkn = backchannelDeviceRegistrationTkn; - } - - - public String getBackchannelUsrCode() { - return backchannelUsrCode; - } - - - public void setBackchannelUsrCode(String backchannelUsrCode) { - this.backchannelUsrCode = backchannelUsrCode; - } - - - public static long getSerialversionuid() { - return serialVersionUID; - } - - - public void setAttribute(String attributeName, String attributeValue, Boolean multiValued) { - CustomObjectAttribute attribute = new CustomObjectAttribute(attributeName, attributeValue); - if (multiValued != null) { - attribute.setMultiValued(multiValued); - } - - removeAttribute(attributeName); - getCustomAttributes().add(attribute); - } - - - public void setAttribute(String attributeName, String[] attributeValues, Boolean multiValued) { - CustomObjectAttribute attribute = new CustomObjectAttribute(attributeName, Arrays.asList(attributeValues)); - if (multiValued != null) { - attribute.setMultiValued(multiValued); - } - - removeAttribute(attributeName); - getCustomAttributes().add(attribute); - } - - - public void setAttribute(String attributeName, List attributeValues, Boolean multiValued) { - CustomObjectAttribute attribute = new CustomObjectAttribute(attributeName, attributeValues); - if (multiValued != null) { - attribute.setMultiValued(multiValued); - } - - removeAttribute(attributeName); - getCustomAttributes().add(attribute); - } - - public void removeAttribute(String attributeName) { - for (Iterator it = getCustomAttributes().iterator(); it.hasNext(); ) { - if (StringHelper.equalsIgnoreCase(attributeName, it.next().getName())) { - it.remove(); - break; - } - } - } - -} \ No newline at end of file diff --git a/jans-config-api/server/src/main/java/io/jans/configapi/rest/resource/auth/UserResource.java b/jans-config-api/server/src/main/java/io/jans/configapi/rest/resource/auth/UserResource.java index ee2970f6d7e..1458d6192ea 100644 --- a/jans-config-api/server/src/main/java/io/jans/configapi/rest/resource/auth/UserResource.java +++ b/jans-config-api/server/src/main/java/io/jans/configapi/rest/resource/auth/UserResource.java @@ -73,7 +73,7 @@ public Response getUserByInum(@PathParam(ApiConstants.INUM) @NotNull String inum logger.debug("User serach by inum:{}", escapeLog(inum)); } User user = userSrv.getUserByInum(inum); - logger.debug("Based on inum:{}, user:{}", inum, user); + logger.debug("user:{}", user); return Response.ok(user).build(); }