package com.atlassian.stash.internal.web.users;

import com.atlassian.bitbucket.validation.annotation.FieldEquals;
import com.atlassian.bitbucket.validation.annotation.RequiredString;

import javax.annotation.Nonnull;

@FieldEquals(fields = {"newPassword", "confirmNewPassword"}, reportingField = "confirmNewPassword", message = "{com.atlassian.bitbucket.validation.passwords.notequals.message}")
public class AccountPasswordForm {
    private String currentPassword;
    private String newPassword;
    private String confirmNewPassword;

    @RequiredString(size = 255)
    @Nonnull
    public String getCurrentPassword() {
        return currentPassword;
    }

    @RequiredString(size = 255)
    @Nonnull
    public String getNewPassword() {
        return newPassword;
    }

    @RequiredString(size = 255)
    @Nonnull
    public String getConfirmNewPassword() {
        return confirmNewPassword;
    }

    public void setCurrentPassword(String currentPassword) {
        this.currentPassword = currentPassword;
    }

    public void setNewPassword(String newPassword) {
        this.newPassword = newPassword;
    }

    public void setConfirmNewPassword(String confirmNewPassword) {
        this.confirmNewPassword = confirmNewPassword;
    }
}
