jerqi commented on code in PR #4501:
URL: https://github.com/apache/gravitino/pull/4501#discussion_r1716822420


##########
common/src/main/java/org/apache/gravitino/dto/authorization/SecurableObjectDTO.java:
##########
@@ -31,44 +31,41 @@
 /** Data transfer object representing a securable object. */
 public class SecurableObjectDTO implements SecurableObject {
 
-  @JsonProperty("fullName")
-  private String fullName;
-
   @JsonProperty("type")
   private Type type;
 
   @JsonProperty("privileges")
   private PrivilegeDTO[] privileges;
 
-  private String parent;
-  private String name;
-
-  /** Default constructor for Jackson deserialization. */
-  protected SecurableObjectDTO() {}
+  /** @return The full name of the securable object. */
+  @JsonProperty("fullName")
+  public String getFullName() {
+    return fullName();
+  }
 
   /**
-   * Creates a new instance of SecurableObject DTO.
+   * Sets the full name of the securable object. Only used by Jackson 
deserializer.
    *
-   * @param privileges The privileges of the SecurableObject DTO.
-   * @param fullName The name of the SecurableObject DTO.
-   * @param type The type of the securable object.
+   * @param fullName The full name of the metadata object.
    */
-  protected SecurableObjectDTO(String fullName, Type type, PrivilegeDTO[] 
privileges) {
-    this.type = type;
-    this.fullName = fullName;
+  @JsonProperty("fullName")
+  public void setFullName(String fullName) {
     int index = fullName.lastIndexOf(".");
-
     if (index == -1) {
-      this.parent = null;
-      this.name = fullName;
+      parent = null;
+      name = fullName;
     } else {
-      this.parent = fullName.substring(0, index);
-      this.name = fullName.substring(index + 1);
+      parent = fullName.substring(0, index);
+      name = fullName.substring(index + 1);
     }
-
-    this.privileges = privileges;
   }
 
+  private String parent;
+  private String name;
+
+  /** Default constructor for Jackson deserialization. */
+  protected SecurableObjectDTO() {}

Review Comment:
   I will.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to