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.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the password policy remote service. This utility wraps {@link com.liferay.portal.service.impl.PasswordPolicyServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
023     *
024     * <p>
025     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see PasswordPolicyService
030     * @see com.liferay.portal.service.base.PasswordPolicyServiceBaseImpl
031     * @see com.liferay.portal.service.impl.PasswordPolicyServiceImpl
032     * @generated
033     */
034    public class PasswordPolicyServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.PasswordPolicyServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portal.model.PasswordPolicy addPasswordPolicy(
041                    java.lang.String name, java.lang.String description,
042                    boolean changeable, boolean changeRequired, long minAge,
043                    boolean checkSyntax, boolean allowDictionaryWords, int minAlphanumeric,
044                    int minLength, int minLowerCase, int minNumbers, int minSymbols,
045                    int minUpperCase, boolean history, int historyCount,
046                    boolean expireable, long maxAge, long warningTime, int graceLimit,
047                    boolean lockout, int maxFailure, long lockoutDuration,
048                    long resetFailureCount, long resetTicketMaxAge)
049                    throws com.liferay.portal.kernel.exception.PortalException,
050                            com.liferay.portal.kernel.exception.SystemException {
051                    return getService()
052                                       .addPasswordPolicy(name, description, changeable,
053                            changeRequired, minAge, checkSyntax, allowDictionaryWords,
054                            minAlphanumeric, minLength, minLowerCase, minNumbers, minSymbols,
055                            minUpperCase, history, historyCount, expireable, maxAge,
056                            warningTime, graceLimit, lockout, maxFailure, lockoutDuration,
057                            resetFailureCount, resetTicketMaxAge);
058            }
059    
060            public static void deletePasswordPolicy(long passwordPolicyId)
061                    throws com.liferay.portal.kernel.exception.PortalException,
062                            com.liferay.portal.kernel.exception.SystemException {
063                    getService().deletePasswordPolicy(passwordPolicyId);
064            }
065    
066            public static com.liferay.portal.model.PasswordPolicy updatePasswordPolicy(
067                    long passwordPolicyId, java.lang.String name,
068                    java.lang.String description, boolean changeable,
069                    boolean changeRequired, long minAge, boolean checkSyntax,
070                    boolean allowDictionaryWords, int minAlphanumeric, int minLength,
071                    int minLowerCase, int minNumbers, int minSymbols, int minUpperCase,
072                    boolean history, int historyCount, boolean expireable, long maxAge,
073                    long warningTime, int graceLimit, boolean lockout, int maxFailure,
074                    long lockoutDuration, long resetFailureCount, long resetTicketMaxAge)
075                    throws com.liferay.portal.kernel.exception.PortalException,
076                            com.liferay.portal.kernel.exception.SystemException {
077                    return getService()
078                                       .updatePasswordPolicy(passwordPolicyId, name, description,
079                            changeable, changeRequired, minAge, checkSyntax,
080                            allowDictionaryWords, minAlphanumeric, minLength, minLowerCase,
081                            minNumbers, minSymbols, minUpperCase, history, historyCount,
082                            expireable, maxAge, warningTime, graceLimit, lockout, maxFailure,
083                            lockoutDuration, resetFailureCount, resetTicketMaxAge);
084            }
085    
086            public static PasswordPolicyService getService() {
087                    if (_service == null) {
088                            _service = (PasswordPolicyService)PortalBeanLocatorUtil.locate(PasswordPolicyService.class.getName());
089    
090                            ReferenceRegistry.registerReference(PasswordPolicyServiceUtil.class,
091                                    "_service");
092                            MethodCache.remove(PasswordPolicyService.class);
093                    }
094    
095                    return _service;
096            }
097    
098            public void setService(PasswordPolicyService service) {
099                    MethodCache.remove(PasswordPolicyService.class);
100    
101                    _service = service;
102    
103                    ReferenceRegistry.registerReference(PasswordPolicyServiceUtil.class,
104                            "_service");
105                    MethodCache.remove(PasswordPolicyService.class);
106            }
107    
108            private static PasswordPolicyService _service;
109    }