Package com.nimbusds.oauth2.sdk.util
Class ResourceUtils
- java.lang.Object
-
- com.nimbusds.oauth2.sdk.util.ResourceUtils
-
public final class ResourceUtils extends Object
Resource server URI utilities.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static List<URI>
ensureLegalResourceURIs(List<URI> resourceURIs)
Ensures the specified resource URIs are legal.static boolean
isLegalResourceURI(URI resourceURI)
Returnstrue
if the specified resource URI is legal.static boolean
isValidResourceURI(URI resourceURI)
Deprecated.UseisLegalResourceURI(java.net.URI)
instead.static List<URI>
parseResourceURIs(List<String> stringList)
Parses a list of resource URIs from the specified string list.
-
-
-
Method Detail
-
isValidResourceURI
@Deprecated public static boolean isValidResourceURI(URI resourceURI)
Deprecated.UseisLegalResourceURI(java.net.URI)
instead.Returnstrue
if the specified resource URI is valid.- Parameters:
resourceURI
- The resource URI. Must not benull
.- 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)
Returnstrue
if the specified resource URI is legal.- Parameters:
resourceURI
- The resource URI,null
if not specified.- Returns:
true
if the resource URI is legal ornull
,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 toisLegalResourceURI(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.
-
-