1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="PasswordPolicyServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link PasswordPolicyService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       PasswordPolicyService
37   * @generated
38   */
39  public class PasswordPolicyServiceUtil {
40      public static com.liferay.portal.model.PasswordPolicy addPasswordPolicy(
41          java.lang.String name, java.lang.String description,
42          boolean changeable, boolean changeRequired, long minAge,
43          boolean checkSyntax, boolean allowDictionaryWords, int minLength,
44          boolean history, int historyCount, boolean expireable, long maxAge,
45          long warningTime, int graceLimit, boolean lockout, int maxFailure,
46          long lockoutDuration, long resetFailureCount)
47          throws com.liferay.portal.kernel.exception.PortalException,
48              com.liferay.portal.kernel.exception.SystemException {
49          return getService()
50                     .addPasswordPolicy(name, description, changeable,
51              changeRequired, minAge, checkSyntax, allowDictionaryWords,
52              minLength, history, historyCount, expireable, maxAge, warningTime,
53              graceLimit, lockout, maxFailure, lockoutDuration, resetFailureCount);
54      }
55  
56      public static void deletePasswordPolicy(long passwordPolicyId)
57          throws com.liferay.portal.kernel.exception.PortalException,
58              com.liferay.portal.kernel.exception.SystemException {
59          getService().deletePasswordPolicy(passwordPolicyId);
60      }
61  
62      public static com.liferay.portal.model.PasswordPolicy updatePasswordPolicy(
63          long passwordPolicyId, java.lang.String name,
64          java.lang.String description, boolean changeable,
65          boolean changeRequired, long minAge, boolean checkSyntax,
66          boolean allowDictionaryWords, int minLength, boolean history,
67          int historyCount, boolean expireable, long maxAge, long warningTime,
68          int graceLimit, boolean lockout, int maxFailure, long lockoutDuration,
69          long resetFailureCount)
70          throws com.liferay.portal.kernel.exception.PortalException,
71              com.liferay.portal.kernel.exception.SystemException {
72          return getService()
73                     .updatePasswordPolicy(passwordPolicyId, name, description,
74              changeable, changeRequired, minAge, checkSyntax,
75              allowDictionaryWords, minLength, history, historyCount, expireable,
76              maxAge, warningTime, graceLimit, lockout, maxFailure,
77              lockoutDuration, resetFailureCount);
78      }
79  
80      public static PasswordPolicyService getService() {
81          if (_service == null) {
82              _service = (PasswordPolicyService)PortalBeanLocatorUtil.locate(PasswordPolicyService.class.getName());
83          }
84  
85          return _service;
86      }
87  
88      public void setService(PasswordPolicyService service) {
89          _service = service;
90      }
91  
92      private static PasswordPolicyService _service;
93  }