|
|
|
@ -15,6 +15,7 @@ |
|
|
|
*/ |
|
|
|
package org.thingsboard.server.common.data; |
|
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty; |
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty.Access; |
|
|
|
import org.thingsboard.server.common.data.id.CustomerId; |
|
|
|
@ -61,6 +62,15 @@ public class Customer extends ContactBased<CustomerId> implements HasName { |
|
|
|
this.title = title; |
|
|
|
} |
|
|
|
|
|
|
|
@JsonIgnore |
|
|
|
public boolean isPublic() { |
|
|
|
if (getAdditionalInfo() != null && getAdditionalInfo().has("isPublic")) { |
|
|
|
return additionalInfo.get("isPublic").asBoolean(); |
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@JsonProperty(access = Access.READ_ONLY) |
|
|
|
public String getName() { |
|
|
|
@ -149,5 +159,4 @@ public class Customer extends ContactBased<CustomerId> implements HasName { |
|
|
|
builder.append("]"); |
|
|
|
return builder.toString(); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|