public class ResourceUrlCreator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected DownloadOptions |
downloadOptions |
protected Resource |
resource |
Constructor and Description |
---|
ResourceUrlCreator(Resource resource,
DownloadOptions downloadOptions) |
Modifier and Type | Method and Description |
---|---|
protected java.net.URL |
getUrl(Resource resource,
boolean usePack,
boolean useVersion)
Returns a url for the resource.
|
java.util.List<java.net.URL> |
getUrls()
Returns a list of URLs that the resources might be downloadable from.
|
protected java.net.URL |
getVersionedUrlUsingQuery(Resource resource)
Returns the URL for a resource, relying on HTTP query for getting the
right version
|
protected final Resource resource
protected final DownloadOptions downloadOptions
public ResourceUrlCreator(Resource resource, DownloadOptions downloadOptions)
public java.util.List<java.net.URL> getUrls()
protected java.net.URL getUrl(Resource resource, boolean usePack, boolean useVersion)
resource
- the resourceusePack
- whether the URL should point to the pack200 fileuseVersion
- whether the URL should be modified to include the versionprotected java.net.URL getVersionedUrlUsingQuery(Resource resource)
resource
- the resource to get the url for