Package org.jboss.shrinkwrap.descriptor.api.persistence20

Examples of org.jboss.shrinkwrap.descriptor.api.persistence20.PersistenceDescriptor.exportAsString()


                    .clazz(PersistenceDescriptor.class.getName())
                    .jtaDataSource("test-ds")
                .up();


        Asset persistenceAsset = new StringAsset(persistenceDescriptor.exportAsString());
        return base("jsf-jpa-test.war").addAsWebInfResource(persistenceAsset, "persistence.xml")
                .addClasses(DummyManagedBean.class)
                .addAsWebResource(new ClassLoaderAsset(
                        JPAInjectionTest.class.getPackage().getName().replace('.', '/').concat("/").concat("dummy.xhtml")), "dummy.xhtml");
View Full Code Here


          createProperty().
          name( property.getKey().toString() ).
          value( property.getValue().toString() );
    }

    return new StringAsset( pd.exportAsString() );
  }

  public static Asset manifest() {
    String manifest = Descriptors.create( ManifestDescriptor.class )
        .attribute( "Dependencies", "org.apache.commons.lang" )
View Full Code Here

   private void createDefaultConfig(FileResource<?> descriptor)
   {
      PersistenceDescriptor descriptorContents = Descriptors.create(PersistenceDescriptor.class)
               .version("2.0");
      descriptor.setContents(descriptorContents.exportAsString());
   }

   @Override
   public void saveConfig(final PersistenceDescriptor descriptor)
   {
View Full Code Here

                    .clazz(PersistenceDescriptor.class.getName())
                    .jtaDataSource("test-ds")
                .up();


        Asset persistenceAsset = new StringAsset(persistenceDescriptor.exportAsString());
        return base("jsf-jpa-test.war").addAsWebInfResource(persistenceAsset, "persistence.xml")
                .addClasses(DummyManagedBean.class)
                .addAsWebResource(new ClassLoaderAsset(
                        JPAInjectionTest.class.getPackage().getName().replace('.', '/').concat("/").concat("dummy.xhtml")), "dummy.xhtml");
View Full Code Here

   @Override
   protected void createDefaultConfig(FileResource<?> descriptor)
   {
      PersistenceDescriptor descriptorContents = Descriptors.create(PersistenceDescriptor.class)
               .version("2.0");
      descriptor.setContents(descriptorContents.exportAsString());
   }

   @Override
   public void saveConfig(final PersistenceDescriptor descriptor)
   {
View Full Code Here

   @Override
   protected void createDefaultConfig(FileResource<?> descriptor)
   {
      PersistenceDescriptor descriptorContents = Descriptors.create(PersistenceDescriptor.class)
               .version("2.0");
      descriptor.setContents(descriptorContents.exportAsString());
   }

   @Override
   public void saveConfig(final PersistenceDescriptor descriptor)
   {
View Full Code Here

                    .clazz(PersistenceDescriptor.class.getName())
                    .jtaDataSource("test-ds")
                .up();


        Asset persistenceAsset = new StringAsset(persistenceDescriptor.exportAsString());
        return base("jsf-jpa-test.war").addAsWebInfResource(persistenceAsset, "persistence.xml")
                .addPackage(JPAInjectionTest.class.getPackage())
                .addAsWebResource(new ClassLoaderAsset(
                        JPAInjectionTest.class.getPackage().getName().replace('.', '/').concat("/").concat("dummy.xhtml")), "dummy.xhtml");
View Full Code Here

   @Override
   protected void createDefaultConfig(FileResource<?> descriptor)
   {
      PersistenceDescriptor descriptorContents = Descriptors.create(PersistenceDescriptor.class)
               .version("2.1");
      descriptor.setContents(descriptorContents.exportAsString());
   }

   @Override
   public void saveConfig(final PersistenceDescriptor descriptor)
   {
View Full Code Here

   @Override
   protected void createDefaultConfig(FileResource<?> descriptor)
   {
      PersistenceDescriptor descriptorContents = Descriptors.create(PersistenceDescriptor.class)
               .version("2.1");
      descriptor.setContents(descriptorContents.exportAsString());
   }

   @Override
   public void saveConfig(final PersistenceDescriptor descriptor)
   {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.