|
@@ -22,13 +22,18 @@
|
|
|
|
|
|
package password.pwm.svc.wordlist;
|
|
package password.pwm.svc.wordlist;
|
|
|
|
|
|
|
|
+import lombok.Builder;
|
|
|
|
+import lombok.Getter;
|
|
|
|
+
|
|
import java.io.Serializable;
|
|
import java.io.Serializable;
|
|
-import java.util.Date;
|
|
|
|
|
|
+import java.time.Instant;
|
|
|
|
|
|
|
|
+@Getter
|
|
|
|
+@Builder
|
|
public class StoredWordlistDataBean implements Serializable {
|
|
public class StoredWordlistDataBean implements Serializable {
|
|
private boolean completed;
|
|
private boolean completed;
|
|
private Source source;
|
|
private Source source;
|
|
- private Date storeDate;
|
|
|
|
|
|
+ private Instant storeDate;
|
|
private String sha1hash;
|
|
private String sha1hash;
|
|
private int size;
|
|
private int size;
|
|
|
|
|
|
@@ -49,80 +54,4 @@ public class StoredWordlistDataBean implements Serializable {
|
|
return label;
|
|
return label;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- public boolean isCompleted() {
|
|
|
|
- return completed;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public Source getSource() {
|
|
|
|
- return source;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public Date getStoreDate() {
|
|
|
|
- return storeDate;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public String getSha1hash() {
|
|
|
|
- return sha1hash;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public int getSize() {
|
|
|
|
- return size;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public StoredWordlistDataBean(final boolean completed, final Source source, final Date storeDate, final String sha1hash, final int size) {
|
|
|
|
- this.completed = completed;
|
|
|
|
- this.source = source;
|
|
|
|
- this.storeDate = storeDate;
|
|
|
|
- this.sha1hash = sha1hash;
|
|
|
|
- this.size = size;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public static class Builder {
|
|
|
|
- private boolean completed;
|
|
|
|
- private Source source;
|
|
|
|
- private Date storeDate;
|
|
|
|
- private String sha1hash;
|
|
|
|
- private int size;
|
|
|
|
-
|
|
|
|
- public Builder() {
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public Builder(final StoredWordlistDataBean source) {
|
|
|
|
- this.completed = source.completed;
|
|
|
|
- this.source = source.source;
|
|
|
|
- this.storeDate = source.storeDate;
|
|
|
|
- this.sha1hash = source.sha1hash;
|
|
|
|
- this.size = source.size;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public Builder setCompleted(final boolean completed) {
|
|
|
|
- this.completed = completed;
|
|
|
|
- return this;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public Builder setSource(final Source source) {
|
|
|
|
- this.source = source;
|
|
|
|
- return this;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public Builder setStoreDate(final Date storeDate) {
|
|
|
|
- this.storeDate = storeDate;
|
|
|
|
- return this;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public Builder setSha1hash(final String sha1hash) {
|
|
|
|
- this.sha1hash = sha1hash;
|
|
|
|
- return this;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public Builder setSize(final int size) {
|
|
|
|
- this.size = size;
|
|
|
|
- return this;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public StoredWordlistDataBean create() {
|
|
|
|
- return new StoredWordlistDataBean(completed, source, storeDate, sha1hash, size);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
}
|
|
}
|