001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portal.service.http;
022:
023: import com.liferay.portal.kernel.log.Log;
024: import com.liferay.portal.kernel.log.LogFactoryUtil;
025: import com.liferay.portal.service.PasswordPolicyServiceUtil;
026:
027: import java.rmi.RemoteException;
028:
029: /**
030: * <a href="PasswordPolicyServiceSoap.java.html"><b><i>View Source</i></b></a>
031: *
032: * <p>
033: * ServiceBuilder generated this class. Modifications in this class will be
034: * overwritten the next time is generated.
035: * </p>
036: *
037: * <p>
038: * This class provides a SOAP utility for the
039: * <code>com.liferay.portal.service.PasswordPolicyServiceUtil</code> service
040: * utility. The static methods of this class calls the same methods of the
041: * service utility. However, the signatures are different because it is
042: * difficult for SOAP to support certain types.
043: * </p>
044: *
045: * <p>
046: * ServiceBuilder follows certain rules in translating the methods. For example,
047: * if the method in the service utility returns a <code>java.util.List</code>,
048: * that is translated to an array of
049: * <code>com.liferay.portal.model.PasswordPolicySoap</code>. If the method in the
050: * service utility returns a <code>com.liferay.portal.model.PasswordPolicy</code>,
051: * that is translated to a <code>com.liferay.portal.model.PasswordPolicySoap</code>.
052: * Methods that SOAP cannot safely wire are skipped.
053: * </p>
054: *
055: * <p>
056: * The benefits of using the SOAP utility is that it is cross platform
057: * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
058: * even Perl, to call the generated services. One drawback of SOAP is that it is
059: * slow because it needs to serialize all calls into a text format (XML).
060: * </p>
061: *
062: * <p>
063: * You can see a list of services at
064: * http://localhost:8080/tunnel-web/secure/axis. Set the property
065: * <code>tunnel.servlet.hosts.allowed</code> in portal.properties to configure
066: * security.
067: * </p>
068: *
069: * <p>
070: * The SOAP utility is only generated for remote services.
071: * </p>
072: *
073: * @author Brian Wing Shun Chan
074: *
075: * @see com.liferay.portal.service.PasswordPolicyServiceUtil
076: * @see com.liferay.portal.service.http.PasswordPolicyServiceHttp
077: * @see com.liferay.portal.service.model.PasswordPolicySoap
078: *
079: */
080: public class PasswordPolicyServiceSoap {
081: public static com.liferay.portal.model.PasswordPolicySoap addPasswordPolicy(
082: java.lang.String name, java.lang.String description,
083: boolean changeable, boolean changeRequired, long minAge,
084: boolean checkSyntax, boolean allowDictionaryWords,
085: int minLength, boolean history, int historyCount,
086: boolean expireable, long maxAge, long warningTime,
087: int graceLimit, boolean lockout, int maxFailure,
088: long lockoutDuration, long resetFailureCount)
089: throws RemoteException {
090: try {
091: com.liferay.portal.model.PasswordPolicy returnValue = PasswordPolicyServiceUtil
092: .addPasswordPolicy(name, description, changeable,
093: changeRequired, minAge, checkSyntax,
094: allowDictionaryWords, minLength, history,
095: historyCount, expireable, maxAge,
096: warningTime, graceLimit, lockout,
097: maxFailure, lockoutDuration,
098: resetFailureCount);
099:
100: return com.liferay.portal.model.PasswordPolicySoap
101: .toSoapModel(returnValue);
102: } catch (Exception e) {
103: _log.error(e, e);
104:
105: throw new RemoteException(e.getMessage());
106: }
107: }
108:
109: public static void deletePasswordPolicy(long passwordPolicyId)
110: throws RemoteException {
111: try {
112: PasswordPolicyServiceUtil
113: .deletePasswordPolicy(passwordPolicyId);
114: } catch (Exception e) {
115: _log.error(e, e);
116:
117: throw new RemoteException(e.getMessage());
118: }
119: }
120:
121: public static com.liferay.portal.model.PasswordPolicySoap updatePasswordPolicy(
122: long passwordPolicyId, java.lang.String name,
123: java.lang.String description, boolean changeable,
124: boolean changeRequired, long minAge, boolean checkSyntax,
125: boolean allowDictionaryWords, int minLength,
126: boolean history, int historyCount, boolean expireable,
127: long maxAge, long warningTime, int graceLimit,
128: boolean lockout, int maxFailure, long lockoutDuration,
129: long resetFailureCount) throws RemoteException {
130: try {
131: com.liferay.portal.model.PasswordPolicy returnValue = PasswordPolicyServiceUtil
132: .updatePasswordPolicy(passwordPolicyId, name,
133: description, changeable, changeRequired,
134: minAge, checkSyntax, allowDictionaryWords,
135: minLength, history, historyCount,
136: expireable, maxAge, warningTime,
137: graceLimit, lockout, maxFailure,
138: lockoutDuration, resetFailureCount);
139:
140: return com.liferay.portal.model.PasswordPolicySoap
141: .toSoapModel(returnValue);
142: } catch (Exception e) {
143: _log.error(e, e);
144:
145: throw new RemoteException(e.getMessage());
146: }
147: }
148:
149: private static Log _log = LogFactoryUtil
150: .getLog(PasswordPolicyServiceSoap.class);
151: }
|