 # java-add-annotation --annotation javax.enterprise.context.ConversationScoped ;
 
 java-new-class --named ShoppingCartItem --targetPackage org.jboss.forge.hol.petstore.view.shopping ;
-java-new-field --named book --type org.jboss.forge.hol.petstore.model.Book ;
-constraint-add --constraint NotNull --onProperty book ;
+java-new-field --named item --type org.jboss.forge.hol.petstore.model.Item ;
 java-new-field --named quantity --type java.lang.Integer ;
+# Constraints
+constraint-add --constraint NotNull --onProperty item ;
 constraint-add --constraint NotNull --onProperty quantity ;
 constraint-add --constraint Min --onProperty quantity --value 1 ;
 

rest-generate-endpoints-from-entities --targets org.jboss.forge.hol.petstore.model.Category --contentType application/xml application/json ;
rest-generate-endpoints-from-entities --targets org.jboss.forge.hol.petstore.model.Product --contentType application/xml application/json ;
rest-generate-endpoints-from-entities --targets org.jboss.forge.hol.petstore.model.Item --contentType application/xml application/json ;



#  #########################  #
#  Generate Arquillian tests
#  #########################  #

# JSF Beacking Beans
# ##################
arquillian-create-test --targets org.jboss.forge.hol.petstore.view.CountryBean ;
arquillian-create-test --targets org.jboss.forge.hol.petstore.view.CustomerBean ;
arquillian-create-test --targets org.jboss.forge.hol.petstore.view.CategoryBean ;
arquillian-create-test --targets org.jboss.forge.hol.petstore.view.ProductBean ;
arquillian-create-test --targets org.jboss.forge.hol.petstore.view.ItemBean ;
arquillian-create-test --targets org.jboss.forge.hol.petstore.view.OrderLineBean ;
arquillian-create-test --targets org.jboss.forge.hol.petstore.view.PurchaseOrderBean ;

# REST Endpoints
# ##############
arquillian-create-test --targets org.jboss.forge.hol.petstore.rest.CountryEndpoint ;
arquillian-create-test --targets org.jboss.forge.hol.petstore.rest.CustomerEndpoint ;
arquillian-create-test --targets org.jboss.forge.hol.petstore.rest.CategoryEndpoint ;
arquillian-create-test --targets org.jboss.forge.hol.petstore.rest.ProductEndpoint ;
arquillian-create-test --targets org.jboss.forge.hol.petstore.rest.ItemEndpoint ;

# Services
# ##############
arquillian-create-test --targets org.jboss.forge.hol.petstore.service.CountryService ;
arquillian-create-test --targets org.jboss.forge.hol.petstore.service.CustomerService ;
arquillian-create-test --targets org.jboss.forge.hol.petstore.service.CategoryService ;
arquillian-create-test --targets org.jboss.forge.hol.petstore.service.ProductService ;
arquillian-create-test --targets org.jboss.forge.hol.petstore.service.ItemService ;
arquillian-create-test --targets org.jboss.forge.hol.petstore.service.PurchaseOrderService ;
arquillian-create-test --targets org.jboss.forge.hol.petstore.service.OrderLineService ;




java-new-class --named InventoryService --targetPackage org.jboss.forge.hol.petstore.service ;
java-new-class --named ShippingService --targetPackage org.jboss.forge.hol.petstore.service ;
java-new-class --named StatisticService --targetPackage org.jboss.forge.hol.petstore.service ;
java-new-interface --named ComputablePurchaseOrder --targetPackage org.jboss.forge.hol.petstore.service ;
cdi-new-decorator --named PurchaseOrderDecorator --delegate org.jboss.forge.hol.petstore.service.ComputablePurchaseOrder --targetPackage org.jboss.forge.hol.petstore.service ;


