001
014
015 package com.liferay.portal.service.http;
016
017 import com.liferay.portal.kernel.log.Log;
018 import com.liferay.portal.kernel.log.LogFactoryUtil;
019 import com.liferay.portal.kernel.util.MethodHandler;
020 import com.liferay.portal.kernel.util.MethodKey;
021 import com.liferay.portal.security.auth.HttpPrincipal;
022 import com.liferay.portal.service.PasswordPolicyServiceUtil;
023
024
054 public class PasswordPolicyServiceHttp {
055 public static com.liferay.portal.model.PasswordPolicy addPasswordPolicy(
056 HttpPrincipal httpPrincipal, java.lang.String name,
057 java.lang.String description, boolean changeable,
058 boolean changeRequired, long minAge, boolean checkSyntax,
059 boolean allowDictionaryWords, int minAlphanumeric, int minLength,
060 int minLowerCase, int minNumbers, int minSymbols, int minUpperCase,
061 boolean history, int historyCount, boolean expireable, long maxAge,
062 long warningTime, int graceLimit, boolean lockout, int maxFailure,
063 long lockoutDuration, long resetFailureCount, long resetTicketMaxAge)
064 throws com.liferay.portal.kernel.exception.PortalException,
065 com.liferay.portal.kernel.exception.SystemException {
066 try {
067 MethodKey methodKey = new MethodKey(PasswordPolicyServiceUtil.class.getName(),
068 "addPasswordPolicy", _addPasswordPolicyParameterTypes0);
069
070 MethodHandler methodHandler = new MethodHandler(methodKey, name,
071 description, changeable, changeRequired, minAge,
072 checkSyntax, allowDictionaryWords, minAlphanumeric,
073 minLength, minLowerCase, minNumbers, minSymbols,
074 minUpperCase, history, historyCount, expireable, maxAge,
075 warningTime, graceLimit, lockout, maxFailure,
076 lockoutDuration, resetFailureCount, resetTicketMaxAge);
077
078 Object returnObj = null;
079
080 try {
081 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
082 }
083 catch (Exception e) {
084 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
085 throw (com.liferay.portal.kernel.exception.PortalException)e;
086 }
087
088 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
089 throw (com.liferay.portal.kernel.exception.SystemException)e;
090 }
091
092 throw new com.liferay.portal.kernel.exception.SystemException(e);
093 }
094
095 return (com.liferay.portal.model.PasswordPolicy)returnObj;
096 }
097 catch (com.liferay.portal.kernel.exception.SystemException se) {
098 _log.error(se, se);
099
100 throw se;
101 }
102 }
103
104 public static void deletePasswordPolicy(HttpPrincipal httpPrincipal,
105 long passwordPolicyId)
106 throws com.liferay.portal.kernel.exception.PortalException,
107 com.liferay.portal.kernel.exception.SystemException {
108 try {
109 MethodKey methodKey = new MethodKey(PasswordPolicyServiceUtil.class.getName(),
110 "deletePasswordPolicy", _deletePasswordPolicyParameterTypes1);
111
112 MethodHandler methodHandler = new MethodHandler(methodKey,
113 passwordPolicyId);
114
115 try {
116 TunnelUtil.invoke(httpPrincipal, methodHandler);
117 }
118 catch (Exception e) {
119 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
120 throw (com.liferay.portal.kernel.exception.PortalException)e;
121 }
122
123 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
124 throw (com.liferay.portal.kernel.exception.SystemException)e;
125 }
126
127 throw new com.liferay.portal.kernel.exception.SystemException(e);
128 }
129 }
130 catch (com.liferay.portal.kernel.exception.SystemException se) {
131 _log.error(se, se);
132
133 throw se;
134 }
135 }
136
137 public static com.liferay.portal.model.PasswordPolicy updatePasswordPolicy(
138 HttpPrincipal httpPrincipal, long passwordPolicyId,
139 java.lang.String name, java.lang.String description,
140 boolean changeable, boolean changeRequired, long minAge,
141 boolean checkSyntax, boolean allowDictionaryWords, int minAlphanumeric,
142 int minLength, int minLowerCase, int minNumbers, int minSymbols,
143 int minUpperCase, boolean history, int historyCount,
144 boolean expireable, long maxAge, long warningTime, int graceLimit,
145 boolean lockout, int maxFailure, long lockoutDuration,
146 long resetFailureCount, long resetTicketMaxAge)
147 throws com.liferay.portal.kernel.exception.PortalException,
148 com.liferay.portal.kernel.exception.SystemException {
149 try {
150 MethodKey methodKey = new MethodKey(PasswordPolicyServiceUtil.class.getName(),
151 "updatePasswordPolicy", _updatePasswordPolicyParameterTypes2);
152
153 MethodHandler methodHandler = new MethodHandler(methodKey,
154 passwordPolicyId, name, description, changeable,
155 changeRequired, minAge, checkSyntax, allowDictionaryWords,
156 minAlphanumeric, minLength, minLowerCase, minNumbers,
157 minSymbols, minUpperCase, history, historyCount,
158 expireable, maxAge, warningTime, graceLimit, lockout,
159 maxFailure, lockoutDuration, resetFailureCount,
160 resetTicketMaxAge);
161
162 Object returnObj = null;
163
164 try {
165 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
166 }
167 catch (Exception e) {
168 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
169 throw (com.liferay.portal.kernel.exception.PortalException)e;
170 }
171
172 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
173 throw (com.liferay.portal.kernel.exception.SystemException)e;
174 }
175
176 throw new com.liferay.portal.kernel.exception.SystemException(e);
177 }
178
179 return (com.liferay.portal.model.PasswordPolicy)returnObj;
180 }
181 catch (com.liferay.portal.kernel.exception.SystemException se) {
182 _log.error(se, se);
183
184 throw se;
185 }
186 }
187
188 private static Log _log = LogFactoryUtil.getLog(PasswordPolicyServiceHttp.class);
189 private static final Class<?>[] _addPasswordPolicyParameterTypes0 = new Class[] {
190 java.lang.String.class, java.lang.String.class, boolean.class,
191 boolean.class, long.class, boolean.class, boolean.class, int.class,
192 int.class, int.class, int.class, int.class, int.class, boolean.class,
193 int.class, boolean.class, long.class, long.class, int.class,
194 boolean.class, int.class, long.class, long.class, long.class
195 };
196 private static final Class<?>[] _deletePasswordPolicyParameterTypes1 = new Class[] {
197 long.class
198 };
199 private static final Class<?>[] _updatePasswordPolicyParameterTypes2 = new Class[] {
200 long.class, java.lang.String.class, java.lang.String.class,
201 boolean.class, boolean.class, long.class, boolean.class,
202 boolean.class, int.class, int.class, int.class, int.class, int.class,
203 int.class, boolean.class, int.class, boolean.class, long.class,
204 long.class, int.class, boolean.class, int.class, long.class,
205 long.class, long.class
206 };
207 }