Codota Logo
juzu.impl.asset
Code IndexAdd Codota to your IDE (free)

How to use juzu.impl.asset

Best Java code snippets using juzu.impl.asset (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: org.juzu/juzu-core

/**
 * Undeploy.
 */
public void undeploy() {
 if (deployed) {
  deployed = false;
  manager.undeploy(this);
 }
}
origin: org.juzu/juzu-core

/**
 * <p>Returns the URL of an asset located in the assets package of the application.</p>
 *
 * <p>If the controller is not under the scope of a request, null is returned.</p>
 *
 * @param path the path
 * @return the asset url
 * @throws NullPointerException when the path argument is null
 */
public String byPath(String path) throws NullPointerException {
 return AssetServer.renderAssetURLByPath(AssetLocation.APPLICATION, path);
}
origin: org.juzu/juzu-core

public AssetNode(String id, String type, AssetLocation location, String value, Boolean header, String minified, Integer maxAge, URL resource, Set<String> iDependOn) {
 //
 this.id = id;
 this.location = location;
 this.value = value;
 this.header = header;
 this.minified = minified;
 this.asset = new Asset(id, type, header, location, value, minified, maxAge);
 this.resource = resource;
 this.iDependOn = iDependOn;
}
origin: org.juzu/juzu-core

@Test
public void testCycle2() {
 AssetManager mgr = new AssetManager("", ResourceResolver.NULL_RESOLVER);
 assertTrue(mgr.createDeployment().addAsset("foo", "script", AssetLocation.APPLICATION, "foo.js", null, null, null, DUMMY_URL, "bar").deploy());
 assertTrue(mgr.createDeployment().addAsset("bar", "script", AssetLocation.APPLICATION, "bar.js", null, null, null, DUMMY_URL, "juu").deploy());
 assertFalse(mgr.createDeployment().addAsset("juu", "script", AssetLocation.APPLICATION, "juu.js", null, null, null, DUMMY_URL, "foo").deploy());
}
origin: org.juzu/juzu-core

@Override
public void init() throws ServletException {
 AssetServer server = (AssetServer)getServletContext().getAttribute("asset.server");
 if (server == null) {
  server = new AssetServer();
  getServletContext().setAttribute("asset.server", server);
 }
}
origin: juzu/juzu

/**
 * Attempt to deploy.
 *
 * @return if the deployment was succesfully deployed
 */
public boolean deploy() {
 return deployed = manager.deploy(this);
}
origin: org.juzu/juzu-core

/**
 * Generate an asset URL from the specified id.
 *
 * @param id the asset id
 * @return null if the asset id does not exists
 * @throws NullPointerException if the asset id is null
 */
public String byId(String id) throws NullPointerException {
 return AssetServer.renderAssetURLById(id);
}
origin: org.juzu/juzu-core

public AssetDeployment createDeployment() {
 return new AssetDeployment(this);
}
origin: org.juzu/juzu-core

@Test
public void testCycle1() {
 AssetManager mgr = new AssetManager("", ResourceResolver.NULL_RESOLVER);
 assertTrue(mgr.createDeployment().addAsset("foo", "script", AssetLocation.APPLICATION, "foo.js", null, null, null, DUMMY_URL, "bar").deploy());
 assertFalse(mgr.createDeployment().addAsset("bar", "script", AssetLocation.APPLICATION, "bar.js", null, null, null, DUMMY_URL, "foo").deploy());
}
origin: juzu/juzu

@Override
public void init() throws ServletException {
 AssetServer server = (AssetServer)getServletContext().getAttribute("asset.server");
 if (server == null) {
  server = new AssetServer();
  getServletContext().setAttribute("asset.server", server);
 }
}
origin: juzu/juzu

/**
 * <p>Returns the URL of an asset located in the assets package of the application.</p>
 *
 * <p>If the controller is not under the scope of a request, null is returned.</p>
 *
 * @param path the path
 * @return the asset url
 * @throws NullPointerException when the path argument is null
 */
public String byPath(String path) throws NullPointerException {
 return AssetServer.renderAssetURLByPath(AssetLocation.APPLICATION, path);
}
origin: juzu/juzu

/**
 * Undeploy.
 */
public void undeploy() {
 if (deployed) {
  deployed = false;
  manager.undeploy(this);
 }
}
origin: juzu/juzu

public AssetNode(String id, String type, AssetLocation location, String value, Boolean header, String minified, Integer maxAge, URL resource, Set<String> iDependOn) {
 //
 this.id = id;
 this.location = location;
 this.value = value;
 this.header = header;
 this.minified = minified;
 this.asset = new Asset(id, type, header, location, value, minified, maxAge);
 this.resource = resource;
 this.iDependOn = iDependOn;
}
origin: org.juzu/juzu-core

/**
 * Attempt to deploy.
 *
 * @return if the deployment was succesfully deployed
 */
public boolean deploy() {
 return deployed = manager.deploy(this);
}
origin: juzu/juzu

/**
 * Generate an asset URL from the specified id.
 *
 * @param id the asset id
 * @return null if the asset id does not exists
 * @throws NullPointerException if the asset id is null
 */
public String byId(String id) throws NullPointerException {
 return AssetServer.renderAssetURLById(id);
}
origin: juzu/juzu

public AssetDeployment createDeployment() {
 return new AssetDeployment(this);
}
origin: juzu/juzu

@Test
public void testCycle2() {
 AssetManager mgr = new AssetManager("", ResourceResolver.NULL_RESOLVER);
 assertTrue(mgr.createDeployment().addAsset("foo", "script", AssetLocation.APPLICATION, "foo.js", null, null, null, DUMMY_URL, "bar").deploy());
 assertTrue(mgr.createDeployment().addAsset("bar", "script", AssetLocation.APPLICATION, "bar.js", null, null, null, DUMMY_URL, "juu").deploy());
 assertFalse(mgr.createDeployment().addAsset("juu", "script", AssetLocation.APPLICATION, "juu.js", null, null, null, DUMMY_URL, "foo").deploy());
}
origin: org.juzu/juzu-core

 /**
  * <p>Returns the URL of an asset.</p>
  *
  * <p>If the controller is not under the scope of a request, null is returned.</p>
  *
  * @param location the asset location
  * @param uri the asset uri
  * @return the asset url
  * @throws NullPointerException when the path argument is null
  */
 public String byPath(AssetLocation location, String uri) throws NullPointerException {
  return AssetServer.renderAssetURLByPath(location, uri);
 }
}
origin: juzu/juzu

@Test
public void testCycle1() {
 AssetManager mgr = new AssetManager("", ResourceResolver.NULL_RESOLVER);
 assertTrue(mgr.createDeployment().addAsset("foo", "script", AssetLocation.APPLICATION, "foo.js", null, null, null, DUMMY_URL, "bar").deploy());
 assertFalse(mgr.createDeployment().addAsset("bar", "script", AssetLocation.APPLICATION, "bar.js", null, null, null, DUMMY_URL, "foo").deploy());
}
origin: juzu/juzu

 /**
  * <p>Returns the URL of an asset.</p>
  *
  * <p>If the controller is not under the scope of a request, null is returned.</p>
  *
  * @param location the asset location
  * @param uri the asset uri
  * @return the asset url
  * @throws NullPointerException when the path argument is null
  */
 public String byPath(AssetLocation location, String uri) throws NullPointerException {
  return AssetServer.renderAssetURLByPath(location, uri);
 }
}
juzu.impl.asset

Most used classes

  • Asset
    Representation of an asset at runtime, an asset can be a reference or a value. Asset references are
  • AssetDeployment
  • AssetManager
  • AssetGraph
  • AssetManagerTestCase
  • AssetNode,
  • AssetResource,
  • AssetServer,
  • AssetServlet,
  • NormalizeJSReader
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now