1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
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.service.PasswordPolicyServiceUtil;
20  
21  import java.rmi.RemoteException;
22  
23  /**
24   * <a href="PasswordPolicyServiceSoap.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class provides a SOAP utility for the
33   * {@link com.liferay.portal.service.PasswordPolicyServiceUtil} service utility. The
34   * static methods of this class calls the same methods of the service utility.
35   * However, the signatures are different because it is difficult for SOAP to
36   * support certain types.
37   * </p>
38   *
39   * <p>
40   * ServiceBuilder follows certain rules in translating the methods. For example,
41   * if the method in the service utility returns a {@link java.util.List}, that
42   * is translated to an array of {@link com.liferay.portal.model.PasswordPolicySoap}.
43   * If the method in the service utility returns a
44   * {@link com.liferay.portal.model.PasswordPolicy}, that is translated to a
45   * {@link com.liferay.portal.model.PasswordPolicySoap}. Methods that SOAP cannot
46   * safely wire are skipped.
47   * </p>
48   *
49   * <p>
50   * The benefits of using the SOAP utility is that it is cross platform
51   * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
52   * even Perl, to call the generated services. One drawback of SOAP is that it is
53   * slow because it needs to serialize all calls into a text format (XML).
54   * </p>
55   *
56   * <p>
57   * You can see a list of services at
58   * http://localhost:8080/tunnel-web/secure/axis. Set the property
59   * <b>tunnel.servlet.hosts.allowed</b> in portal.properties to configure
60   * security.
61   * </p>
62   *
63   * <p>
64   * The SOAP utility is only generated for remote services.
65   * </p>
66   *
67   * @author    Brian Wing Shun Chan
68   * @see       PasswordPolicyServiceHttp
69   * @see       com.liferay.portal.model.PasswordPolicySoap
70   * @see       com.liferay.portal.service.PasswordPolicyServiceUtil
71   * @generated
72   */
73  public class PasswordPolicyServiceSoap {
74      public static com.liferay.portal.model.PasswordPolicySoap addPasswordPolicy(
75          java.lang.String name, java.lang.String description,
76          boolean changeable, boolean changeRequired, long minAge,
77          boolean checkSyntax, boolean allowDictionaryWords, int minAlphanumeric,
78          int minLength, int minLowerCase, int minNumbers, int minSymbols,
79          int minUpperCase, boolean history, int historyCount,
80          boolean expireable, long maxAge, long warningTime, int graceLimit,
81          boolean lockout, int maxFailure, long lockoutDuration,
82          long resetFailureCount, long resetTicketMaxAge)
83          throws RemoteException {
84          try {
85              com.liferay.portal.model.PasswordPolicy returnValue = PasswordPolicyServiceUtil.addPasswordPolicy(name,
86                      description, changeable, changeRequired, minAge,
87                      checkSyntax, allowDictionaryWords, minAlphanumeric,
88                      minLength, minLowerCase, minNumbers, minSymbols,
89                      minUpperCase, history, historyCount, expireable, maxAge,
90                      warningTime, graceLimit, lockout, maxFailure,
91                      lockoutDuration, resetFailureCount, resetTicketMaxAge);
92  
93              return com.liferay.portal.model.PasswordPolicySoap.toSoapModel(returnValue);
94          }
95          catch (Exception e) {
96              _log.error(e, e);
97  
98              throw new RemoteException(e.getMessage());
99          }
100     }
101 
102     public static void deletePasswordPolicy(long passwordPolicyId)
103         throws RemoteException {
104         try {
105             PasswordPolicyServiceUtil.deletePasswordPolicy(passwordPolicyId);
106         }
107         catch (Exception e) {
108             _log.error(e, e);
109 
110             throw new RemoteException(e.getMessage());
111         }
112     }
113 
114     public static com.liferay.portal.model.PasswordPolicySoap updatePasswordPolicy(
115         long passwordPolicyId, java.lang.String name,
116         java.lang.String description, boolean changeable,
117         boolean changeRequired, long minAge, boolean checkSyntax,
118         boolean allowDictionaryWords, int minAlphanumeric, int minLength,
119         int minLowerCase, int minNumbers, int minSymbols, int minUpperCase,
120         boolean history, int historyCount, boolean expireable, long maxAge,
121         long warningTime, int graceLimit, boolean lockout, int maxFailure,
122         long lockoutDuration, long resetFailureCount, long resetTicketMaxAge)
123         throws RemoteException {
124         try {
125             com.liferay.portal.model.PasswordPolicy returnValue = PasswordPolicyServiceUtil.updatePasswordPolicy(passwordPolicyId,
126                     name, description, changeable, changeRequired, minAge,
127                     checkSyntax, allowDictionaryWords, minAlphanumeric,
128                     minLength, minLowerCase, minNumbers, minSymbols,
129                     minUpperCase, history, historyCount, expireable, maxAge,
130                     warningTime, graceLimit, lockout, maxFailure,
131                     lockoutDuration, resetFailureCount, resetTicketMaxAge);
132 
133             return com.liferay.portal.model.PasswordPolicySoap.toSoapModel(returnValue);
134         }
135         catch (Exception e) {
136             _log.error(e, e);
137 
138             throw new RemoteException(e.getMessage());
139         }
140     }
141 
142     private static Log _log = LogFactoryUtil.getLog(PasswordPolicyServiceSoap.class);
143 }