Package de.nava.informa.core

Examples of de.nava.informa.core.ChannelIF.removeItem()


  }

  public void testCreatedItemAddOne() throws MalformedURLException {
    ChannelIF channel = prepare();
    ItemIF firstItem = (ItemIF) channel.getItems().iterator().next();
    channel.removeItem(firstItem);
    assertEquals(7, channel.getItems().size());
    builder.createItem(channel, "another one", "9", new URL("http://9.net/"));
    assertEquals(8, channel.getItems().size());
    Iterator it = channel.getItems().iterator();
    int idx = 2;
View Full Code Here


   * @param item item to delete.
   */
  public final void deleteItem(ItemIF item) {
    if (item instanceof Item) {
      final ChannelIF parent = ((Item) item).getParent();
      parent.removeItem(item);
    }

    items.remove(new Long(item.getId()));
    item.setId(-1);
  }
View Full Code Here

    // Find the channel and remove item from it
    final ChannelIF channel = item.getChannel();
    if (channel != null) {
      HibernateUtil.lock(channel, session);
      channel.removeItem(item);
    } else {
      LOG.severe("Item didn't belong to any channel: " + item);
    }

    // Delete 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.