|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.omnifaces.util.ResourcePaths
public final class ResourcePaths
Utility class for working with (Servlet) resource paths, providing methods to handle their prefixes, extensions etc.
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean isDirectory(java.lang.String resourcePath)
ServletContext.getResourcePaths(String)
represents a
directory.
resourcePath
- the resource path to check
public 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |