public class AssetController extends Object
Constructor and Description |
---|
AssetController() |
Modifier and Type | Method and Description |
---|---|
String |
byId(String id)
Generate an asset URL from the specified id.
|
String |
byPath(AssetLocation location,
String uri)
Returns the URL of an asset.
|
String |
byPath(String path)
Returns the URL of an asset located in the assets package of the application.
|
public String byId(String id) throws NullPointerException
id
- the asset idNullPointerException
- if the asset id is nullpublic String byPath(String path) throws NullPointerException
Returns the URL of an asset located in the assets package of the application.
If the controller is not under the scope of a request, null is returned.
path
- the pathNullPointerException
- when the path argument is nullpublic String byPath(AssetLocation location, String uri) throws NullPointerException
Returns the URL of an asset.
If the controller is not under the scope of a request, null is returned.
location
- the asset locationuri
- the asset uriNullPointerException
- when the path argument is nullCopyright © 2015 eXo Platform SAS. All rights reserved.