001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * The utility for the password policy local service. This utility wraps {@link com.liferay.portal.service.impl.PasswordPolicyLocalServiceImpl} and is the primary access point for service operations in application layer code running on the local server.
022     *
023     * <p>
024     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see PasswordPolicyLocalService
029     * @see com.liferay.portal.service.base.PasswordPolicyLocalServiceBaseImpl
030     * @see com.liferay.portal.service.impl.PasswordPolicyLocalServiceImpl
031     * @generated
032     */
033    public class PasswordPolicyLocalServiceUtil {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.PasswordPolicyLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
038             */
039    
040            /**
041            * Adds the password policy to the database. Also notifies the appropriate model listeners.
042            *
043            * @param passwordPolicy the password policy
044            * @return the password policy that was added
045            * @throws SystemException if a system exception occurred
046            */
047            public static com.liferay.portal.model.PasswordPolicy addPasswordPolicy(
048                    com.liferay.portal.model.PasswordPolicy passwordPolicy)
049                    throws com.liferay.portal.kernel.exception.SystemException {
050                    return getService().addPasswordPolicy(passwordPolicy);
051            }
052    
053            /**
054            * Creates a new password policy with the primary key. Does not add the password policy to the database.
055            *
056            * @param passwordPolicyId the primary key for the new password policy
057            * @return the new password policy
058            */
059            public static com.liferay.portal.model.PasswordPolicy createPasswordPolicy(
060                    long passwordPolicyId) {
061                    return getService().createPasswordPolicy(passwordPolicyId);
062            }
063    
064            /**
065            * Deletes the password policy with the primary key from the database. Also notifies the appropriate model listeners.
066            *
067            * @param passwordPolicyId the primary key of the password policy
068            * @return the password policy that was removed
069            * @throws PortalException if a password policy with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public static com.liferay.portal.model.PasswordPolicy deletePasswordPolicy(
073                    long passwordPolicyId)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException {
076                    return getService().deletePasswordPolicy(passwordPolicyId);
077            }
078    
079            /**
080            * Deletes the password policy from the database. Also notifies the appropriate model listeners.
081            *
082            * @param passwordPolicy the password policy
083            * @return the password policy that was removed
084            * @throws PortalException
085            * @throws SystemException if a system exception occurred
086            */
087            public static com.liferay.portal.model.PasswordPolicy deletePasswordPolicy(
088                    com.liferay.portal.model.PasswordPolicy passwordPolicy)
089                    throws com.liferay.portal.kernel.exception.PortalException,
090                            com.liferay.portal.kernel.exception.SystemException {
091                    return getService().deletePasswordPolicy(passwordPolicy);
092            }
093    
094            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
095                    return getService().dynamicQuery();
096            }
097    
098            /**
099            * Performs a dynamic query on the database and returns the matching rows.
100            *
101            * @param dynamicQuery the dynamic query
102            * @return the matching rows
103            * @throws SystemException if a system exception occurred
104            */
105            @SuppressWarnings("rawtypes")
106            public static java.util.List dynamicQuery(
107                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
108                    throws com.liferay.portal.kernel.exception.SystemException {
109                    return getService().dynamicQuery(dynamicQuery);
110            }
111    
112            /**
113            * Performs a dynamic query on the database and returns a range of the matching rows.
114            *
115            * <p>
116            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.PasswordPolicyModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
117            * </p>
118            *
119            * @param dynamicQuery the dynamic query
120            * @param start the lower bound of the range of model instances
121            * @param end the upper bound of the range of model instances (not inclusive)
122            * @return the range of matching rows
123            * @throws SystemException if a system exception occurred
124            */
125            @SuppressWarnings("rawtypes")
126            public static java.util.List dynamicQuery(
127                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
128                    int end) throws com.liferay.portal.kernel.exception.SystemException {
129                    return getService().dynamicQuery(dynamicQuery, start, end);
130            }
131    
132            /**
133            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
134            *
135            * <p>
136            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.PasswordPolicyModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
137            * </p>
138            *
139            * @param dynamicQuery the dynamic query
140            * @param start the lower bound of the range of model instances
141            * @param end the upper bound of the range of model instances (not inclusive)
142            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
143            * @return the ordered range of matching rows
144            * @throws SystemException if a system exception occurred
145            */
146            @SuppressWarnings("rawtypes")
147            public static java.util.List dynamicQuery(
148                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
149                    int end,
150                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
151                    throws com.liferay.portal.kernel.exception.SystemException {
152                    return getService()
153                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
154            }
155    
156            /**
157            * Returns the number of rows that match the dynamic query.
158            *
159            * @param dynamicQuery the dynamic query
160            * @return the number of rows that match the dynamic query
161            * @throws SystemException if a system exception occurred
162            */
163            public static long dynamicQueryCount(
164                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
165                    throws com.liferay.portal.kernel.exception.SystemException {
166                    return getService().dynamicQueryCount(dynamicQuery);
167            }
168    
169            public static com.liferay.portal.model.PasswordPolicy fetchPasswordPolicy(
170                    long passwordPolicyId)
171                    throws com.liferay.portal.kernel.exception.SystemException {
172                    return getService().fetchPasswordPolicy(passwordPolicyId);
173            }
174    
175            /**
176            * Returns the password policy with the primary key.
177            *
178            * @param passwordPolicyId the primary key of the password policy
179            * @return the password policy
180            * @throws PortalException if a password policy with the primary key could not be found
181            * @throws SystemException if a system exception occurred
182            */
183            public static com.liferay.portal.model.PasswordPolicy getPasswordPolicy(
184                    long passwordPolicyId)
185                    throws com.liferay.portal.kernel.exception.PortalException,
186                            com.liferay.portal.kernel.exception.SystemException {
187                    return getService().getPasswordPolicy(passwordPolicyId);
188            }
189    
190            public static com.liferay.portal.model.PersistedModel getPersistedModel(
191                    java.io.Serializable primaryKeyObj)
192                    throws com.liferay.portal.kernel.exception.PortalException,
193                            com.liferay.portal.kernel.exception.SystemException {
194                    return getService().getPersistedModel(primaryKeyObj);
195            }
196    
197            /**
198            * Returns a range of all the password policies.
199            *
200            * <p>
201            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.PasswordPolicyModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
202            * </p>
203            *
204            * @param start the lower bound of the range of password policies
205            * @param end the upper bound of the range of password policies (not inclusive)
206            * @return the range of password policies
207            * @throws SystemException if a system exception occurred
208            */
209            public static java.util.List<com.liferay.portal.model.PasswordPolicy> getPasswordPolicies(
210                    int start, int end)
211                    throws com.liferay.portal.kernel.exception.SystemException {
212                    return getService().getPasswordPolicies(start, end);
213            }
214    
215            /**
216            * Returns the number of password policies.
217            *
218            * @return the number of password policies
219            * @throws SystemException if a system exception occurred
220            */
221            public static int getPasswordPoliciesCount()
222                    throws com.liferay.portal.kernel.exception.SystemException {
223                    return getService().getPasswordPoliciesCount();
224            }
225    
226            /**
227            * Updates the password policy in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
228            *
229            * @param passwordPolicy the password policy
230            * @return the password policy that was updated
231            * @throws SystemException if a system exception occurred
232            */
233            public static com.liferay.portal.model.PasswordPolicy updatePasswordPolicy(
234                    com.liferay.portal.model.PasswordPolicy passwordPolicy)
235                    throws com.liferay.portal.kernel.exception.SystemException {
236                    return getService().updatePasswordPolicy(passwordPolicy);
237            }
238    
239            /**
240            * Returns the Spring bean ID for this bean.
241            *
242            * @return the Spring bean ID for this bean
243            */
244            public static java.lang.String getBeanIdentifier() {
245                    return getService().getBeanIdentifier();
246            }
247    
248            /**
249            * Sets the Spring bean ID for this bean.
250            *
251            * @param beanIdentifier the Spring bean ID for this bean
252            */
253            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
254                    getService().setBeanIdentifier(beanIdentifier);
255            }
256    
257            /**
258            * @deprecated
259            */
260            public static com.liferay.portal.model.PasswordPolicy addPasswordPolicy(
261                    long userId, boolean defaultPolicy, java.lang.String name,
262                    java.lang.String description, boolean changeable,
263                    boolean changeRequired, long minAge, boolean checkSyntax,
264                    boolean allowDictionaryWords, int minAlphanumeric, int minLength,
265                    int minLowerCase, int minNumbers, int minSymbols, int minUpperCase,
266                    boolean history, int historyCount, boolean expireable, long maxAge,
267                    long warningTime, int graceLimit, boolean lockout, int maxFailure,
268                    long lockoutDuration, long resetFailureCount, long resetTicketMaxAge)
269                    throws com.liferay.portal.kernel.exception.PortalException,
270                            com.liferay.portal.kernel.exception.SystemException {
271                    return getService()
272                                       .addPasswordPolicy(userId, defaultPolicy, name, description,
273                            changeable, changeRequired, minAge, checkSyntax,
274                            allowDictionaryWords, minAlphanumeric, minLength, minLowerCase,
275                            minNumbers, minSymbols, minUpperCase, history, historyCount,
276                            expireable, maxAge, warningTime, graceLimit, lockout, maxFailure,
277                            lockoutDuration, resetFailureCount, resetTicketMaxAge);
278            }
279    
280            public static com.liferay.portal.model.PasswordPolicy addPasswordPolicy(
281                    long userId, boolean defaultPolicy, java.lang.String name,
282                    java.lang.String description, boolean changeable,
283                    boolean changeRequired, long minAge, boolean checkSyntax,
284                    boolean allowDictionaryWords, int minAlphanumeric, int minLength,
285                    int minLowerCase, int minNumbers, int minSymbols, int minUpperCase,
286                    java.lang.String regex, boolean history, int historyCount,
287                    boolean expireable, long maxAge, long warningTime, int graceLimit,
288                    boolean lockout, int maxFailure, long lockoutDuration,
289                    long resetFailureCount, long resetTicketMaxAge)
290                    throws com.liferay.portal.kernel.exception.PortalException,
291                            com.liferay.portal.kernel.exception.SystemException {
292                    return getService()
293                                       .addPasswordPolicy(userId, defaultPolicy, name, description,
294                            changeable, changeRequired, minAge, checkSyntax,
295                            allowDictionaryWords, minAlphanumeric, minLength, minLowerCase,
296                            minNumbers, minSymbols, minUpperCase, regex, history, historyCount,
297                            expireable, maxAge, warningTime, graceLimit, lockout, maxFailure,
298                            lockoutDuration, resetFailureCount, resetTicketMaxAge);
299            }
300    
301            public static void checkDefaultPasswordPolicy(long companyId)
302                    throws com.liferay.portal.kernel.exception.PortalException,
303                            com.liferay.portal.kernel.exception.SystemException {
304                    getService().checkDefaultPasswordPolicy(companyId);
305            }
306    
307            public static com.liferay.portal.model.PasswordPolicy getDefaultPasswordPolicy(
308                    long companyId)
309                    throws com.liferay.portal.kernel.exception.PortalException,
310                            com.liferay.portal.kernel.exception.SystemException {
311                    return getService().getDefaultPasswordPolicy(companyId);
312            }
313    
314            /**
315            * @deprecated
316            */
317            public static com.liferay.portal.model.PasswordPolicy getPasswordPolicy(
318                    long companyId, long organizationId, long locationId)
319                    throws com.liferay.portal.kernel.exception.PortalException,
320                            com.liferay.portal.kernel.exception.SystemException {
321                    return getService()
322                                       .getPasswordPolicy(companyId, organizationId, locationId);
323            }
324    
325            public static com.liferay.portal.model.PasswordPolicy getPasswordPolicy(
326                    long companyId, long[] organizationIds)
327                    throws com.liferay.portal.kernel.exception.PortalException,
328                            com.liferay.portal.kernel.exception.SystemException {
329                    return getService().getPasswordPolicy(companyId, organizationIds);
330            }
331    
332            public static com.liferay.portal.model.PasswordPolicy getPasswordPolicyByUserId(
333                    long userId)
334                    throws com.liferay.portal.kernel.exception.PortalException,
335                            com.liferay.portal.kernel.exception.SystemException {
336                    return getService().getPasswordPolicyByUserId(userId);
337            }
338    
339            public static java.util.List<com.liferay.portal.model.PasswordPolicy> search(
340                    long companyId, java.lang.String name, int start, int end,
341                    com.liferay.portal.kernel.util.OrderByComparator obc)
342                    throws com.liferay.portal.kernel.exception.SystemException {
343                    return getService().search(companyId, name, start, end, obc);
344            }
345    
346            public static int searchCount(long companyId, java.lang.String name)
347                    throws com.liferay.portal.kernel.exception.SystemException {
348                    return getService().searchCount(companyId, name);
349            }
350    
351            /**
352            * @deprecated
353            */
354            public static com.liferay.portal.model.PasswordPolicy updatePasswordPolicy(
355                    long passwordPolicyId, java.lang.String name,
356                    java.lang.String description, boolean changeable,
357                    boolean changeRequired, long minAge, boolean checkSyntax,
358                    boolean allowDictionaryWords, int minAlphanumeric, int minLength,
359                    int minLowerCase, int minNumbers, int minSymbols, int minUpperCase,
360                    boolean history, int historyCount, boolean expireable, long maxAge,
361                    long warningTime, int graceLimit, boolean lockout, int maxFailure,
362                    long lockoutDuration, long resetFailureCount, long resetTicketMaxAge)
363                    throws com.liferay.portal.kernel.exception.PortalException,
364                            com.liferay.portal.kernel.exception.SystemException {
365                    return getService()
366                                       .updatePasswordPolicy(passwordPolicyId, name, description,
367                            changeable, changeRequired, minAge, checkSyntax,
368                            allowDictionaryWords, minAlphanumeric, minLength, minLowerCase,
369                            minNumbers, minSymbols, minUpperCase, history, historyCount,
370                            expireable, maxAge, warningTime, graceLimit, lockout, maxFailure,
371                            lockoutDuration, resetFailureCount, resetTicketMaxAge);
372            }
373    
374            public static com.liferay.portal.model.PasswordPolicy updatePasswordPolicy(
375                    long passwordPolicyId, java.lang.String name,
376                    java.lang.String description, boolean changeable,
377                    boolean changeRequired, long minAge, boolean checkSyntax,
378                    boolean allowDictionaryWords, int minAlphanumeric, int minLength,
379                    int minLowerCase, int minNumbers, int minSymbols, int minUpperCase,
380                    java.lang.String regex, boolean history, int historyCount,
381                    boolean expireable, long maxAge, long warningTime, int graceLimit,
382                    boolean lockout, int maxFailure, long lockoutDuration,
383                    long resetFailureCount, long resetTicketMaxAge)
384                    throws com.liferay.portal.kernel.exception.PortalException,
385                            com.liferay.portal.kernel.exception.SystemException {
386                    return getService()
387                                       .updatePasswordPolicy(passwordPolicyId, name, description,
388                            changeable, changeRequired, minAge, checkSyntax,
389                            allowDictionaryWords, minAlphanumeric, minLength, minLowerCase,
390                            minNumbers, minSymbols, minUpperCase, regex, history, historyCount,
391                            expireable, maxAge, warningTime, graceLimit, lockout, maxFailure,
392                            lockoutDuration, resetFailureCount, resetTicketMaxAge);
393            }
394    
395            public static PasswordPolicyLocalService getService() {
396                    if (_service == null) {
397                            _service = (PasswordPolicyLocalService)PortalBeanLocatorUtil.locate(PasswordPolicyLocalService.class.getName());
398    
399                            ReferenceRegistry.registerReference(PasswordPolicyLocalServiceUtil.class,
400                                    "_service");
401                    }
402    
403                    return _service;
404            }
405    
406            /**
407             * @deprecated
408             */
409            public void setService(PasswordPolicyLocalService service) {
410            }
411    
412            private static PasswordPolicyLocalService _service;
413    }