@Override
  public Object before(MethodInvocation methodInvocation) throws Throwable {
    SystemEvent systemEvent = findAnnotation(methodInvocation);

    if (systemEvent == _nullSystemEvent) {
      return null;
    }

    if (systemEvent.action() != SystemEventConstants.ACTION_NONE) {
      if (!isValid(methodInvocation, _PHASE_BEFORE)) {
        return null;
      }

      Object[] arguments = methodInvocation.getArguments();

      ClassedModel classedModel = (ClassedModel) arguments[0];

      SystemEventHierarchyEntry systemEventHierarchyEntry =
          SystemEventHierarchyEntryThreadLocal.push(
              getClassName(classedModel), getClassPK(classedModel), systemEvent.action());

      if (systemEventHierarchyEntry != null) {
        systemEventHierarchyEntry.setUuid(getUuid(classedModel));
      }
    }

    return null;
  }
  @Override
  public void deletePortletFolder(long folderId) throws PortalException, SystemException {

    boolean dlAppHelperEnabled = DLAppHelperThreadLocal.isEnabled();

    try {
      DLAppHelperThreadLocal.setEnabled(false);

      SystemEventHierarchyEntryThreadLocal.push(Folder.class);

      DLAppLocalServiceUtil.deleteFolder(folderId);
    } catch (NoSuchRepositoryEntryException nsree) {
      if (_log.isErrorEnabled()) {
        _log.error(nsree, nsree);
      }
    } finally {
      DLAppHelperThreadLocal.setEnabled(dlAppHelperEnabled);

      SystemEventHierarchyEntryThreadLocal.pop(Folder.class);
    }
  }