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", java.lang.String.class,
069 java.lang.String.class, boolean.class, boolean.class,
070 long.class, boolean.class, boolean.class, int.class,
071 int.class, int.class, int.class, int.class, int.class,
072 boolean.class, int.class, boolean.class, long.class,
073 long.class, int.class, boolean.class, int.class,
074 long.class, long.class, long.class);
075
076 MethodHandler methodHandler = new MethodHandler(methodKey, name,
077 description, changeable, changeRequired, minAge,
078 checkSyntax, allowDictionaryWords, minAlphanumeric,
079 minLength, minLowerCase, minNumbers, minSymbols,
080 minUpperCase, history, historyCount, expireable, maxAge,
081 warningTime, graceLimit, lockout, maxFailure,
082 lockoutDuration, resetFailureCount, resetTicketMaxAge);
083
084 Object returnObj = null;
085
086 try {
087 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
088 }
089 catch (Exception e) {
090 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
091 throw (com.liferay.portal.kernel.exception.PortalException)e;
092 }
093
094 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
095 throw (com.liferay.portal.kernel.exception.SystemException)e;
096 }
097
098 throw new com.liferay.portal.kernel.exception.SystemException(e);
099 }
100
101 return (com.liferay.portal.model.PasswordPolicy)returnObj;
102 }
103 catch (com.liferay.portal.kernel.exception.SystemException se) {
104 _log.error(se, se);
105
106 throw se;
107 }
108 }
109
110 public static void deletePasswordPolicy(HttpPrincipal httpPrincipal,
111 long passwordPolicyId)
112 throws com.liferay.portal.kernel.exception.PortalException,
113 com.liferay.portal.kernel.exception.SystemException {
114 try {
115 MethodKey methodKey = new MethodKey(PasswordPolicyServiceUtil.class.getName(),
116 "deletePasswordPolicy", long.class);
117
118 MethodHandler methodHandler = new MethodHandler(methodKey,
119 passwordPolicyId);
120
121 try {
122 TunnelUtil.invoke(httpPrincipal, methodHandler);
123 }
124 catch (Exception e) {
125 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
126 throw (com.liferay.portal.kernel.exception.PortalException)e;
127 }
128
129 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
130 throw (com.liferay.portal.kernel.exception.SystemException)e;
131 }
132
133 throw new com.liferay.portal.kernel.exception.SystemException(e);
134 }
135 }
136 catch (com.liferay.portal.kernel.exception.SystemException se) {
137 _log.error(se, se);
138
139 throw se;
140 }
141 }
142
143 public static com.liferay.portal.model.PasswordPolicy updatePasswordPolicy(
144 HttpPrincipal httpPrincipal, long passwordPolicyId,
145 java.lang.String name, java.lang.String description,
146 boolean changeable, boolean changeRequired, long minAge,
147 boolean checkSyntax, boolean allowDictionaryWords, int minAlphanumeric,
148 int minLength, int minLowerCase, int minNumbers, int minSymbols,
149 int minUpperCase, boolean history, int historyCount,
150 boolean expireable, long maxAge, long warningTime, int graceLimit,
151 boolean lockout, int maxFailure, long lockoutDuration,
152 long resetFailureCount, long resetTicketMaxAge)
153 throws com.liferay.portal.kernel.exception.PortalException,
154 com.liferay.portal.kernel.exception.SystemException {
155 try {
156 MethodKey methodKey = new MethodKey(PasswordPolicyServiceUtil.class.getName(),
157 "updatePasswordPolicy", long.class, java.lang.String.class,
158 java.lang.String.class, boolean.class, boolean.class,
159 long.class, boolean.class, boolean.class, int.class,
160 int.class, int.class, int.class, int.class, int.class,
161 boolean.class, int.class, boolean.class, long.class,
162 long.class, int.class, boolean.class, int.class,
163 long.class, long.class, long.class);
164
165 MethodHandler methodHandler = new MethodHandler(methodKey,
166 passwordPolicyId, name, description, changeable,
167 changeRequired, minAge, checkSyntax, allowDictionaryWords,
168 minAlphanumeric, minLength, minLowerCase, minNumbers,
169 minSymbols, minUpperCase, history, historyCount,
170 expireable, maxAge, warningTime, graceLimit, lockout,
171 maxFailure, lockoutDuration, resetFailureCount,
172 resetTicketMaxAge);
173
174 Object returnObj = null;
175
176 try {
177 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
178 }
179 catch (Exception e) {
180 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
181 throw (com.liferay.portal.kernel.exception.PortalException)e;
182 }
183
184 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
185 throw (com.liferay.portal.kernel.exception.SystemException)e;
186 }
187
188 throw new com.liferay.portal.kernel.exception.SystemException(e);
189 }
190
191 return (com.liferay.portal.model.PasswordPolicy)returnObj;
192 }
193 catch (com.liferay.portal.kernel.exception.SystemException se) {
194 _log.error(se, se);
195
196 throw se;
197 }
198 }
199
200 private static Log _log = LogFactoryUtil.getLog(PasswordPolicyServiceHttp.class);
201 }