congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
AssetDeployment.deploy
Code IndexAdd Tabnine to your IDE (free)

How to use
deploy
method
in
juzu.impl.asset.AssetDeployment

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

origin: juzu/juzu

@PostConstruct
public void start() throws Exception {
 //
 URL url = AjaxService.class.getClassLoader().getResource("juzu/impl/plugin/ajax/script.js");
 if (url == null) {
  throw new Exception("Not found script.js");
 }
 //
 manager.createDeployment().addAsset(
   "juzu.ajax",
   "script",
   AssetLocation.APPLICATION,
   "/juzu/impl/plugin/ajax/script.js",
   null,
   null, // Think about providing a minified version
   null,
   url,
   "jquery").deploy();
 //
 Map<String, ControllerHandler> table = new HashMap<String, ControllerHandler>();
 for (ControllerHandler cm : controllerPlugin.getDescriptor().getHandlers()) {
  Ajax ajax = cm.getMethod().getAnnotation(Ajax.class);
  if (ajax != null) {
   table.put(cm.getName(), cm);
  }
 }
 //
 this.table = table;
}
origin: org.juzu/juzu-core

@PostConstruct
public void start() throws Exception {
 //
 URL url = AjaxService.class.getClassLoader().getResource("juzu/impl/plugin/ajax/script.js");
 if (url == null) {
  throw new Exception("Not found script.js");
 }
 //
 manager.createDeployment().addAsset(
   "juzu.ajax",
   "script",
   AssetLocation.APPLICATION,
   "/juzu/impl/plugin/ajax/script.js",
   null,
   null, // Think about providing a minified version
   null,
   url,
   "jquery").deploy();
 //
 Map<String, ControllerHandler> table = new HashMap<String, ControllerHandler>();
 for (ControllerHandler cm : controllerPlugin.getDescriptor().getHandlers()) {
  Ajax ajax = cm.getMethod().getAnnotation(Ajax.class);
  if (ajax != null) {
   table.put(cm.getName(), cm);
  }
 }
 //
 this.table = table;
}
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: 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

@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: org.juzu/juzu-core

deployment.deploy();
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

deployment.deploy();
origin: org.juzu/juzu-core

 @Test
 public void testUndeploy() {
  AssetManager mgr = new AssetManager("", ResourceResolver.NULL_RESOLVER);
  AssetDeployment fooDepl = mgr.createDeployment();
  fooDepl.addAsset("foo", "script", AssetLocation.APPLICATION, "foo.js", null, null, null, DUMMY_URL, "bar");
  fooDepl.deploy();
  AssetDeployment barDepl = mgr.createDeployment();
  barDepl.addAsset("bar", "script", AssetLocation.APPLICATION, "bar.js", null, null, null, DUMMY_URL);
  barDepl.deploy();
  List<Asset> asset = Tools.list(mgr.resolveAssets(Collections.singletonList("foo")));
  assertEquals(2, asset.size());
  assertEquals("bar", asset.get(0).getId());
  assertEquals("foo", asset.get(1).getId());
  barDepl.undeploy();
  try {
   mgr.resolveAssets(Collections.singletonList("foo"));
   fail();
  }
  catch (IllegalArgumentException expected) {
  }
 }
}
origin: juzu/juzu

 @Test
 public void testUndeploy() {
  AssetManager mgr = new AssetManager("", ResourceResolver.NULL_RESOLVER);
  AssetDeployment fooDepl = mgr.createDeployment();
  fooDepl.addAsset("foo", "script", AssetLocation.APPLICATION, "foo.js", null, null, null, DUMMY_URL, "bar");
  fooDepl.deploy();
  AssetDeployment barDepl = mgr.createDeployment();
  barDepl.addAsset("bar", "script", AssetLocation.APPLICATION, "bar.js", null, null, null, DUMMY_URL);
  barDepl.deploy();
  List<Asset> asset = Tools.list(mgr.resolveAssets(Collections.singletonList("foo")));
  assertEquals(2, asset.size());
  assertEquals("bar", asset.get(0).getId());
  assertEquals("foo", asset.get(1).getId());
  barDepl.undeploy();
  try {
   mgr.resolveAssets(Collections.singletonList("foo"));
   fail();
  }
  catch (IllegalArgumentException expected) {
  }
 }
}
juzu.impl.assetAssetDeploymentdeploy

Javadoc

Attempt to deploy.

Popular methods of AssetDeployment

  • addAsset
  • <init>
  • undeploy
    Undeploy.

Popular in Java

  • Making http requests using okhttp
  • getSharedPreferences (Context)
  • onRequestPermissionsResult (Fragment)
  • onCreateOptionsMenu (Activity)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • JTable (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now