code: public FilterFunction pattern(final String value,
                                    final PatternType patternType)
      {
          return pattern(value,
                         patternType,
                         Optional.empty());
      }
docs: A constraint that checks the permissions of a subject (if using {@link PatternType#EQUALITY} or {@link PatternType#REGEX}) or
  {@link be.objectify.deadbolt.java.DynamicResourceHandler#checkPermission(String, Optional, DeadboltHandler, Http.RequestHeader)} (if
  using {@link PatternType#CUSTOM}).
  
  @param value       the constraint value
  @param patternType the type of pattern matching
  @return a function that wraps the constraint
  @see ConstraintLogic#pattern(Http.RequestHeader, DeadboltHandler, Optional, String, PatternType, Optional, boolean, Function, TriFunction, ConstraintPoint)