code: public void updateItemState(ItemState itemState) throws RepositoryException
     {
        if (itemState.isDeleted())
        {
           throw new RepositoryException("Illegal state DELETED. Use delete(...) method");
        }
  
        changesLog.add(itemState);
     }
docs: Updates (adds or modifies) item state in the session transient storage without creation ItemImpl.
  
  @param itemState
  - the state
  @throws RepositoryException