@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (!(obj instanceof DsSecurityImpl)) return false; DsSecurityImpl other = (DsSecurityImpl) obj; if (reauthPlugin == null) { if (other.reauthPlugin != null) return false; } else if (!reauthPlugin.equals(other.reauthPlugin)) return false; return true; }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((reauthPlugin == null) ? 0 : reauthPlugin.hashCode()); return result; }
@Override public void validate() throws ValidateException { //just super.validate(). The reaut-plugin is not mandatory super.validate(); }
return new CredentialImpl(userName, password, securityDomain);
Recovery.Tag.forName(reader.getLocalName()) == Recovery.Tag.RECOVER_CREDENTIAL) { return new CredentialImpl(userName, password, securityDomain); } else { if (Credential.Tag.forName(reader.getLocalName()) == Credential.Tag.UNKNOWN) {
if ((recoveryUsername != null && recoveryPassword != null) || recoverySecurityDomain != null) { Credential credential = null; credential = new CredentialImpl(recoveryUsername, recoveryPassword, recoverySecurityDomain); Extension recoverPlugin = ModelNodeUtil.extractExtension(context, recoveryEnvModel, RECOVERLUGIN_CLASSNAME, RECOVERLUGIN_PROPERTIES); recovery = new Recovery(credential, recoverPlugin, noRecovery);
/** * Create a new SecurityImpl. * * @param userName userName * @param password password * @param securityDomain securityDomain * @throws ValidateException ValidateException */ public CredentialImpl(String userName, String password, String securityDomain) throws ValidateException { super(); this.userName = userName; this.password = password; this.securityDomain = securityDomain; this.validate(); }
credential = new CredentialImpl(recoveryUsername, recoveryPassword, recoverySecurityDomain);