001
014
015 package com.liferay.portal.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class PasswordPolicyServiceUtil {
035
040 public static com.liferay.portal.model.PasswordPolicy addPasswordPolicy(
041 java.lang.String name, java.lang.String description,
042 boolean changeable, boolean changeRequired, long minAge,
043 boolean checkSyntax, boolean allowDictionaryWords, int minAlphanumeric,
044 int minLength, int minLowerCase, int minNumbers, int minSymbols,
045 int minUpperCase, boolean history, int historyCount,
046 boolean expireable, long maxAge, long warningTime, int graceLimit,
047 boolean lockout, int maxFailure, long lockoutDuration,
048 long resetFailureCount, long resetTicketMaxAge)
049 throws com.liferay.portal.kernel.exception.PortalException,
050 com.liferay.portal.kernel.exception.SystemException {
051 return getService()
052 .addPasswordPolicy(name, description, changeable,
053 changeRequired, minAge, checkSyntax, allowDictionaryWords,
054 minAlphanumeric, minLength, minLowerCase, minNumbers, minSymbols,
055 minUpperCase, history, historyCount, expireable, maxAge,
056 warningTime, graceLimit, lockout, maxFailure, lockoutDuration,
057 resetFailureCount, resetTicketMaxAge);
058 }
059
060 public static void deletePasswordPolicy(long passwordPolicyId)
061 throws com.liferay.portal.kernel.exception.PortalException,
062 com.liferay.portal.kernel.exception.SystemException {
063 getService().deletePasswordPolicy(passwordPolicyId);
064 }
065
066 public static com.liferay.portal.model.PasswordPolicy updatePasswordPolicy(
067 long passwordPolicyId, java.lang.String name,
068 java.lang.String description, boolean changeable,
069 boolean changeRequired, long minAge, boolean checkSyntax,
070 boolean allowDictionaryWords, int minAlphanumeric, int minLength,
071 int minLowerCase, int minNumbers, int minSymbols, int minUpperCase,
072 boolean history, int historyCount, boolean expireable, long maxAge,
073 long warningTime, int graceLimit, boolean lockout, int maxFailure,
074 long lockoutDuration, long resetFailureCount, long resetTicketMaxAge)
075 throws com.liferay.portal.kernel.exception.PortalException,
076 com.liferay.portal.kernel.exception.SystemException {
077 return getService()
078 .updatePasswordPolicy(passwordPolicyId, name, description,
079 changeable, changeRequired, minAge, checkSyntax,
080 allowDictionaryWords, minAlphanumeric, minLength, minLowerCase,
081 minNumbers, minSymbols, minUpperCase, history, historyCount,
082 expireable, maxAge, warningTime, graceLimit, lockout, maxFailure,
083 lockoutDuration, resetFailureCount, resetTicketMaxAge);
084 }
085
086 public static PasswordPolicyService getService() {
087 if (_service == null) {
088 _service = (PasswordPolicyService)PortalBeanLocatorUtil.locate(PasswordPolicyService.class.getName());
089
090 ReferenceRegistry.registerReference(PasswordPolicyServiceUtil.class,
091 "_service");
092 MethodCache.remove(PasswordPolicyService.class);
093 }
094
095 return _service;
096 }
097
098 public void setService(PasswordPolicyService service) {
099 MethodCache.remove(PasswordPolicyService.class);
100
101 _service = service;
102
103 ReferenceRegistry.registerReference(PasswordPolicyServiceUtil.class,
104 "_service");
105 MethodCache.remove(PasswordPolicyService.class);
106 }
107
108 private static PasswordPolicyService _service;
109 }