public void setMinUserIdLength(int minUserIdLength) throws DorianInternalFault { if (minUserIdLength < MIN_UID_LENGTH) { DorianInternalFault f = new DorianInternalFault(); f.setFaultString("The minimum user id must be at least " + MIN_UID_LENGTH + " characters."); throw f; } this.minUserIdLength = minUserIdLength; }
public void setMaxUserIdLength(int maxUserIdLength) throws DorianInternalFault { if (maxUserIdLength > MAX_UID_LENGTH) { DorianInternalFault f = new DorianInternalFault(); f.setFaultString( "The maximum user id must be no more than " + MAX_UID_LENGTH + " characters."); throw f; } this.maxUserIdLength = maxUserIdLength; }
public void setName(String name) throws DorianInternalFault { if (name.length() > MAX_NAME_LENGTH) { DorianInternalFault f = new DorianInternalFault(); f.setFaultString( "The name of the Dorian IdP cannot exceed " + MAX_NAME_LENGTH + " characters."); throw f; } this.name = name; }
public void setAssertingCredentialsEncryptionPassword( String assertingCredentialsEncryptionPassword) throws DorianInternalFault { if (Utils.clean(assertingCredentialsEncryptionPassword) == null) { DorianInternalFault f = new DorianInternalFault(); f.setFaultString("Invalid asserting credentials password specified."); throw f; } this.assertingCredentialsEncryptionPassword = assertingCredentialsEncryptionPassword; }
public void setAccountInformationModificationPolicy(String policy) throws DorianInternalFault { if (policy.equals(AccountInformationModificationPolicy.User.getValue()) || policy.equals(AccountInformationModificationPolicy.Admin.getValue())) { this.accountInformationModificationPolicy = AccountInformationModificationPolicy.fromValue(policy); } else { DorianInternalFault f = new DorianInternalFault(); f.setFaultString( "The account information modification policy " + policy + ", is invalid. Please specify a valid policy (" + AccountInformationModificationPolicy.User.getValue() + ", " + AccountInformationModificationPolicy.Admin.getValue() + ")."); throw f; } }