Class ResourceUtils

java.lang.Object
com.nimbusds.oauth2.sdk.util.ResourceUtils

public final class ResourceUtils extends Object
Resource server URI utilities.
  • Method Details

    • isValidResourceURI

      @Deprecated public static boolean isValidResourceURI(URI resourceURI)
      Deprecated.
      Returns true if the specified resource URI is valid.
      Parameters:
      resourceURI - The resource URI. Must not be null.
      Returns:
      true if the resource URI is valid, false if the URI is not absolute or has a fragment.
    • isLegalResourceURI

      public static boolean isLegalResourceURI(URI resourceURI)
      Returns true if the specified resource URI is legal.
      Parameters:
      resourceURI - The resource URI, null if not specified.
      Returns:
      true if the resource URI is legal or null, false if the URI is not absolute or has a fragment.
    • ensureLegalResourceURIs

      public static List<URI> ensureLegalResourceURIs(List<URI> resourceURIs)
      Ensures the specified resource URIs are legal.
      Parameters:
      resourceURIs - The resource URIs, null if not specified.
      Returns:
      The checked resource URIs, null if not specified.
      Throws:
      IllegalArgumentException - If the resource URIs are not legal according to isLegalResourceURI(java.net.URI).
    • parseResourceURIs

      public static List<URI> parseResourceURIs(List<String> stringList) throws ParseException
      Parses a list of resource URIs from the specified string list.
      Parameters:
      stringList - The string list, null if not specified.
      Returns:
      The resource URIs, null if not specified.
      Throws:
      ParseException - If parsing failed.