1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="PasswordPolicyLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link PasswordPolicyLocalService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       PasswordPolicyLocalService
39   * @generated
40   */
41  public class PasswordPolicyLocalServiceUtil {
42      public static com.liferay.portal.model.PasswordPolicy addPasswordPolicy(
43          com.liferay.portal.model.PasswordPolicy passwordPolicy)
44          throws com.liferay.portal.SystemException {
45          return getService().addPasswordPolicy(passwordPolicy);
46      }
47  
48      public static com.liferay.portal.model.PasswordPolicy createPasswordPolicy(
49          long passwordPolicyId) {
50          return getService().createPasswordPolicy(passwordPolicyId);
51      }
52  
53      public static void deletePasswordPolicy(long passwordPolicyId)
54          throws com.liferay.portal.PortalException,
55              com.liferay.portal.SystemException {
56          getService().deletePasswordPolicy(passwordPolicyId);
57      }
58  
59      public static void deletePasswordPolicy(
60          com.liferay.portal.model.PasswordPolicy passwordPolicy)
61          throws com.liferay.portal.SystemException {
62          getService().deletePasswordPolicy(passwordPolicy);
63      }
64  
65      @SuppressWarnings("rawtypes")
66      public static java.util.List dynamicQuery(
67          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68          throws com.liferay.portal.SystemException {
69          return getService().dynamicQuery(dynamicQuery);
70      }
71  
72      @SuppressWarnings("rawtypes")
73      public static java.util.List dynamicQuery(
74          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75          int end) throws com.liferay.portal.SystemException {
76          return getService().dynamicQuery(dynamicQuery, start, end);
77      }
78  
79      @SuppressWarnings("rawtypes")
80      public static java.util.List dynamicQuery(
81          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
82          int end,
83          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
84          throws com.liferay.portal.SystemException {
85          return getService()
86                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
87      }
88  
89      public static int dynamicQueryCount(
90          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
91          throws com.liferay.portal.SystemException {
92          return getService().dynamicQueryCount(dynamicQuery);
93      }
94  
95      public static com.liferay.portal.model.PasswordPolicy getPasswordPolicy(
96          long passwordPolicyId)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException {
99          return getService().getPasswordPolicy(passwordPolicyId);
100     }
101 
102     public static java.util.List<com.liferay.portal.model.PasswordPolicy> getPasswordPolicies(
103         int start, int end) throws com.liferay.portal.SystemException {
104         return getService().getPasswordPolicies(start, end);
105     }
106 
107     public static int getPasswordPoliciesCount()
108         throws com.liferay.portal.SystemException {
109         return getService().getPasswordPoliciesCount();
110     }
111 
112     public static com.liferay.portal.model.PasswordPolicy updatePasswordPolicy(
113         com.liferay.portal.model.PasswordPolicy passwordPolicy)
114         throws com.liferay.portal.SystemException {
115         return getService().updatePasswordPolicy(passwordPolicy);
116     }
117 
118     public static com.liferay.portal.model.PasswordPolicy updatePasswordPolicy(
119         com.liferay.portal.model.PasswordPolicy passwordPolicy, boolean merge)
120         throws com.liferay.portal.SystemException {
121         return getService().updatePasswordPolicy(passwordPolicy, merge);
122     }
123 
124     public static com.liferay.portal.model.PasswordPolicy addPasswordPolicy(
125         long userId, boolean defaultPolicy, java.lang.String name,
126         java.lang.String description, boolean changeable,
127         boolean changeRequired, long minAge, boolean checkSyntax,
128         boolean allowDictionaryWords, int minLength, boolean history,
129         int historyCount, boolean expireable, long maxAge, long warningTime,
130         int graceLimit, boolean lockout, int maxFailure, long lockoutDuration,
131         long resetFailureCount)
132         throws com.liferay.portal.PortalException,
133             com.liferay.portal.SystemException {
134         return getService()
135                    .addPasswordPolicy(userId, defaultPolicy, name, description,
136             changeable, changeRequired, minAge, checkSyntax,
137             allowDictionaryWords, minLength, history, historyCount, expireable,
138             maxAge, warningTime, graceLimit, lockout, maxFailure,
139             lockoutDuration, resetFailureCount);
140     }
141 
142     public static void checkDefaultPasswordPolicy(long companyId)
143         throws com.liferay.portal.PortalException,
144             com.liferay.portal.SystemException {
145         getService().checkDefaultPasswordPolicy(companyId);
146     }
147 
148     public static com.liferay.portal.model.PasswordPolicy getDefaultPasswordPolicy(
149         long companyId)
150         throws com.liferay.portal.PortalException,
151             com.liferay.portal.SystemException {
152         return getService().getDefaultPasswordPolicy(companyId);
153     }
154 
155     /**
156     * @deprecated
157     */
158     public static com.liferay.portal.model.PasswordPolicy getPasswordPolicy(
159         long companyId, long organizationId, long locationId)
160         throws com.liferay.portal.PortalException,
161             com.liferay.portal.SystemException {
162         return getService()
163                    .getPasswordPolicy(companyId, organizationId, locationId);
164     }
165 
166     public static com.liferay.portal.model.PasswordPolicy getPasswordPolicy(
167         long companyId, long[] organizationIds)
168         throws com.liferay.portal.PortalException,
169             com.liferay.portal.SystemException {
170         return getService().getPasswordPolicy(companyId, organizationIds);
171     }
172 
173     public static com.liferay.portal.model.PasswordPolicy getPasswordPolicyByUserId(
174         long userId)
175         throws com.liferay.portal.PortalException,
176             com.liferay.portal.SystemException {
177         return getService().getPasswordPolicyByUserId(userId);
178     }
179 
180     public static java.util.List<com.liferay.portal.model.PasswordPolicy> search(
181         long companyId, java.lang.String name, int start, int end,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException {
184         return getService().search(companyId, name, start, end, obc);
185     }
186 
187     public static int searchCount(long companyId, java.lang.String name)
188         throws com.liferay.portal.SystemException {
189         return getService().searchCount(companyId, name);
190     }
191 
192     public static com.liferay.portal.model.PasswordPolicy updatePasswordPolicy(
193         long passwordPolicyId, java.lang.String name,
194         java.lang.String description, boolean changeable,
195         boolean changeRequired, long minAge, boolean checkSyntax,
196         boolean allowDictionaryWords, int minLength, boolean history,
197         int historyCount, boolean expireable, long maxAge, long warningTime,
198         int graceLimit, boolean lockout, int maxFailure, long lockoutDuration,
199         long resetFailureCount)
200         throws com.liferay.portal.PortalException,
201             com.liferay.portal.SystemException {
202         return getService()
203                    .updatePasswordPolicy(passwordPolicyId, name, description,
204             changeable, changeRequired, minAge, checkSyntax,
205             allowDictionaryWords, minLength, history, historyCount, expireable,
206             maxAge, warningTime, graceLimit, lockout, maxFailure,
207             lockoutDuration, resetFailureCount);
208     }
209 
210     public static PasswordPolicyLocalService getService() {
211         if (_service == null) {
212             _service = (PasswordPolicyLocalService)PortalBeanLocatorUtil.locate(PasswordPolicyLocalService.class.getName());
213 
214             ReferenceRegistry.registerReference(PasswordPolicyLocalServiceUtil.class,
215                 "_service");
216             MethodCache.remove(PasswordPolicyLocalService.class);
217         }
218 
219         return _service;
220     }
221 
222     public void setService(PasswordPolicyLocalService service) {
223         MethodCache.remove(PasswordPolicyLocalService.class);
224 
225         _service = service;
226 
227         ReferenceRegistry.registerReference(PasswordPolicyLocalServiceUtil.class,
228             "_service");
229         MethodCache.remove(PasswordPolicyLocalService.class);
230     }
231 
232     private static PasswordPolicyLocalService _service;
233 }