@Override
    public boolean addItem(Item item) {
        //TODO: koordinovane ulozenie rozlozeneho itemu.
        int shelfCap = Shelf.DEFAULT_CAPACITY;
        int itemAmount = item.getAmount();
        List<IShelf> shelfs = new ArrayList();
        //rozlozenie itemu.
        int numofShelfs = itemAmount / shelfCap + 1;
        try {
            IItem it;
            for (int i = 0; i < numofShelfs; i++) {
                if (itemAmount > shelfCap) {
                    it = new Item(item.getId() + i, shelfCap, item.getType(),
                            item.getDescription(), item.getExpiration(), null);
                    shelfs.add(setPosition(it)); //ulozenie daneho itemu do shelfu (PREPARE !!)
                    itemAmount -= shelfCap;
                } else if (itemAmount > 0) {
                    it = new Item(item.getId() + i, itemAmount, item.getType(),
                            item.getDescription(), item.getExpiration(), null);
                    shelfs.add(setPosition(it)); //ulozenie itemu do shelfu (PREPARE !!)  
                    itemAmount -= shelfCap;
                }
            }
        } catch (TaskFailureException e) {
            //abort v pripade neuspechu
            for (IShelf shelf : shelfs) {
                shelf.abort();
            }
            return false;
        }
        //comit coordinovanej operacie
        for (IShelf shelf : shelfs) {
            shelf.commit();
        }
        shelfs.clear();
        return true;
    }