示例#1
0
  public static com.liferay.portlet.messageboards.model.MBMessageSoap addDiscussionMessage(
      long groupId,
      java.lang.String className,
      long classPK,
      java.lang.String permissionClassName,
      long permissionClassPK,
      long permissionOwnerId,
      long threadId,
      long parentMessageId,
      java.lang.String subject,
      java.lang.String body,
      com.liferay.portal.service.ServiceContext serviceContext)
      throws RemoteException {
    try {
      com.liferay.portlet.messageboards.model.MBMessage returnValue =
          MBMessageServiceUtil.addDiscussionMessage(
              groupId,
              className,
              classPK,
              permissionClassName,
              permissionClassPK,
              permissionOwnerId,
              threadId,
              parentMessageId,
              subject,
              body,
              serviceContext);

      return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
    } catch (Exception e) {
      _log.error(e, e);

      throw new RemoteException(e.getMessage());
    }
  }
示例#2
0
  public static com.liferay.portlet.messageboards.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.service.ServiceContext serviceContext)
      throws RemoteException {
    try {
      com.liferay.portlet.messageboards.model.MBMessage returnValue =
          MBMessageServiceUtil.updateMessage(
              messageId,
              subject,
              body,
              inputStreamOVPs,
              existingFiles,
              priority,
              allowPingbacks,
              serviceContext);

      return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
    } catch (Exception e) {
      _log.error(e, e);

      throw new RemoteException(e.getMessage());
    }
  }
示例#3
0
  public static com.liferay.portlet.messageboards.model.MBMessageSoap getMessage(long messageId)
      throws RemoteException {
    try {
      com.liferay.portlet.messageboards.model.MBMessage returnValue =
          MBMessageServiceUtil.getMessage(messageId);

      return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
    } catch (Exception e) {
      _log.error(e, e);

      throw new RemoteException(e.getMessage());
    }
  }
示例#4
0
  public static com.liferay.portlet.messageboards.model.MBMessageSoap[] getCategoryMessages(
      long groupId, long categoryId, int status, int start, int end) throws RemoteException {
    try {
      java.util.List<com.liferay.portlet.messageboards.model.MBMessage> returnValue =
          MBMessageServiceUtil.getCategoryMessages(groupId, categoryId, status, start, end);

      return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModels(returnValue);
    } catch (Exception e) {
      _log.error(e, e);

      throw new RemoteException(e.getMessage());
    }
  }
示例#5
0
  public static com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
      long groupId,
      long categoryId,
      long threadId,
      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.service.ServiceContext serviceContext)
      throws RemoteException {
    try {
      com.liferay.portlet.messageboards.model.MBMessage returnValue =
          MBMessageServiceUtil.addMessage(
              groupId,
              categoryId,
              threadId,
              parentMessageId,
              subject,
              body,
              format,
              inputStreamOVPs,
              anonymous,
              priority,
              allowPingbacks,
              serviceContext);

      return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
    } catch (Exception e) {
      _log.error(e, e);

      throw new RemoteException(e.getMessage());
    }
  }
  /**
   * Converts the soap model instance into a normal model instance.
   *
   * @param soapModel the soap model instance to convert
   * @return the normal model instance
   */
  public static MBMessage toModel(MBMessageSoap soapModel) {
    if (soapModel == null) {
      return null;
    }

    MBMessage model = new MBMessageImpl();

    model.setUuid(soapModel.getUuid());
    model.setMessageId(soapModel.getMessageId());
    model.setGroupId(soapModel.getGroupId());
    model.setCompanyId(soapModel.getCompanyId());
    model.setUserId(soapModel.getUserId());
    model.setUserName(soapModel.getUserName());
    model.setCreateDate(soapModel.getCreateDate());
    model.setModifiedDate(soapModel.getModifiedDate());
    model.setClassNameId(soapModel.getClassNameId());
    model.setClassPK(soapModel.getClassPK());
    model.setCategoryId(soapModel.getCategoryId());
    model.setThreadId(soapModel.getThreadId());
    model.setRootMessageId(soapModel.getRootMessageId());
    model.setParentMessageId(soapModel.getParentMessageId());
    model.setSubject(soapModel.getSubject());
    model.setBody(soapModel.getBody());
    model.setFormat(soapModel.getFormat());
    model.setAnonymous(soapModel.getAnonymous());
    model.setPriority(soapModel.getPriority());
    model.setAllowPingbacks(soapModel.getAllowPingbacks());
    model.setAnswer(soapModel.getAnswer());
    model.setStatus(soapModel.getStatus());
    model.setStatusByUserId(soapModel.getStatusByUserId());
    model.setStatusByUserName(soapModel.getStatusByUserName());
    model.setStatusDate(soapModel.getStatusDate());

    return model;
  }