public final class ResourcePaths
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.util.Set<java.lang.String> |
filterExtension(java.util.Set<java.lang.String> resources)
Filters away every resource in the given set that has an extension.
|
static java.lang.String |
getExtension(java.lang.String resource)
Gets the extension of a resource if any.
|
static boolean |
isDirectory(java.lang.String resourcePath)
Checks if the given resource path obtained from
ServletContext.getResourcePaths(String) represents a
directory. |
static boolean |
isExtensionless(java.lang.String viewId) |
static java.lang.String |
stripExtension(java.lang.String resource)
Strips the extension from a resource if any.
|
static java.lang.String |
stripPrefixPath(java.lang.String prefix,
java.lang.String resource)
Strips the special 'faces-views' prefix path from the resource if any.
|
public static boolean isDirectory(java.lang.String resourcePath)
ServletContext.getResourcePaths(String)
represents a
directory.resourcePath
- the resource path to checkpublic static java.lang.String stripPrefixPath(java.lang.String prefix, java.lang.String resource)
resource
- public static java.lang.String stripExtension(java.lang.String resource)
resource
- public static java.lang.String getExtension(java.lang.String resource)
resource
- public static boolean isExtensionless(java.lang.String viewId)
public static java.util.Set<java.lang.String> filterExtension(java.util.Set<java.lang.String> resources)
resources
- A set of resources to be filtered