juzu.plugin.asset

## Class AssetController

- java.lang.Object
- - juzu.plugin.asset.AssetController

-     public class AssetController
      extends Object

  The asset controller.
  Author:
    Julien Viet

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AssetController(juzu.impl.asset.AssetManager manager)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `url(AssetLocation location, String uri)` Returns the URL of an asset.
    `String` | `url(String path)` Returns the URL of an asset located in the assets package of the application.

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

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

- - ### Constructor Detail

    - #### AssetController

          @Inject
          public AssetController(juzu.impl.asset.AssetManager manager)

  - ### Method Detail

    - #### url

          public String url(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.

      Parameters:
        `path` - the path
      Returns:
        the asset url
      Throws:
        `NullPointerException` - when the path argument is null

    - #### url

          public String url(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.

      Parameters:
        `location` - the asset location
        `uri` - the asset uri
      Returns:
        the asset url
      Throws:
        `NullPointerException` - when the path argument is null

Copyright © 2014 eXo Platform SAS. All rights reserved.