public static com.liferay.portlet.softwarecatalog.model.SCProductEntrySoap addProductEntry(
      java.lang.String name,
      java.lang.String type,
      java.lang.String tags,
      java.lang.String shortDescription,
      java.lang.String longDescription,
      java.lang.String pageURL,
      java.lang.String author,
      java.lang.String repoGroupId,
      java.lang.String repoArtifactId,
      long[] licenseIds,
      java.util.List<byte[]> thumbnails,
      java.util.List<byte[]> fullImages,
      com.liferay.portal.service.ServiceContext serviceContext)
      throws RemoteException {
    try {
      com.liferay.portlet.softwarecatalog.model.SCProductEntry returnValue =
          SCProductEntryServiceUtil.addProductEntry(
              name,
              type,
              tags,
              shortDescription,
              longDescription,
              pageURL,
              author,
              repoGroupId,
              repoArtifactId,
              licenseIds,
              thumbnails,
              fullImages,
              serviceContext);

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

      throw new RemoteException(e.getMessage());
    }
  }
  protected void updateProductEntry(ActionRequest actionRequest) throws Exception {

    UploadPortletRequest uploadPortletRequest = PortalUtil.getUploadPortletRequest(actionRequest);

    long productEntryId = ParamUtil.getLong(actionRequest, "productEntryId");

    String name = ParamUtil.getString(actionRequest, "name");
    String type = ParamUtil.getString(actionRequest, "type");
    String tags = ParamUtil.getString(actionRequest, "tags");
    String shortDescription = ParamUtil.getString(actionRequest, "shortDescription");
    String longDescription = ParamUtil.getString(actionRequest, "longDescription");
    String pageURL = ParamUtil.getString(actionRequest, "pageURL");
    String author = ParamUtil.getString(actionRequest, "author");
    String repoGroupId = ParamUtil.getString(actionRequest, "repoGroupId");
    String repoArtifactId = ParamUtil.getString(actionRequest, "repoArtifactId");

    long[] licenseIds = ParamUtil.getLongValues(actionRequest, "licenses");

    List<byte[]> thumbnails = getThumbnails(uploadPortletRequest);
    List<byte[]> fullImages = getFullImages(uploadPortletRequest);

    ServiceContext serviceContext =
        ServiceContextFactory.getInstance(SCProductEntry.class.getName(), actionRequest);

    if (productEntryId <= 0) {

      // Add product entry

      SCProductEntryServiceUtil.addProductEntry(
          name,
          type,
          tags,
          shortDescription,
          longDescription,
          pageURL,
          author,
          repoGroupId,
          repoArtifactId,
          licenseIds,
          thumbnails,
          fullImages,
          serviceContext);
    } else {

      // Update product entry

      SCProductEntryServiceUtil.updateProductEntry(
          productEntryId,
          name,
          type,
          tags,
          shortDescription,
          longDescription,
          pageURL,
          author,
          repoGroupId,
          repoArtifactId,
          licenseIds,
          thumbnails,
          fullImages);
    }
  }