コード例 #1
0
  @Override
  public FriendlyURL saveStagedModel(FriendlyURL friendlyURL) throws PortalException {

    if (friendlyURL.isMain()) {
      FriendlyURL mainFriendlyURL =
          _friendlyURLLocalService.getMainFriendlyURL(
              friendlyURL.getCompanyId(), friendlyURL.getGroupId(),
              friendlyURL.getClassNameId(), friendlyURL.getClassPK());

      if (!mainFriendlyURL.equals(friendlyURL)) {
        mainFriendlyURL.setMain(false);

        _friendlyURLLocalService.updateFriendlyURL(mainFriendlyURL);
      }
    }

    friendlyURL.setUrlTitle(
        _friendlyURLLocalService.getUniqueUrlTitle(
            friendlyURL.getCompanyId(),
            friendlyURL.getGroupId(),
            friendlyURL.getClassNameId(),
            friendlyURL.getClassPK(),
            friendlyURL.getUrlTitle()));

    return _friendlyURLLocalService.updateFriendlyURL(friendlyURL);
  }
コード例 #2
0
  @Override
  public void deleteStagedModel(FriendlyURL friendlyURL) throws PortalException {

    _friendlyURLLocalService.deleteFriendlyURL(
        friendlyURL.getCompanyId(),
        friendlyURL.getGroupId(),
        friendlyURL.getClassNameId(),
        friendlyURL.getClassPK(),
        friendlyURL.getUrlTitle());
  }
コード例 #3
0
  @Override
  public FriendlyURL addStagedModel(PortletDataContext portletDataContext, FriendlyURL friendlyURL)
      throws PortalException {

    return _friendlyURLLocalService.addFriendlyURL(
        friendlyURL.getCompanyId(),
        friendlyURL.getGroupId(),
        friendlyURL.getClassNameId(),
        friendlyURL.getClassPK(),
        friendlyURL.getUrlTitle());
  }