@Override
  public void restoreStagedModel(PortletDataContext portletDataContext, T stagedModel)
      throws PortletDataException {

    StagedModelRepository<T> stagedModelRepository = getStagedModelRepository();

    if (stagedModelRepository == null) {
      super.restoreStagedModel(portletDataContext, stagedModel);

      return;
    }

    stagedModelRepository.restoreStagedModel(portletDataContext, stagedModel);
  }
  @Override
  public void exportStagedModel(PortletDataContext portletDataContext, T stagedModel)
      throws PortletDataException {

    super.exportStagedModel(portletDataContext, stagedModel);

    boolean updateLastPublishDate =
        MapUtil.getBoolean(
            portletDataContext.getParameterMap(), PortletDataHandlerKeys.UPDATE_LAST_PUBLISH_DATE);

    if (ExportImportThreadLocal.isStagingInProcess()
        && updateLastPublishDate
        && (stagedModel instanceof StagedGroupedModel)) {

      ExportImportProcessCallbackRegistryUtil.registerCallback(
          new UpdateStagedModelLastPublishDateCallable(
              stagedModel, portletDataContext.getDateRange()));
    }
  }