1 package org.usermanagement.util;
3 import org.springframework.beans.factory.annotation.Value;
4 import org.springframework.context.annotation.PropertySource;
5 import org.springframework.stereotype.Component;
12 @PropertySource(
"classpath:message.properties")
15 @Value(
"${attribute.unique.message}")
16 private String attributeUnique;
19 @Value(
"${attribute.not.null.message}")
20 private String attributeNotNull;
22 @Value(
"${attribute.invalid.message}")
23 private String attributeInvalid;
25 @Value(
"${attribute.not.valid.message}")
26 private String attributeNotvalid;
29 @Value(
"${attribute.not.found.message}")
30 private String attributeNotFound;
32 @Value(
"${attribute.deletion.not.allowed.message}")
33 private String attributeDeletionNotAllowed;
35 @Value(
"${attribute.password.invalid}")
36 private String attributePasswordInvalid;
38 @Value(
"${attribute.2fa.not.configured}")
39 private String attribute2faNotConfiured;
41 @Value(
"${attribute.2fa.not.enabled}")
42 private String attribute2faNotEnabled;
44 @Value(
"${attribute.password.should.not.same}")
45 private String attributePasswordShouldNotSame;
47 @Value(
"${attribute.password.length}")
48 private String attributePasswordLength;
50 @Value(
"${unauthorized.message}")
51 private String unauthorizedMessage;
53 @Value(
"${attribute.password.must.contain}")
54 private String attributePasswordMustContain;
56 @Value(
"${attribute.password.must.not.contain}")
57 private String attributePasswordMustNotContain;
66 return attributeUnique.replace(
"{{ATTRIBUTE}}", attribute);
76 return attributeNotNull.replace(
"{{ATTRIBUTE}}", attribute);
87 return attributeInvalid.replace(
"{{ATTRIBUTE}}", attribute).replace(
"{{VALUE}}",
value);
97 return attributeNotFound.replace(
"{{ATTRIBUTE}}", attribute);
108 return attributeDeletionNotAllowed.replace(
"{{ATTRIBUTE1}}", attribute1).replace(
109 "{{ATTRIBUTE2}}", attribute2);
118 return attributePasswordInvalid;
127 return attribute2faNotConfiured;
136 return attribute2faNotEnabled;
145 return unauthorizedMessage;
155 return attributeNotvalid.replace(
"{{ATTRIBUTE}}", attribute);
164 return attributePasswordShouldNotSame;
175 return attributePasswordLength.replace(
"{{VALUE1}}", min).replace(
"{{VALUE2}}", min);
184 return attributePasswordMustContain;
193 return attributePasswordMustNotContain;
String getAttributeNotFound(String attribute)
String getAttribute2faNotEnabled()
String getAttributeNotNull(final String attribute)
String getAttributePasswordMustContain()
String getAttributePasswordLength(final String min, final String max)
String getAttributeInvalid(final String attribute, final String value)
String getUnauthorizedMessage()
String getAttributeNotvalid(final String attribute)
String getAttributePasswordInvalid()
String getAttributeUnique(final String attribute)
String getAttributePasswordShouldNotSame()
String getAttribute2faNotConfiured()
String getAttributeDeletionNotAllowed(String attribute1, String attribute2)
String getAttributePasswordMustNotContain()