Examples of Item


Examples of org.jnode.configure.Screen.Item

            }
            String changed = child.getAttribute(CHANGED, null);
            if (script.getProperty(propName) == null) {
                error("Use of undeclared property '" + propName + "'", child);
            }
            screen.addItem(new Item(script, propName, unindent(child.getContent()), changed));
        }
    }
View Full Code Here

Examples of org.lazan.t5.stitch.demo.entities.Item

  private void addItems(Map<String, Category> catCache, String[] items) {
    for (String itemString : items) {
      String[] row = itemString.split("\\|");

      Category category = catCache.get(row[0]);
      Item item = new Item();
      item.setCategory(category);
      item.setName(row[1]);
      item.setPrice(new BigDecimal(row[2]));
      item.setDescription(row[3]);
      session.save(item);
    }
  }
View Full Code Here

Examples of org.moparscape.msc.gs.model.Item

        if (item.getDef().isMembers() && !World.isMembers()) {
          owner.getActionSender().sendMessage(
              "The members item vanishes!");
          return;
        }
        world.registerItem(new Item(item.id, owner.getX(),
            owner.getY(), item.amount, owner));
        matchRunning = false;
      }
    });
  }
View Full Code Here

Examples of org.mule.jaxb.model.Item

    public static final String ITEM_XML = "<item><code>1234</code><description>Vacuum Cleaner</description><in-stock>true</in-stock></item>";

    public void testCustomTransform() throws Exception
    {
        MuleMessage message = new DefaultMuleMessage(ITEM_XML, muleContext);
        Item item = (Item) message.getPayload(DataTypeFactory.create(Item.class));

        assertNotNull(item);
        assertEquals("1234", item.getCode());
        assertEquals("Vacuum Cleaner", item.getDescription());
        assertTrue(item.isInStock());

        //and back again
        Document doc = (Document) message.getPayload(DataTypeFactory.create(Document.class));
       
        assertNotNull(doc);
View Full Code Here

Examples of org.mule.json.model.Item

    public void testCustomTransform() throws Exception
    {
        MuleMessage message = new DefaultMuleMessage(ITEM_JSON, muleContext);

        Item item = (Item) message.getPayload(DataTypeFactory.create(Item.class));
        assertNotNull(item);
        assertEquals("1234", item.getCode());
        assertEquals("Vacuum Cleaner", item.getDescription());
        assertTrue(item.isInStock());

        //and back again
        message = new DefaultMuleMessage(item, muleContext);
        String json = message.getPayload(DataType.STRING_DATA_TYPE);
        assertNotNull(json);
View Full Code Here

Examples of org.multibit.mbm.client.domain.model.model.Item

    // Configure the Cart with Items
    Cart customerCart = customer.getCart();
    customerCart.setId(1L);

    Item book1 = DatabaseLoader.buildBookItemCryptonomicon();
    book1.setId(1L);
    Item book2 = DatabaseLoader.buildBookItemQuantumThief();
    book2.setId(2L);
    Item book3 = DatabaseLoader.buildBookItemCompleteWorks();
    book3.setId(3L);
    Item book4 = DatabaseLoader.buildBookItemPlumbing();
    book4.setId(4L);

    // Include some books into the Customer Cart
    customerCart.setItemQuantity(book1,1);
    customerCart.setItemQuantity(book2,2);

    // Configure Cart DAO
    when(cartDao.saveOrUpdate(customerCart)).thenReturn(customerCart);

    // Configure Item DAO
    when(itemReadService.getBySKU(book1.getSKU())).thenReturn(Optional.of(book1));
    when(itemReadService.getBySKU(book2.getSKU())).thenReturn(Optional.of(book2));
    when(itemReadService.getBySKU(book3.getSKU())).thenReturn(Optional.of(book3));
    when(itemReadService.getBySKU(book4.getSKU())).thenReturn(Optional.of(book4));

    testObject.setCartDao(cartDao);
    testObject.setItemReadService(itemReadService);

    // Configure resources
View Full Code Here

Examples of org.mybatis.jpetstore.domain.Item

    Order order = orderMapper.getOrder(orderId);
    order.setLineItems(lineItemMapper.getLineItemsByOrderId(orderId));

    for (int i = 0; i < order.getLineItems().size(); i++) {
      LineItem lineItem = (LineItem) order.getLineItems().get(i);
      Item item = itemMapper.getItem(lineItem.getItemId());
      item.setQuantity(itemMapper.getInventoryQuantity(lineItem.getItemId()));
      lineItem.setItem(item);
    }

    return order;
  }
View Full Code Here

Examples of org.olat.ims.qti.container.qtielements.Item

      SectionContext sct = act.getCurrentSectionContext();
      ItemContext itc = null;
      if (sct != null && !ai.isSectionPage()) {
        itc = sct.getCurrentItemContext();
        if (itc != null) {
          Item item = itc.getQtiItem();
          if (item.getQTIIdent().startsWith("QTIEDIT:FLA:")) displayForm = false;
        }
      }
     
      sb.append("<form action=\"");
      ubu.buildURI(sb, new String[] { VelocityContainer.COMMAND_ID }, new String[] { "sitse" });
View Full Code Here

Examples of org.olat.ims.qti.editor.beecom.objects.Item

   * @param trans
   * @return New Multiple Choice item.
   */
  public static Item createMCItem(Translator trans) {
    // create item
    Item newItem = new Item();
    newItem.setIdent(EDITOR_IDENT+":"+ITEM_TYPE_MC+":"+String.valueOf(CodeHelper.getRAMUniqueID()));
    newItem.setTitle(trans.translate("editor.newquestion"));
    newItem.setLabel("");

    // conrols
    Control control = new Control();
    ArrayList controls = new ArrayList();
    controls.add(control);
    newItem.setItemcontrols(controls);
   
    // pepare question
    ChoiceQuestion question = new ChoiceQuestion();
    question.setLable(trans.translate("editor.newquestion"));
    question.getQuestion().getElements().add(new Mattext(trans.translate("editor.newquestiontext")));
    question.setType(Question.TYPE_MC);
    question.setSingleCorrect(true);
    question.setSingleCorrectScore(1);
   
    ChoiceResponse newChoice = new ChoiceResponse();
    newChoice.getContent().add(new Mattext(trans.translate("editor.newresponsetext")));
    newChoice.setCorrect(true);
    newChoice.setPoints(1);
    question.getResponses().add(newChoice);
    newItem.setQuestion(question);
   
    QTIEditHelper.setFeedbackMastery(newItem, "");
    QTIEditHelper.setFeedbackFail(newItem, "")

    return newItem;
View Full Code Here

Examples of org.olat.modules.webFeed.models.Item

   * @see org.olat.core.gui.control.generic.dtabs.Activateable#activate(org.olat.core.gui.UserRequest, java.lang.String)
   */
  public void activate(UserRequest ureq, String itemId) {
    int index = feed.getItemIds().indexOf(itemId);
    if (index >= 0) {
      Item item = feed.getItems().get(index);
      itemsCtr.activate(ureq, item);
    }
  }
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.