@cronapp/templates 2.9.1-SP.8 → 2.9.1-SP.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* @generated
|
|
19
19
|
*/
|
|
20
20
|
public ${classClass.name} set${fieldName?cap_first}(${field.type} ${fieldName}) {
|
|
21
|
-
<#if field.isEncryption() &&
|
|
21
|
+
<#if field.isEncryption() && field.getPasswordPolicy() != "full">
|
|
22
22
|
this.${fieldName} = ${fieldName}.startsWith(ENCRYPT) ? ${fieldName} : new BCryptPasswordEncoder().encode(${fieldName});
|
|
23
23
|
<#else>
|
|
24
24
|
this.${fieldName} = ${fieldName};
|
|
@@ -71,9 +71,8 @@ import cronapi.database.ByteConverter;
|
|
|
71
71
|
import cronapp.framework.persistence.ValidPassword;
|
|
72
72
|
import cronapp.framework.persistence.ValidPasswords;
|
|
73
73
|
import cronapp.framework.persistence.PasswordEncoderListener;
|
|
74
|
-
<#else>
|
|
75
|
-
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
76
74
|
</#if>
|
|
75
|
+
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
77
76
|
</#if>
|
|
78
77
|
<#list clazz.imports as import>
|
|
79
78
|
import ${import};
|
|
@@ -159,14 +158,14 @@ import org.eclipse.persistence.annotations.*;
|
|
|
159
158
|
<#if clazz.hasStrongPassword() && clazz.hasEncryption()>
|
|
160
159
|
@ValidPasswords({
|
|
161
160
|
<#list clazz.fields as field>
|
|
162
|
-
<#if field.isEncryption()>
|
|
161
|
+
<#if field.isEncryption() && field.getPasswordPolicy() == "full">
|
|
163
162
|
@ValidPassword(passwordProperty = "${field.name}", passwordHistoryProperty = "${field.name}History"),
|
|
164
163
|
</#if>
|
|
165
164
|
</#list>
|
|
166
165
|
})
|
|
167
166
|
</#if>
|
|
168
167
|
public class ${clazz.name} implements Serializable {
|
|
169
|
-
<#if clazz.hasEncryption()
|
|
168
|
+
<#if clazz.hasEncryption()>
|
|
170
169
|
/**
|
|
171
170
|
* Variável privada para verificação da criptofrafia
|
|
172
171
|
*
|
|
@@ -303,7 +302,7 @@ public class ${clazz.name} implements Serializable {
|
|
|
303
302
|
${field.modifier} <#if field.arrayRelation>${field.type}<#else>${field.type}</#if> ${field.name}<#if field.defaultValue?has_content> = ${field.defaultValue}</#if>;
|
|
304
303
|
</#if>
|
|
305
304
|
|
|
306
|
-
<#if field.isEncryption() &&
|
|
305
|
+
<#if field.isEncryption() && field.getPasswordPolicy() == "full">
|
|
307
306
|
/**
|
|
308
307
|
* @generated
|
|
309
308
|
*/
|
|
@@ -324,7 +323,7 @@ public class ${clazz.name} implements Serializable {
|
|
|
324
323
|
|
|
325
324
|
<#list clazz.fields as field>
|
|
326
325
|
<@getter_setter clazz field "${field.name}" />
|
|
327
|
-
<#if field.isEncryption()>
|
|
326
|
+
<#if field.isEncryption() && field.getPasswordPolicy() == "full">
|
|
328
327
|
<@getter_setter clazz field "${field.name}History" />
|
|
329
328
|
</#if>
|
|
330
329
|
</#list>
|