1
22
23 package com.liferay.portal.service;
24
25
26
47 public class PasswordPolicyServiceUtil {
48 public static com.liferay.portal.model.PasswordPolicy addPasswordPolicy(
49 java.lang.String name, java.lang.String description,
50 boolean changeable, boolean changeRequired, long minAge,
51 boolean checkSyntax, boolean allowDictionaryWords, int minLength,
52 boolean history, int historyCount, boolean expireable, long maxAge,
53 long warningTime, int graceLimit, boolean lockout, int maxFailure,
54 long lockoutDuration, long resetFailureCount)
55 throws com.liferay.portal.PortalException,
56 com.liferay.portal.SystemException {
57 return getService()
58 .addPasswordPolicy(name, description, changeable,
59 changeRequired, minAge, checkSyntax, allowDictionaryWords,
60 minLength, history, historyCount, expireable, maxAge, warningTime,
61 graceLimit, lockout, maxFailure, lockoutDuration, resetFailureCount);
62 }
63
64 public static void deletePasswordPolicy(long passwordPolicyId)
65 throws com.liferay.portal.PortalException,
66 com.liferay.portal.SystemException {
67 getService().deletePasswordPolicy(passwordPolicyId);
68 }
69
70 public static com.liferay.portal.model.PasswordPolicy updatePasswordPolicy(
71 long passwordPolicyId, java.lang.String name,
72 java.lang.String description, boolean changeable,
73 boolean changeRequired, long minAge, boolean checkSyntax,
74 boolean allowDictionaryWords, int minLength, boolean history,
75 int historyCount, boolean expireable, long maxAge, long warningTime,
76 int graceLimit, boolean lockout, int maxFailure, long lockoutDuration,
77 long resetFailureCount)
78 throws com.liferay.portal.PortalException,
79 com.liferay.portal.SystemException {
80 return getService()
81 .updatePasswordPolicy(passwordPolicyId, name, description,
82 changeable, changeRequired, minAge, checkSyntax,
83 allowDictionaryWords, minLength, history, historyCount, expireable,
84 maxAge, warningTime, graceLimit, lockout, maxFailure,
85 lockoutDuration, resetFailureCount);
86 }
87
88 public static PasswordPolicyService getService() {
89 if (_service == null) {
90 throw new RuntimeException("PasswordPolicyService is not set");
91 }
92
93 return _service;
94 }
95
96 public void setService(PasswordPolicyService service) {
97 _service = service;
98 }
99
100 private static PasswordPolicyService _service;
101 }