1
14
15 package com.liferay.portal.service.http;
16
17 import com.liferay.portal.kernel.log.Log;
18 import com.liferay.portal.kernel.log.LogFactoryUtil;
19 import com.liferay.portal.kernel.util.MethodHandler;
20 import com.liferay.portal.kernel.util.MethodKey;
21 import com.liferay.portal.security.auth.HttpPrincipal;
22 import com.liferay.portal.service.PasswordPolicyServiceUtil;
23
24
61 public class PasswordPolicyServiceHttp {
62 public static com.liferay.portal.model.PasswordPolicy addPasswordPolicy(
63 HttpPrincipal httpPrincipal, java.lang.String name,
64 java.lang.String description, boolean changeable,
65 boolean changeRequired, long minAge, boolean checkSyntax,
66 boolean allowDictionaryWords, int minLength, boolean history,
67 int historyCount, boolean expireable, long maxAge, long warningTime,
68 int graceLimit, boolean lockout, int maxFailure, long lockoutDuration,
69 long resetFailureCount)
70 throws com.liferay.portal.PortalException,
71 com.liferay.portal.SystemException {
72 try {
73 MethodKey methodKey = new MethodKey(PasswordPolicyServiceUtil.class.getName(),
74 "addPasswordPolicy", _addPasswordPolicyParameterTypes0);
75
76 MethodHandler methodHandler = new MethodHandler(methodKey, name,
77 description, changeable, changeRequired, minAge,
78 checkSyntax, allowDictionaryWords, minLength, history,
79 historyCount, expireable, maxAge, warningTime, graceLimit,
80 lockout, maxFailure, lockoutDuration, resetFailureCount);
81
82 Object returnObj = null;
83
84 try {
85 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
86 }
87 catch (Exception e) {
88 if (e instanceof com.liferay.portal.PortalException) {
89 throw (com.liferay.portal.PortalException)e;
90 }
91
92 if (e instanceof com.liferay.portal.SystemException) {
93 throw (com.liferay.portal.SystemException)e;
94 }
95
96 throw new com.liferay.portal.SystemException(e);
97 }
98
99 return (com.liferay.portal.model.PasswordPolicy)returnObj;
100 }
101 catch (com.liferay.portal.SystemException se) {
102 _log.error(se, se);
103
104 throw se;
105 }
106 }
107
108 public static void deletePasswordPolicy(HttpPrincipal httpPrincipal,
109 long passwordPolicyId)
110 throws com.liferay.portal.PortalException,
111 com.liferay.portal.SystemException {
112 try {
113 MethodKey methodKey = new MethodKey(PasswordPolicyServiceUtil.class.getName(),
114 "deletePasswordPolicy", _deletePasswordPolicyParameterTypes1);
115
116 MethodHandler methodHandler = new MethodHandler(methodKey,
117 passwordPolicyId);
118
119 try {
120 TunnelUtil.invoke(httpPrincipal, methodHandler);
121 }
122 catch (Exception e) {
123 if (e instanceof com.liferay.portal.PortalException) {
124 throw (com.liferay.portal.PortalException)e;
125 }
126
127 if (e instanceof com.liferay.portal.SystemException) {
128 throw (com.liferay.portal.SystemException)e;
129 }
130
131 throw new com.liferay.portal.SystemException(e);
132 }
133 }
134 catch (com.liferay.portal.SystemException se) {
135 _log.error(se, se);
136
137 throw se;
138 }
139 }
140
141 public static com.liferay.portal.model.PasswordPolicy updatePasswordPolicy(
142 HttpPrincipal httpPrincipal, long passwordPolicyId,
143 java.lang.String name, java.lang.String description,
144 boolean changeable, boolean changeRequired, long minAge,
145 boolean checkSyntax, boolean allowDictionaryWords, int minLength,
146 boolean history, int historyCount, boolean expireable, long maxAge,
147 long warningTime, int graceLimit, boolean lockout, int maxFailure,
148 long lockoutDuration, long resetFailureCount)
149 throws com.liferay.portal.PortalException,
150 com.liferay.portal.SystemException {
151 try {
152 MethodKey methodKey = new MethodKey(PasswordPolicyServiceUtil.class.getName(),
153 "updatePasswordPolicy", _updatePasswordPolicyParameterTypes2);
154
155 MethodHandler methodHandler = new MethodHandler(methodKey,
156 passwordPolicyId, name, description, changeable,
157 changeRequired, minAge, checkSyntax, allowDictionaryWords,
158 minLength, history, historyCount, expireable, maxAge,
159 warningTime, graceLimit, lockout, maxFailure,
160 lockoutDuration, resetFailureCount);
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.PortalException) {
169 throw (com.liferay.portal.PortalException)e;
170 }
171
172 if (e instanceof com.liferay.portal.SystemException) {
173 throw (com.liferay.portal.SystemException)e;
174 }
175
176 throw new com.liferay.portal.SystemException(e);
177 }
178
179 return (com.liferay.portal.model.PasswordPolicy)returnObj;
180 }
181 catch (com.liferay.portal.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 boolean.class, int.class, boolean.class, long.class, long.class,
193 int.class, boolean.class, int.class, long.class, long.class
194 };
195 private static final Class<?>[] _deletePasswordPolicyParameterTypes1 = new Class[] {
196 long.class
197 };
198 private static final Class<?>[] _updatePasswordPolicyParameterTypes2 = new Class[] {
199 long.class, java.lang.String.class, java.lang.String.class,
200 boolean.class, boolean.class, long.class, boolean.class,
201 boolean.class, int.class, boolean.class, int.class, boolean.class,
202 long.class, long.class, int.class, boolean.class, int.class,
203 long.class, long.class
204 };
205 }