org.richfaces.resource.optimizer.resource.util

## Class ResourceUtil

- java.lang.Object
- - org.richfaces.resource.optimizer.resource.util.ResourceUtil

-     public final class ResourceUtil
      extends Object

  Author:
    Nick Belaevski

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ResourceUtil.VersionKey`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static VirtualFile` | `getLatestVersion(VirtualFile file, boolean library)`
    `static String` | `getResourceQualifier(javax.faces.application.Resource resource)`
    `static String` | `getResourceQualifier(ResourceKey resourceKey)` Returns the qualified name of resourceKey in format libraryName:resourceName.
    `static Collection<VirtualFile>` | `getResourceRoots(Iterable<VFSRoot> cpRoots, Iterable<VFSRoot> webRoots)`
    `static boolean` | `isSameResource(javax.faces.application.Resource resource, ResourceKey resourceKey)` Returns true if resourceKey and resource represents same resource.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getLatestVersion

          public static VirtualFile getLatestVersion(VirtualFile file,
                                     boolean library)

    - #### getResourceRoots

          public static Collection<VirtualFile> getResourceRoots(Iterable<VFSRoot> cpRoots,
                                                 Iterable<VFSRoot> webRoots)
                                                          throws URISyntaxException,
                                                                 IOException

      Throws:
        `URISyntaxException`
        `IOException`

    - #### getResourceQualifier

          public static String getResourceQualifier(javax.faces.application.Resource resource)

    - #### getResourceQualifier

          public static String getResourceQualifier(ResourceKey resourceKey)

      Returns the qualified name of resourceKey in format libraryName:resourceName.
      Parameters:
        `resourceKey` - the resourceKey
      Returns:
        the qualified name of resourceKey in format libraryName:resourceName.

    - #### isSameResource

          public static boolean isSameResource(javax.faces.application.Resource resource,
                               ResourceKey resourceKey)

      Returns true if resourceKey and resource represents same resource.
      Parameters:
        `resourceKey` - resource key representation of resource
        `resource` - resource instance
      Returns:
        true if resourceKey and resource represents same resource; false otherwise

Copyright © 2015 JBoss by Red Hat. All Rights Reserved.