Package org.jboss.resteasy.keystone.server

Examples of org.jboss.resteasy.keystone.server.Loader


      app.getRoles().create(adminRole);

      app.getProjects().addUserRole(project.getId(), admin.getId(), adminRole.getId());

      // Test export/import
      System.out.println(new Loader().export(app.getCache()));

      try
      {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         new Loader().export(app.getCache(), baos);
         ByteArrayInputStream bios = new ByteArrayInputStream(baos.toByteArray());
         app.getCache().clear();
         new Loader().importStore(bios, app.getCache());
      }
      catch (Exception e)
      {
         e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
      }
View Full Code Here


         return;
      }
      String path = args[0];
      String name = args[1];
      Cache cache = new DefaultCacheManager(path).getCache(name);
      new Loader().export(cache, System.out);
      cache.stop();
   }
View Full Code Here

         return;
      }
      String path = args[0];
      String name = args[1];
      Cache cache = new DefaultCacheManager(path).getCache(name);
      new Loader().importStore(System.in, cache);
      cache.stop();
   }
View Full Code Here

      app.getRoles().create(adminRole);

      app.getProjects().addUserRole(project.getId(), admin.getId(), adminRole.getId());

      // Test export/import
      System.out.println(new Loader().export(app.getCache()));

      try
      {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         new Loader().export(app.getCache(), baos);
         ByteArrayInputStream bios = new ByteArrayInputStream(baos.toByteArray());
         app.getCache().clear();
         new Loader().importStore(bios, app.getCache());
      }
      catch (Exception e)
      {
      }
   }
View Full Code Here

      clearCache();
      startDeployment();
      Assert.assertEquals(0, app.getCache().size());
      init();
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      new Loader().export(app.getCache(), baos);
      app.getCache().clear();
      stopDeployment();

      startDeployment();
      Assert.assertEquals(0, app.getCache().size());
      ByteArrayInputStream bios = new ByteArrayInputStream(baos.toByteArray());
      new Loader().importStore(bios, app.getCache());
      stopDeployment();
      startDeployment();
      Assert.assertTrue(0 < app.getCache().size());

View Full Code Here

TOP

Related Classes of org.jboss.resteasy.keystone.server.Loader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.