]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/dbObjects/SupportedUser.java
ADD: Functoinality behind SE change dob and SE change name
[gigi.git] / src / org / cacert / gigi / dbObjects / SupportedUser.java
index 668fd8c9815a64896f33b5f41f3c272c1a359eec..58755059e27cddf15342b2513d3018881befd25d 100644 (file)
@@ -18,14 +18,22 @@ public class SupportedUser {
         this.ticket = ticket;
     }
 
-    public void setName(String fname, String mname, String lname, String suffix) throws GigiApiException {
+    public boolean setName(Name newName) throws GigiApiException {
+        if (newName.equals(target.getName())) {
+            return false;
+        }
         writeSELog("SE Name change");
-        target.setName(new Name(fname, lname, mname, suffix));
+        target.setName(newName);
+        return true;
     }
 
-    public void setDob(Date dob) throws GigiApiException {
+    public boolean setDob(Date dob) throws GigiApiException {
+        if (dob.toString().equals(target.getDoB().toString())) {
+            return false;
+        }
         writeSELog("SE dob change");
         target.setDoB(dob);
+        return true;
     }
 
     public void revokeAllCertificates() throws GigiApiException {
@@ -64,4 +72,8 @@ public class SupportedUser {
         return target;
     }
 
+    public void submitSupportAction() throws GigiApiException {
+        target.rawUpdateUserData();
+    }
+
 }