org.apache.myfaces.shared.resource
Class ContractResourceLoader

java.lang.Object
  extended by org.apache.myfaces.shared.resource.ResourceLoader
      extended by org.apache.myfaces.shared.resource.ContractResourceLoader

public abstract class ContractResourceLoader
extends ResourceLoader

ResourceLoaders that are able to handle contract aware resources must extends from this class.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.myfaces.shared.resource.ResourceLoader
ResourceLoader.VersionComparator
 
Field Summary
static String VERSION_INVALID
           
 
Constructor Summary
ContractResourceLoader(String prefix)
           
 
Method Summary
 ResourceMeta createResourceMeta(String prefix, String libraryName, String libraryVersion, String resourceName, String resourceVersion)
           
abstract  ResourceMeta createResourceMeta(String prefix, String libraryName, String libraryVersion, String resourceName, String resourceVersion, String contractName)
           
 String getLibraryVersion(String path)
          Return the max available version found (if exists) or return null if no version available.
abstract  String getLibraryVersion(String path, String contractName)
          Return the max available version found (if exists) or return null if no version available.
 String getResourceVersion(String path)
           
abstract  String getResourceVersion(String path, String contractName)
           
 boolean libraryExists(String libraryName)
           
abstract  boolean libraryExists(String libraryName, String contractName)
           
 
Methods inherited from class org.apache.myfaces.shared.resource.ResourceLoader
getPrefix, getResourceInputStream, getResourceURL, getVersionComparator, resourceExists, setPrefix, setVersionComparator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION_INVALID

public static final String VERSION_INVALID
See Also:
Constant Field Values
Constructor Detail

ContractResourceLoader

public ContractResourceLoader(String prefix)
Method Detail

getResourceVersion

public String getResourceVersion(String path)
Specified by:
getResourceVersion in class ResourceLoader

getLibraryVersion

public String getLibraryVersion(String path)
Description copied from class: ResourceLoader
Return the max available version found (if exists) or return null if no version available.

Specified by:
getLibraryVersion in class ResourceLoader

getResourceVersion

public abstract String getResourceVersion(String path,
                                          String contractName)

getLibraryVersion

public abstract String getLibraryVersion(String path,
                                         String contractName)
Return the max available version found (if exists) or return null if no version available.


createResourceMeta

public ResourceMeta createResourceMeta(String prefix,
                                       String libraryName,
                                       String libraryVersion,
                                       String resourceName,
                                       String resourceVersion)
Specified by:
createResourceMeta in class ResourceLoader

createResourceMeta

public abstract ResourceMeta createResourceMeta(String prefix,
                                                String libraryName,
                                                String libraryVersion,
                                                String resourceName,
                                                String resourceVersion,
                                                String contractName)
Overrides:
createResourceMeta in class ResourceLoader

libraryExists

public boolean libraryExists(String libraryName)
Specified by:
libraryExists in class ResourceLoader

libraryExists

public abstract boolean libraryExists(String libraryName,
                                      String contractName)


Copyright © 2014 The Apache Software Foundation. All rights reserved.