org.apache.shindig.gadgets.uri
Class DefaultJsVersioner

java.lang.Object
  extended by org.apache.shindig.gadgets.uri.DefaultJsVersioner
All Implemented Interfaces:
JsUriManager.Versioner

public class DefaultJsVersioner
extends Object
implements JsUriManager.Versioner

Straightforward versioner for collections of requested features to extern. This implementation covers non-dynamic JS use cases pretty well, so it's set as the default implementation for the system.


Constructor Summary
DefaultJsVersioner(FeatureRegistry registry)
           
 
Method Summary
 UriStatus validate(Uri gadgetUri, String container, Collection<String> extern, String version)
           
 String version(Uri gadgetUri, String container, Collection<String> extern)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultJsVersioner

@Inject
public DefaultJsVersioner(FeatureRegistry registry)
Method Detail

version

public String version(Uri gadgetUri,
                      String container,
                      Collection<String> extern)
Specified by:
version in interface JsUriManager.Versioner
extern - Collection of libs externed.
Returns:
Version string for the Uri.

validate

public UriStatus validate(Uri gadgetUri,
                          String container,
                          Collection<String> extern,
                          String version)
Specified by:
validate in interface JsUriManager.Versioner
Parameters:
gadgetUri - Gadget for which extern Uri was generated.
extern - Collection of libs externed.
version - Version string generated by the Versioner.
Returns:
Validation status of the version.


Copyright © 2007-2012. All Rights Reserved.