Performs actual item data deleting.

@param item
to delete
@param con
@param sizeHandler
@throws RepositoryException
@throws InvalidItemStateException
if the item is already deleted
499920
protected void doDelete(final ItemData item, final WorkspaceStorageConnection con, ChangedSizeHandler sizeHandler)
      throws RepositoryException, InvalidItemStateException
   {

      if (item.isNode())
      {
         con.delete((NodeData)item);
      }
      else
      {
         con.delete((PropertyData)item, sizeHandler);
      }
   }
665962
public void deleteItem(String itemId) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
        Collection<String> items = new ArrayList<>(1);
        items.add(itemId);
        deleteItem(items);
    }
1243187
@Override
  public void delete(ApiType obj) {
    String key = keyFunc.apply(obj);
    lock.lock();
    try {
      boolean exists = this.items.containsKey(key);
      if (exists) {
        this.deleteFromIndices(this.items.get(key), key);
        this.items.remove(key);
      }
    } finally {
      lock.unlock();
    }
  }
1312328
@Override
    @SuppressWarnings("deprecation")
    public boolean canRemoveItem( String itemName ) {
        CheckArg.isNotNull(itemName, "itemName");
        Name childName = context.getValueFactories().getNameFactory().create(itemName);
        return nodeTypes().canRemoveItem(this.name, null, childName, true);
    }
923532
protected boolean checkValid() throws InvalidItemStateException
   {
      try
      {
         session.checkLive();
      }
      catch (RepositoryException e)
      {
         throw new InvalidItemStateException("This kind of operation is forbidden after a session.logout().", e);
      }

      if (data == null)
      {
         throw new InvalidItemStateException("Invalid item state. Item was removed or discarded.");
      }

      session.updateLastAccessTime();
      return true;
   }
1069855
public String deleteItem(String iid, DateTime eventTime)
      throws ExecutionException, InterruptedException, IOException {
    return createEvent(deleteItemAsFuture(iid, eventTime));
  }
406751
void rollback(ItemData item) throws InvalidItemStateException, RepositoryException
   {
      // remove from changes log (Session pending changes)
      PlainChangesLog slog = changesLog.pushLog(item.getQPath());
      SessionChangesLog changes = new SessionChangesLog(slog.getAllStates(), session);

      for (Iterator<ItemImpl> removedIter = invalidated.iterator(); removedIter.hasNext();)
      {
         ItemImpl removed = removedIter.next();

         QPath removedPath = removed.getLocation().getInternalPath();
         ItemState rstate = changes.getItemState(removedPath);

         if (rstate != null)
         {
            if (rstate.isRenamed() || rstate.isPathChanged())
            {
               // find DELETED
               rstate = changes.findItemState(rstate.getData().getIdentifier(), false, new int[]{ItemState.DELETED});
               if (rstate == null)
               {
                  continue;
               }
            }

            NodeData parent = (NodeData)transactionableManager.getItemData(rstate.getData().getParentIdentifier());
            if (parent != null)
            {
               ItemData persisted =
                  transactionableManager.getItemData(parent, rstate.getData().getQPath().getEntries()[rstate.getData()
                     .getQPath().getEntries().length - 1], ItemType.getItemType(rstate.getData()));

               if (persisted != null)
               {
                  // reload item data
                  removed.loadData(persisted);
               }
            } // else it's transient item
         }
         else if (removed.getData() != null)
         {
            // No states for items left usecase
            ItemData persisted = transactionableManager.getItemData(removed.getData().getIdentifier());

            if (persisted != null)
            {
               // reload item data
               removed.loadData(persisted);
            }
         }

         removedIter.remove();
      }
   }
849668
public void removeItem(JQMListItem item) {
        if (item != null) {
            items.remove(item);
            list.remove(item);
        }
    }
315061
public void remove(@NonNull T object) {
        synchronized (mLock) {
            final int position = getPosition(object);
            final boolean removed = mObjects.remove(object);
            if (removed) {
                notifyItemRemoved(position);
            }
        }

    }
54087
public int submitSingle(T item) {
        if (Objects.isNull(item))
            return 0;
        synchronized (this.dataList) {
            this.dataList.add(item);
            setLastDataTimestamp();
            if (this.dataList.size() >= this.bulkSize)
                flush();
            return 1;
        }
    }
412283
@Deprecated
	@Override
	public void remove(final WComponent item) {
		if (item instanceof MenuItem) {
			removeMenuItem((MenuItem) item);
		}
	}
202616
protected TransientItemData copyItemDataDelete(final ItemData item) throws RepositoryException
   {

      if (item == null)
      {
         return null;
      }

      // make a copy
      if (item.isNode())
      {
         final NodeData node = (NodeData)item;

         // the node ACL can't be are null as ACL manager does care about this
         final AccessControlList acl = node.getACL();
         if (acl == null)
         {
            throw new RepositoryException("Node ACL is null. " + node.getQPath().getAsString() + " "
               + node.getIdentifier());
         }

         return new TransientNodeData(node.getQPath(), node.getIdentifier(), node.getPersistedVersion(),
            node.getPrimaryTypeName(), node.getMixinTypeNames(), node.getOrderNumber(), node.getParentIdentifier(), acl);
      }

      // else - property
      final PropertyData prop = (PropertyData)item;

      // make a copy, value wil be null for deleting items
      TransientPropertyData newData =
         new TransientPropertyData(prop.getQPath(), prop.getIdentifier(), prop.getPersistedVersion(), prop.getType(),
            prop.getParentIdentifier(), prop.isMultiValued());

      return newData;
   }
1280873
public void remove(ItemState item)
   {
      if (item.isNode())
      {
         remove(item.getData().getQPath());
      }
      else 
      {
         removeProperty(item, -1);
      }
   }
297737
private function process_delete_request($item) {
        global $DB;

        $gradeitem = \grade_item::fetch(array('id' => $item->id));
        if (($gbs = gradebookservices::find_ltiservice_gradebookservice_for_lineitem($item->id)) == false) {
            throw new \Exception(null, 403);
        }
        if (!$gradeitem->delete('mod/ltiservice_gradebookservices')) {
            throw new \Exception(null, 500);
        } else {
            $sqlparams = array();
            $sqlparams['id'] = $gbs->id;
            if (!$DB->delete_records('ltiservice_gradebookservices', $sqlparams)) {
                throw new \Exception(null, 500);
            }
        }
    }
529826
protected final void itemHasBeenRestored(AbstractItem item)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "itemHasBeenRestored", item);

        super.itemHasBeenRestored(item);
        _setWatermarks((ItemStream)item);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "itemHasBeenRestored");
    }
837514
@Override
    public void destroy(Contextual<?> contextual) {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "destroy(Contextual)", new Object[] { contextual, this });

        final Map<String, InstanceAndContext<?>> storage = getStorage(false);

        if (storage != null) {
            final String contextId = getContextualId(contextual);

            InstanceAndContext<?> data = this.getByContextual(storage, contextual);

            if (data != null) {
                storage.remove(contextId);
                destroyItem(contextId, data);
            }
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, "destroy(Contextual)");
    }
859273
public static <T> void fire(final HasItemRemovedHandlers<T> source, T item) {
        if (TYPE != null) {
            ItemRemovedEvent<T> event = new ItemRemovedEvent<T>(item);
            source.fireEvent(event);
        }
    }