code: public static void touchLdpMembershipResource(final Node node, final Calendar date, final String user) {
          getContainingNode(node).filter(uncheck(parent -> parent.hasProperty(LDP_MEMBER_RESOURCE))).ifPresent(parent -> {
              try {
                  final Optional<String> hasInsertedContentProperty = ldpInsertedContentProperty(node)
                          .flatMap(resourceToProperty(node.getSession())).filter(uncheck(node::hasProperty));
                  if (parent.isNodeType(LDP_DIRECT_CONTAINER) ||
                          (parent.isNodeType(LDP_INDIRECT_CONTAINER) && hasInsertedContentProperty.isPresent())) {
                      touch(parent.getProperty(LDP_MEMBER_RESOURCE).getNode(), date, user);
                  }
              } catch (final javax.jcr.AccessDeniedException ex) {
                  throw new AccessDeniedException(ex);
              } catch (final RepositoryException ex) {
                  throw new RepositoryRuntimeException(ex);
              }
          });
      }
docs: Update the fedora:lastModified date and fedora:lastModifiedBy of the parent's ldp:membershipResource if that
  node is a direct or indirect container, provided the LDP constraints are valid.
  
  @param node The JCR node
  @param date the date the modification was supposed to have occurred or null to indicate now
  @param user the user who performed the action or null to indicate the user associated with the current session