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