001    /**
002     * Copyright (c) 2000-2013 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for PasswordPolicy. This utility wraps
024     * {@link com.liferay.portal.service.impl.PasswordPolicyLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see PasswordPolicyLocalService
032     * @see com.liferay.portal.service.base.PasswordPolicyLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.PasswordPolicyLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class PasswordPolicyLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.PasswordPolicyLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the password policy to the database. Also notifies the appropriate model listeners.
046            *
047            * @param passwordPolicy the password policy
048            * @return the password policy that was added
049            * @throws SystemException if a system exception occurred
050            */
051            public static com.liferay.portal.model.PasswordPolicy addPasswordPolicy(
052                    com.liferay.portal.model.PasswordPolicy passwordPolicy)
053                    throws com.liferay.portal.kernel.exception.SystemException {
054                    return getService().addPasswordPolicy(passwordPolicy);
055            }
056    
057            /**
058            * Creates a new password policy with the primary key. Does not add the password policy to the database.
059            *
060            * @param passwordPolicyId the primary key for the new password policy
061            * @return the new password policy
062            */
063            public static com.liferay.portal.model.PasswordPolicy createPasswordPolicy(
064                    long passwordPolicyId) {
065                    return getService().createPasswordPolicy(passwordPolicyId);
066            }
067    
068            /**
069            * Deletes the password policy with the primary key from the database. Also notifies the appropriate model listeners.
070            *
071            * @param passwordPolicyId the primary key of the password policy
072            * @return the password policy that was removed
073            * @throws PortalException if a password policy with the primary key could not be found
074            * @throws SystemException if a system exception occurred
075            */
076            public static com.liferay.portal.model.PasswordPolicy deletePasswordPolicy(
077                    long passwordPolicyId)
078                    throws com.liferay.portal.kernel.exception.PortalException,
079                            com.liferay.portal.kernel.exception.SystemException {
080                    return getService().deletePasswordPolicy(passwordPolicyId);
081            }
082    
083            /**
084            * Deletes the password policy from the database. Also notifies the appropriate model listeners.
085            *
086            * @param passwordPolicy the password policy
087            * @return the password policy that was removed
088            * @throws PortalException
089            * @throws SystemException if a system exception occurred
090            */
091            public static com.liferay.portal.model.PasswordPolicy deletePasswordPolicy(
092                    com.liferay.portal.model.PasswordPolicy passwordPolicy)
093                    throws com.liferay.portal.kernel.exception.PortalException,
094                            com.liferay.portal.kernel.exception.SystemException {
095                    return getService().deletePasswordPolicy(passwordPolicy);
096            }
097    
098            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
099                    return getService().dynamicQuery();
100            }
101    
102            /**
103            * Performs a dynamic query on the database and returns the matching rows.
104            *
105            * @param dynamicQuery the dynamic query
106            * @return the matching rows
107            * @throws SystemException if a system exception occurred
108            */
109            @SuppressWarnings("rawtypes")
110            public static java.util.List dynamicQuery(
111                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
112                    throws com.liferay.portal.kernel.exception.SystemException {
113                    return getService().dynamicQuery(dynamicQuery);
114            }
115    
116            /**
117            * Performs a dynamic query on the database and returns a range of the matching rows.
118            *
119            * <p>
120            * 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.
121            * </p>
122            *
123            * @param dynamicQuery the dynamic query
124            * @param start the lower bound of the range of model instances
125            * @param end the upper bound of the range of model instances (not inclusive)
126            * @return the range of matching rows
127            * @throws SystemException if a system exception occurred
128            */
129            @SuppressWarnings("rawtypes")
130            public static java.util.List dynamicQuery(
131                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
132                    int end) throws com.liferay.portal.kernel.exception.SystemException {
133                    return getService().dynamicQuery(dynamicQuery, start, end);
134            }
135    
136            /**
137            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
138            *
139            * <p>
140            * 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.
141            * </p>
142            *
143            * @param dynamicQuery the dynamic query
144            * @param start the lower bound of the range of model instances
145            * @param end the upper bound of the range of model instances (not inclusive)
146            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
147            * @return the ordered range of matching rows
148            * @throws SystemException if a system exception occurred
149            */
150            @SuppressWarnings("rawtypes")
151            public static java.util.List dynamicQuery(
152                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
153                    int end,
154                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
155                    throws com.liferay.portal.kernel.exception.SystemException {
156                    return getService()
157                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
158            }
159    
160            /**
161            * Returns the number of rows that match the dynamic query.
162            *
163            * @param dynamicQuery the dynamic query
164            * @return the number of rows that match the dynamic query
165            * @throws SystemException if a system exception occurred
166            */
167            public static long dynamicQueryCount(
168                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
169                    throws com.liferay.portal.kernel.exception.SystemException {
170                    return getService().dynamicQueryCount(dynamicQuery);
171            }
172    
173            /**
174            * Returns the number of rows that match the dynamic query.
175            *
176            * @param dynamicQuery the dynamic query
177            * @param projection the projection to apply to the query
178            * @return the number of rows that match the dynamic query
179            * @throws SystemException if a system exception occurred
180            */
181            public static long dynamicQueryCount(
182                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
183                    com.liferay.portal.kernel.dao.orm.Projection projection)
184                    throws com.liferay.portal.kernel.exception.SystemException {
185                    return getService().dynamicQueryCount(dynamicQuery, projection);
186            }
187    
188            public static com.liferay.portal.model.PasswordPolicy fetchPasswordPolicy(
189                    long passwordPolicyId)
190                    throws com.liferay.portal.kernel.exception.SystemException {
191                    return getService().fetchPasswordPolicy(passwordPolicyId);
192            }
193    
194            /**
195            * Returns the password policy with the matching UUID and company.
196            *
197            * @param uuid the password policy's UUID
198            * @param companyId the primary key of the company
199            * @return the matching password policy, or <code>null</code> if a matching password policy could not be found
200            * @throws SystemException if a system exception occurred
201            */
202            public static com.liferay.portal.model.PasswordPolicy fetchPasswordPolicyByUuidAndCompanyId(
203                    java.lang.String uuid, long companyId)
204                    throws com.liferay.portal.kernel.exception.SystemException {
205                    return getService()
206                                       .fetchPasswordPolicyByUuidAndCompanyId(uuid, companyId);
207            }
208    
209            /**
210            * Returns the password policy with the primary key.
211            *
212            * @param passwordPolicyId the primary key of the password policy
213            * @return the password policy
214            * @throws PortalException if a password policy with the primary key could not be found
215            * @throws SystemException if a system exception occurred
216            */
217            public static com.liferay.portal.model.PasswordPolicy getPasswordPolicy(
218                    long passwordPolicyId)
219                    throws com.liferay.portal.kernel.exception.PortalException,
220                            com.liferay.portal.kernel.exception.SystemException {
221                    return getService().getPasswordPolicy(passwordPolicyId);
222            }
223    
224            public static com.liferay.portal.model.PersistedModel getPersistedModel(
225                    java.io.Serializable primaryKeyObj)
226                    throws com.liferay.portal.kernel.exception.PortalException,
227                            com.liferay.portal.kernel.exception.SystemException {
228                    return getService().getPersistedModel(primaryKeyObj);
229            }
230    
231            /**
232            * Returns the password policy with the matching UUID and company.
233            *
234            * @param uuid the password policy's UUID
235            * @param companyId the primary key of the company
236            * @return the matching password policy
237            * @throws PortalException if a matching password policy could not be found
238            * @throws SystemException if a system exception occurred
239            */
240            public static com.liferay.portal.model.PasswordPolicy getPasswordPolicyByUuidAndCompanyId(
241                    java.lang.String uuid, long companyId)
242                    throws com.liferay.portal.kernel.exception.PortalException,
243                            com.liferay.portal.kernel.exception.SystemException {
244                    return getService().getPasswordPolicyByUuidAndCompanyId(uuid, companyId);
245            }
246    
247            /**
248            * Returns a range of all the password policies.
249            *
250            * <p>
251            * 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.
252            * </p>
253            *
254            * @param start the lower bound of the range of password policies
255            * @param end the upper bound of the range of password policies (not inclusive)
256            * @return the range of password policies
257            * @throws SystemException if a system exception occurred
258            */
259            public static java.util.List<com.liferay.portal.model.PasswordPolicy> getPasswordPolicies(
260                    int start, int end)
261                    throws com.liferay.portal.kernel.exception.SystemException {
262                    return getService().getPasswordPolicies(start, end);
263            }
264    
265            /**
266            * Returns the number of password policies.
267            *
268            * @return the number of password policies
269            * @throws SystemException if a system exception occurred
270            */
271            public static int getPasswordPoliciesCount()
272                    throws com.liferay.portal.kernel.exception.SystemException {
273                    return getService().getPasswordPoliciesCount();
274            }
275    
276            /**
277            * Updates the password policy in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
278            *
279            * @param passwordPolicy the password policy
280            * @return the password policy that was updated
281            * @throws SystemException if a system exception occurred
282            */
283            public static com.liferay.portal.model.PasswordPolicy updatePasswordPolicy(
284                    com.liferay.portal.model.PasswordPolicy passwordPolicy)
285                    throws com.liferay.portal.kernel.exception.SystemException {
286                    return getService().updatePasswordPolicy(passwordPolicy);
287            }
288    
289            /**
290            * Returns the Spring bean ID for this bean.
291            *
292            * @return the Spring bean ID for this bean
293            */
294            public static java.lang.String getBeanIdentifier() {
295                    return getService().getBeanIdentifier();
296            }
297    
298            /**
299            * Sets the Spring bean ID for this bean.
300            *
301            * @param beanIdentifier the Spring bean ID for this bean
302            */
303            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
304                    getService().setBeanIdentifier(beanIdentifier);
305            }
306    
307            /**
308            * @deprecated As of 6.2.0, replaced by {@link #addPasswordPolicy(long,
309            boolean, String, String, boolean, boolean, long, boolean,
310            boolean, int, int, int, int, int, int, String, boolean, int,
311            boolean, long, long, int, boolean, int, long, long, long,
312            ServiceContext)}
313            */
314            public static com.liferay.portal.model.PasswordPolicy addPasswordPolicy(
315                    long userId, boolean defaultPolicy, java.lang.String name,
316                    java.lang.String description, boolean changeable,
317                    boolean changeRequired, long minAge, boolean checkSyntax,
318                    boolean allowDictionaryWords, int minAlphanumeric, int minLength,
319                    int minLowerCase, int minNumbers, int minSymbols, int minUpperCase,
320                    boolean history, int historyCount, boolean expireable, long maxAge,
321                    long warningTime, int graceLimit, boolean lockout, int maxFailure,
322                    long lockoutDuration, long resetFailureCount, long resetTicketMaxAge)
323                    throws com.liferay.portal.kernel.exception.PortalException,
324                            com.liferay.portal.kernel.exception.SystemException {
325                    return getService()
326                                       .addPasswordPolicy(userId, defaultPolicy, name, description,
327                            changeable, changeRequired, minAge, checkSyntax,
328                            allowDictionaryWords, minAlphanumeric, minLength, minLowerCase,
329                            minNumbers, minSymbols, minUpperCase, history, historyCount,
330                            expireable, maxAge, warningTime, graceLimit, lockout, maxFailure,
331                            lockoutDuration, resetFailureCount, resetTicketMaxAge);
332            }
333    
334            public static com.liferay.portal.model.PasswordPolicy addPasswordPolicy(
335                    long userId, boolean defaultPolicy, java.lang.String name,
336                    java.lang.String description, boolean changeable,
337                    boolean changeRequired, long minAge, boolean checkSyntax,
338                    boolean allowDictionaryWords, int minAlphanumeric, int minLength,
339                    int minLowerCase, int minNumbers, int minSymbols, int minUpperCase,
340                    java.lang.String regex, boolean history, int historyCount,
341                    boolean expireable, long maxAge, long warningTime, int graceLimit,
342                    boolean lockout, int maxFailure, long lockoutDuration,
343                    long resetFailureCount, long resetTicketMaxAge,
344                    com.liferay.portal.service.ServiceContext serviceContext)
345                    throws com.liferay.portal.kernel.exception.PortalException,
346                            com.liferay.portal.kernel.exception.SystemException {
347                    return getService()
348                                       .addPasswordPolicy(userId, defaultPolicy, name, description,
349                            changeable, changeRequired, minAge, checkSyntax,
350                            allowDictionaryWords, minAlphanumeric, minLength, minLowerCase,
351                            minNumbers, minSymbols, minUpperCase, regex, history, historyCount,
352                            expireable, maxAge, warningTime, graceLimit, lockout, maxFailure,
353                            lockoutDuration, resetFailureCount, resetTicketMaxAge,
354                            serviceContext);
355            }
356    
357            public static void checkDefaultPasswordPolicy(long companyId)
358                    throws com.liferay.portal.kernel.exception.PortalException,
359                            com.liferay.portal.kernel.exception.SystemException {
360                    getService().checkDefaultPasswordPolicy(companyId);
361            }
362    
363            public static void deleteNondefaultPasswordPolicies(long companyId)
364                    throws com.liferay.portal.kernel.exception.PortalException,
365                            com.liferay.portal.kernel.exception.SystemException {
366                    getService().deleteNondefaultPasswordPolicies(companyId);
367            }
368    
369            public static com.liferay.portal.model.PasswordPolicy fetchPasswordPolicy(
370                    long companyId, java.lang.String name)
371                    throws com.liferay.portal.kernel.exception.SystemException {
372                    return getService().fetchPasswordPolicy(companyId, name);
373            }
374    
375            public static com.liferay.portal.model.PasswordPolicy getDefaultPasswordPolicy(
376                    long companyId)
377                    throws com.liferay.portal.kernel.exception.PortalException,
378                            com.liferay.portal.kernel.exception.SystemException {
379                    return getService().getDefaultPasswordPolicy(companyId);
380            }
381    
382            /**
383            * @deprecated As of 6.1.0
384            */
385            public static com.liferay.portal.model.PasswordPolicy getPasswordPolicy(
386                    long companyId, long organizationId, long locationId)
387                    throws com.liferay.portal.kernel.exception.PortalException,
388                            com.liferay.portal.kernel.exception.SystemException {
389                    return getService()
390                                       .getPasswordPolicy(companyId, organizationId, locationId);
391            }
392    
393            public static com.liferay.portal.model.PasswordPolicy getPasswordPolicy(
394                    long companyId, long[] organizationIds)
395                    throws com.liferay.portal.kernel.exception.PortalException,
396                            com.liferay.portal.kernel.exception.SystemException {
397                    return getService().getPasswordPolicy(companyId, organizationIds);
398            }
399    
400            public static com.liferay.portal.model.PasswordPolicy getPasswordPolicyByUserId(
401                    long userId)
402                    throws com.liferay.portal.kernel.exception.PortalException,
403                            com.liferay.portal.kernel.exception.SystemException {
404                    return getService().getPasswordPolicyByUserId(userId);
405            }
406    
407            public static java.util.List<com.liferay.portal.model.PasswordPolicy> search(
408                    long companyId, java.lang.String name, int start, int end,
409                    com.liferay.portal.kernel.util.OrderByComparator obc)
410                    throws com.liferay.portal.kernel.exception.SystemException {
411                    return getService().search(companyId, name, start, end, obc);
412            }
413    
414            public static int searchCount(long companyId, java.lang.String name)
415                    throws com.liferay.portal.kernel.exception.SystemException {
416                    return getService().searchCount(companyId, name);
417            }
418    
419            /**
420            * @deprecated As of 6.2.0, replaced by {@link #updatePasswordPolicy(long,
421            String, String, boolean, boolean, long, boolean, boolean,
422            int, int, int, int, int, int, String, boolean, int, boolean,
423            long, long, int, boolean, int, long, long, long,
424            ServiceContext)}
425            */
426            public static com.liferay.portal.model.PasswordPolicy updatePasswordPolicy(
427                    long passwordPolicyId, java.lang.String name,
428                    java.lang.String description, boolean changeable,
429                    boolean changeRequired, long minAge, boolean checkSyntax,
430                    boolean allowDictionaryWords, int minAlphanumeric, int minLength,
431                    int minLowerCase, int minNumbers, int minSymbols, int minUpperCase,
432                    boolean history, int historyCount, boolean expireable, long maxAge,
433                    long warningTime, int graceLimit, boolean lockout, int maxFailure,
434                    long lockoutDuration, long resetFailureCount, long resetTicketMaxAge)
435                    throws com.liferay.portal.kernel.exception.PortalException,
436                            com.liferay.portal.kernel.exception.SystemException {
437                    return getService()
438                                       .updatePasswordPolicy(passwordPolicyId, name, description,
439                            changeable, changeRequired, minAge, checkSyntax,
440                            allowDictionaryWords, minAlphanumeric, minLength, minLowerCase,
441                            minNumbers, minSymbols, minUpperCase, history, historyCount,
442                            expireable, maxAge, warningTime, graceLimit, lockout, maxFailure,
443                            lockoutDuration, resetFailureCount, resetTicketMaxAge);
444            }
445    
446            public static com.liferay.portal.model.PasswordPolicy updatePasswordPolicy(
447                    long passwordPolicyId, java.lang.String name,
448                    java.lang.String description, boolean changeable,
449                    boolean changeRequired, long minAge, boolean checkSyntax,
450                    boolean allowDictionaryWords, int minAlphanumeric, int minLength,
451                    int minLowerCase, int minNumbers, int minSymbols, int minUpperCase,
452                    java.lang.String regex, boolean history, int historyCount,
453                    boolean expireable, long maxAge, long warningTime, int graceLimit,
454                    boolean lockout, int maxFailure, long lockoutDuration,
455                    long resetFailureCount, long resetTicketMaxAge,
456                    com.liferay.portal.service.ServiceContext serviceContext)
457                    throws com.liferay.portal.kernel.exception.PortalException,
458                            com.liferay.portal.kernel.exception.SystemException {
459                    return getService()
460                                       .updatePasswordPolicy(passwordPolicyId, name, description,
461                            changeable, changeRequired, minAge, checkSyntax,
462                            allowDictionaryWords, minAlphanumeric, minLength, minLowerCase,
463                            minNumbers, minSymbols, minUpperCase, regex, history, historyCount,
464                            expireable, maxAge, warningTime, graceLimit, lockout, maxFailure,
465                            lockoutDuration, resetFailureCount, resetTicketMaxAge,
466                            serviceContext);
467            }
468    
469            public static PasswordPolicyLocalService getService() {
470                    if (_service == null) {
471                            _service = (PasswordPolicyLocalService)PortalBeanLocatorUtil.locate(PasswordPolicyLocalService.class.getName());
472    
473                            ReferenceRegistry.registerReference(PasswordPolicyLocalServiceUtil.class,
474                                    "_service");
475                    }
476    
477                    return _service;
478            }
479    
480            /**
481             * @deprecated As of 6.2.0
482             */
483            public void setService(PasswordPolicyLocalService service) {
484            }
485    
486            private static PasswordPolicyLocalService _service;
487    }