/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.liferay.portlet.messageboards.service.http;
import aQute.bnd.annotation.ProviderType;
import com.liferay.message.boards.kernel.service.MBMessageServiceUtil;
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import java.rmi.RemoteException;
/**
* Provides the SOAP utility for the
* {@link MBMessageServiceUtil} service utility. The
* static methods of this class calls the same methods of the service utility.
* However, the signatures are different because it is difficult for SOAP to
* support certain types.
*
* <p>
* ServiceBuilder follows certain rules in translating the methods. For example,
* if the method in the service utility returns a {@link java.util.List}, that
* is translated to an array of {@link com.liferay.message.boards.kernel.model.MBMessageSoap}.
* If the method in the service utility returns a
* {@link com.liferay.message.boards.kernel.model.MBMessage}, that is translated to a
* {@link com.liferay.message.boards.kernel.model.MBMessageSoap}. Methods that SOAP cannot
* safely wire are skipped.
* </p>
*
* <p>
* The benefits of using the SOAP utility is that it is cross platform
* compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
* even Perl, to call the generated services. One drawback of SOAP is that it is
* slow because it needs to serialize all calls into a text format (XML).
* </p>
*
* <p>
* You can see a list of services at http://localhost:8080/api/axis. Set the
* property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
* security.
* </p>
*
* <p>
* The SOAP utility is only generated for remote services.
* </p>
*
* @author Brian Wing Shun Chan
* @see MBMessageServiceHttp
* @see com.liferay.message.boards.kernel.model.MBMessageSoap
* @see MBMessageServiceUtil
* @generated
*/
@ProviderType
public class MBMessageServiceSoap {
public static com.liferay.message.boards.kernel.model.MBMessageSoap addDiscussionMessage(
long groupId, java.lang.String className, long classPK, long threadId,
long parentMessageId, java.lang.String subject, java.lang.String body,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws RemoteException {
try {
com.liferay.message.boards.kernel.model.MBMessage returnValue = MBMessageServiceUtil.addDiscussionMessage(groupId,
className, classPK, threadId, parentMessageId, subject,
body, serviceContext);
return com.liferay.message.boards.kernel.model.MBMessageSoap.toSoapModel(returnValue);
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
public static com.liferay.message.boards.kernel.model.MBMessageSoap addMessage(
long groupId, long categoryId, java.lang.String subject,
java.lang.String body, java.lang.String format,
java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
boolean anonymous, double priority, boolean allowPingbacks,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws RemoteException {
try {
com.liferay.message.boards.kernel.model.MBMessage returnValue = MBMessageServiceUtil.addMessage(groupId,
categoryId, subject, body, format, inputStreamOVPs,
anonymous, priority, allowPingbacks, serviceContext);
return com.liferay.message.boards.kernel.model.MBMessageSoap.toSoapModel(returnValue);
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
public static com.liferay.message.boards.kernel.model.MBMessageSoap addMessage(
long categoryId, java.lang.String subject, java.lang.String body,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws RemoteException {
try {
com.liferay.message.boards.kernel.model.MBMessage returnValue = MBMessageServiceUtil.addMessage(categoryId,
subject, body, serviceContext);
return com.liferay.message.boards.kernel.model.MBMessageSoap.toSoapModel(returnValue);
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
public static com.liferay.message.boards.kernel.model.MBMessageSoap addMessage(
long parentMessageId, java.lang.String subject, java.lang.String body,
java.lang.String format,
java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
boolean anonymous, double priority, boolean allowPingbacks,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws RemoteException {
try {
com.liferay.message.boards.kernel.model.MBMessage returnValue = MBMessageServiceUtil.addMessage(parentMessageId,
subject, body, format, inputStreamOVPs, anonymous,
priority, allowPingbacks, serviceContext);
return com.liferay.message.boards.kernel.model.MBMessageSoap.toSoapModel(returnValue);
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
public static void deleteDiscussionMessage(long messageId)
throws RemoteException {
try {
MBMessageServiceUtil.deleteDiscussionMessage(messageId);
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
/**
* @deprecated As of 7.0.0, replaced by {@link
#deleteDiscussionMessage(long)}
*/
@Deprecated
public static void deleteDiscussionMessage(long groupId,
java.lang.String className, long classPK,
java.lang.String permissionClassName, long permissionClassPK,
long permissionOwnerId, long messageId) throws RemoteException {
try {
MBMessageServiceUtil.deleteDiscussionMessage(groupId, className,
classPK, permissionClassName, permissionClassPK,
permissionOwnerId, messageId);
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
public static void deleteMessage(long messageId) throws RemoteException {
try {
MBMessageServiceUtil.deleteMessage(messageId);
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
public static void deleteMessageAttachment(long messageId,
java.lang.String fileName) throws RemoteException {
try {
MBMessageServiceUtil.deleteMessageAttachment(messageId, fileName);
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
public static void deleteMessageAttachments(long messageId)
throws RemoteException {
try {
MBMessageServiceUtil.deleteMessageAttachments(messageId);
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
public static void emptyMessageAttachments(long messageId)
throws RemoteException {
try {
MBMessageServiceUtil.emptyMessageAttachments(messageId);
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
public static com.liferay.message.boards.kernel.model.MBMessageSoap[] getCategoryMessages(
long groupId, long categoryId, int status, int start, int end)
throws RemoteException {
try {
java.util.List<com.liferay.message.boards.kernel.model.MBMessage> returnValue =
MBMessageServiceUtil.getCategoryMessages(groupId, categoryId,
status, start, end);
return com.liferay.message.boards.kernel.model.MBMessageSoap.toSoapModels(returnValue);
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
public static int getCategoryMessagesCount(long groupId, long categoryId,
int status) throws RemoteException {
try {
int returnValue = MBMessageServiceUtil.getCategoryMessagesCount(groupId,
categoryId, status);
return returnValue;
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
public static int getGroupMessagesCount(long groupId, int status)
throws RemoteException {
try {
int returnValue = MBMessageServiceUtil.getGroupMessagesCount(groupId,
status);
return returnValue;
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
public static com.liferay.message.boards.kernel.model.MBMessageSoap getMessage(
long messageId) throws RemoteException {
try {
com.liferay.message.boards.kernel.model.MBMessage returnValue = MBMessageServiceUtil.getMessage(messageId);
return com.liferay.message.boards.kernel.model.MBMessageSoap.toSoapModel(returnValue);
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
public static int getThreadAnswersCount(long groupId, long categoryId,
long threadId) throws RemoteException {
try {
int returnValue = MBMessageServiceUtil.getThreadAnswersCount(groupId,
categoryId, threadId);
return returnValue;
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
public static com.liferay.message.boards.kernel.model.MBMessageSoap[] getThreadMessages(
long groupId, long categoryId, long threadId, int status, int start,
int end) throws RemoteException {
try {
java.util.List<com.liferay.message.boards.kernel.model.MBMessage> returnValue =
MBMessageServiceUtil.getThreadMessages(groupId, categoryId,
threadId, status, start, end);
return com.liferay.message.boards.kernel.model.MBMessageSoap.toSoapModels(returnValue);
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
public static int getThreadMessagesCount(long groupId, long categoryId,
long threadId, int status) throws RemoteException {
try {
int returnValue = MBMessageServiceUtil.getThreadMessagesCount(groupId,
categoryId, threadId, status);
return returnValue;
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
public static void restoreMessageAttachmentFromTrash(long messageId,
java.lang.String fileName) throws RemoteException {
try {
MBMessageServiceUtil.restoreMessageAttachmentFromTrash(messageId,
fileName);
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
public static void subscribeMessage(long messageId)
throws RemoteException {
try {
MBMessageServiceUtil.subscribeMessage(messageId);
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
public static void unsubscribeMessage(long messageId)
throws RemoteException {
try {
MBMessageServiceUtil.unsubscribeMessage(messageId);
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
public static void updateAnswer(long messageId, boolean answer,
boolean cascade) throws RemoteException {
try {
MBMessageServiceUtil.updateAnswer(messageId, answer, cascade);
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
public static com.liferay.message.boards.kernel.model.MBMessageSoap updateDiscussionMessage(
java.lang.String className, long classPK, long messageId,
java.lang.String subject, java.lang.String body,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws RemoteException {
try {
com.liferay.message.boards.kernel.model.MBMessage returnValue = MBMessageServiceUtil.updateDiscussionMessage(className,
classPK, messageId, subject, body, serviceContext);
return com.liferay.message.boards.kernel.model.MBMessageSoap.toSoapModel(returnValue);
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
public static com.liferay.message.boards.kernel.model.MBMessageSoap updateMessage(
long messageId, java.lang.String subject, java.lang.String body,
java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
java.util.List<java.lang.String> existingFiles, double priority,
boolean allowPingbacks,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws RemoteException {
try {
com.liferay.message.boards.kernel.model.MBMessage returnValue = MBMessageServiceUtil.updateMessage(messageId,
subject, body, inputStreamOVPs, existingFiles, priority,
allowPingbacks, serviceContext);
return com.liferay.message.boards.kernel.model.MBMessageSoap.toSoapModel(returnValue);
}
catch (Exception e) {
_log.error(e, e);
throw new RemoteException(e.getMessage());
}
}
private static Log _log = LogFactoryUtil.getLog(MBMessageServiceSoap.class);
}