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