コード例 #1
0
  @Override
  protected PortletPreferences doDeleteData(
      PortletDataContext portletDataContext,
      String portletId,
      PortletPreferences portletPreferences)
      throws Exception {

    if (portletDataContext.addPrimaryKey(DDLPortletDataHandler.class, "deleteData")) {

      return portletPreferences;
    }

    _ddlRecordSetLocalService.deleteRecordSets(portletDataContext.getScopeGroupId());

    _ddmStructureLocalService.deleteStructures(
        portletDataContext.getScopeGroupId(), PortalUtil.getClassNameId(DDLRecordSet.class));

    return portletPreferences;
  }
コード例 #2
0
  @Override
  protected PortletPreferences doDeleteData(
      PortletDataContext portletDataContext,
      String portletId,
      PortletPreferences portletPreferences)
      throws Exception {

    if (portletDataContext.addPrimaryKey(MBPortletDataHandler.class, "deleteData")) {

      return portletPreferences;
    }

    _mbBanLocalService.deleteBansByGroupId(portletDataContext.getScopeGroupId());

    _mbCategoryLocalService.deleteCategories(portletDataContext.getScopeGroupId());

    _mbStatsUserLocalService.deleteStatsUsersByGroupId(portletDataContext.getScopeGroupId());

    _mbThreadLocalService.deleteThreads(
        portletDataContext.getScopeGroupId(), MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID);

    return portletPreferences;
  }