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.portlet.journal.service.http;
022:
023: import com.liferay.portal.kernel.log.Log;
024: import com.liferay.portal.kernel.log.LogFactoryUtil;
025:
026: import com.liferay.portlet.journal.service.JournalStructureServiceUtil;
027:
028: import java.rmi.RemoteException;
029:
030: /**
031: * <a href="JournalStructureServiceSoap.java.html"><b><i>View Source</i></b></a>
032: *
033: * <p>
034: * ServiceBuilder generated this class. Modifications in this class will be
035: * overwritten the next time is generated.
036: * </p>
037: *
038: * <p>
039: * This class provides a SOAP utility for the
040: * <code>com.liferay.portlet.journal.service.JournalStructureServiceUtil</code> service
041: * utility. The static methods of this class calls the same methods of the
042: * service utility. However, the signatures are different because it is
043: * difficult for SOAP to support certain types.
044: * </p>
045: *
046: * <p>
047: * ServiceBuilder follows certain rules in translating the methods. For example,
048: * if the method in the service utility returns a <code>java.util.List</code>,
049: * that is translated to an array of
050: * <code>com.liferay.portlet.journal.model.JournalStructureSoap</code>. If the method in the
051: * service utility returns a <code>com.liferay.portlet.journal.model.JournalStructure</code>,
052: * that is translated to a <code>com.liferay.portlet.journal.model.JournalStructureSoap</code>.
053: * Methods that SOAP cannot safely wire are skipped.
054: * </p>
055: *
056: * <p>
057: * The benefits of using the SOAP utility is that it is cross platform
058: * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
059: * even Perl, to call the generated services. One drawback of SOAP is that it is
060: * slow because it needs to serialize all calls into a text format (XML).
061: * </p>
062: *
063: * <p>
064: * You can see a list of services at
065: * http://localhost:8080/tunnel-web/secure/axis. Set the property
066: * <code>tunnel.servlet.hosts.allowed</code> in portal.properties to configure
067: * security.
068: * </p>
069: *
070: * <p>
071: * The SOAP utility is only generated for remote services.
072: * </p>
073: *
074: * @author Brian Wing Shun Chan
075: *
076: * @see com.liferay.portlet.journal.service.JournalStructureServiceUtil
077: * @see com.liferay.portlet.journal.service.http.JournalStructureServiceHttp
078: * @see com.liferay.portlet.journal.service.model.JournalStructureSoap
079: *
080: */
081: public class JournalStructureServiceSoap {
082: public static com.liferay.portlet.journal.model.JournalStructureSoap addStructure(
083: java.lang.String structureId, boolean autoStructureId,
084: long plid, java.lang.String name,
085: java.lang.String description, java.lang.String xsd,
086: boolean addCommunityPermissions, boolean addGuestPermissions)
087: throws RemoteException {
088: try {
089: com.liferay.portlet.journal.model.JournalStructure returnValue = JournalStructureServiceUtil
090: .addStructure(structureId, autoStructureId, plid,
091: name, description, xsd,
092: addCommunityPermissions,
093: addGuestPermissions);
094:
095: return com.liferay.portlet.journal.model.JournalStructureSoap
096: .toSoapModel(returnValue);
097: } catch (Exception e) {
098: _log.error(e, e);
099:
100: throw new RemoteException(e.getMessage());
101: }
102: }
103:
104: public static com.liferay.portlet.journal.model.JournalStructureSoap addStructure(
105: java.lang.String structureId, boolean autoStructureId,
106: long plid, java.lang.String name,
107: java.lang.String description, java.lang.String xsd,
108: java.lang.String[] communityPermissions,
109: java.lang.String[] guestPermissions) throws RemoteException {
110: try {
111: com.liferay.portlet.journal.model.JournalStructure returnValue = JournalStructureServiceUtil
112: .addStructure(structureId, autoStructureId, plid,
113: name, description, xsd,
114: communityPermissions, guestPermissions);
115:
116: return com.liferay.portlet.journal.model.JournalStructureSoap
117: .toSoapModel(returnValue);
118: } catch (Exception e) {
119: _log.error(e, e);
120:
121: throw new RemoteException(e.getMessage());
122: }
123: }
124:
125: public static void deleteStructure(long groupId,
126: java.lang.String structureId) throws RemoteException {
127: try {
128: JournalStructureServiceUtil.deleteStructure(groupId,
129: structureId);
130: } catch (Exception e) {
131: _log.error(e, e);
132:
133: throw new RemoteException(e.getMessage());
134: }
135: }
136:
137: public static com.liferay.portlet.journal.model.JournalStructureSoap getStructure(
138: long groupId, java.lang.String structureId)
139: throws RemoteException {
140: try {
141: com.liferay.portlet.journal.model.JournalStructure returnValue = JournalStructureServiceUtil
142: .getStructure(groupId, structureId);
143:
144: return com.liferay.portlet.journal.model.JournalStructureSoap
145: .toSoapModel(returnValue);
146: } catch (Exception e) {
147: _log.error(e, e);
148:
149: throw new RemoteException(e.getMessage());
150: }
151: }
152:
153: public static com.liferay.portlet.journal.model.JournalStructureSoap updateStructure(
154: long groupId, java.lang.String structureId,
155: java.lang.String name, java.lang.String description,
156: java.lang.String xsd) throws RemoteException {
157: try {
158: com.liferay.portlet.journal.model.JournalStructure returnValue = JournalStructureServiceUtil
159: .updateStructure(groupId, structureId, name,
160: description, xsd);
161:
162: return com.liferay.portlet.journal.model.JournalStructureSoap
163: .toSoapModel(returnValue);
164: } catch (Exception e) {
165: _log.error(e, e);
166:
167: throw new RemoteException(e.getMessage());
168: }
169: }
170:
171: private static Log _log = LogFactoryUtil
172: .getLog(JournalStructureServiceSoap.class);
173: }
|