code: protected static void hasRestrictedPath(final String externalPath) {
          final String[] pathSegments = externalPath.split("/");
          if (Arrays.stream(pathSegments).anyMatch(p -> p.startsWith("fedora:"))) {
              throw new ServerManagedTypeException("Path cannot contain a fedora: prefixed segment.");
          }
      }
docs: Check if a path has a segment prefixed with fedora:
  
  @param externalPath the path.