Examples of removeItem()


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

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

Examples of forestry.core.inventory.manipulators.InventoryManipulator.removeItem()

   * @param filter EnumItemType to match against
   * @return An ItemStack
   */
  public static ItemStack removeOneItem(IInventory inv, IStackFilter filter) {
    InventoryManipulator im = InventoryManipulator.get(inv);
    return im.removeItem(filter);
  }

  /**
   * Removes and returns a single item from the inventory that matches the
   * filter.
 
View Full Code Here

Examples of games.stendhal.server.util.ItemCollection.removeItem()

    final ItemCollection itemsTodo = new ItemCollection();

    itemsTodo.addFromQuestStateString(player.getQuest(questSlot));

    if (player.drop(itemName, itemCount)) {
      if (itemsTodo.removeItem(itemName, itemCount)) {
        result = true;
      }
    } else {
      /*
       * handle the cases the player has part of the items or all divided
View Full Code Here

Examples of games.stendhal.server.util.ItemCollection.removeItem()

          final int n = Math.min(itemCount, quantity);

          if (player.drop(itemName, n)) {
            itemCount -= n;

            if (itemsTodo.removeItem(itemName, n)) {
              result = true;
            }
          }

          if (itemCount == 0) {
View Full Code Here

Examples of javax.jcr.Session.removeItem()

        };
        slingId = UUID.randomUUID().toString();
        Session l = RepositoryProvider.instance().getRepository()
                .loginAdministrative(null);
        try {
            l.removeItem("/var");
            l.save();
            l.logout();
        } catch (Exception e) {
            l.refresh(false);
            l.logout();
View Full Code Here

Examples of javax.jcr.Session.removeItem()

    public void activateAll(boolean resetRepo) throws Exception {
        if (resetRepo) {
            Session l = RepositoryProvider.instance().getRepository()
                    .loginAdministrative(null);
            try {
                l.removeItem("/var");
                l.save();
                l.logout();
            } catch (Exception e) {
                l.refresh(false);
                l.logout();
View Full Code Here

Examples of javax.jcr.Session.removeItem()

        try {
            if (replicationPackage != null) {
                session = getSession(resourceResolver);
                for (String path : replicationPackage.getPaths()) {
                    if (session.itemExists(path)) {
                        session.removeItem(path);
                    }
                }
                session.save();
                return true;
            }
View Full Code Here

Examples of javax.jcr.Session.removeItem()

                }

            }

        } finally {
            session.removeItem("/content");
            session.save();
            session.logout();
        }
    }
View Full Code Here

Examples of javax.jcr.Session.removeItem()

            Node content = session.getRootNode().getNode("content");
            assertThat(content.getPrimaryNodeType().getName(), equalTo("sling:Folder"));

        } finally {
            session.removeItem("/content");
            session.save();
            session.logout();

            IOUtils.closeQuietly(cndInput);
        }
View Full Code Here

Examples of javax.jcr.Session.removeItem()

            content = session.getRootNode().getNode("content");
            assertThat(content.getPrimaryNodeType().getName(), equalTo("nt:folder"));

        } finally {
            session.removeItem("/content");
            session.save();
            session.logout();

            IOUtils.closeQuietly(cndInput);
        }
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.