package info.bukova.isspst.ui.main.invoicing;

import info.bukova.isspst.data.Invoicing;
import org.springframework.security.access.AccessDeniedException;
import org.zkoss.bind.annotation.Init;

import java.util.ArrayList;
import java.util.List;

public class InvoicingMaterialArchiveList extends InvoicingList {

    @Init(superclass = true)
    public void initInvoicingMaterialArchiveList()
    {
        formZul = "/main/invoicing/material/invHeadForm.zul";
    }

    @Override
    protected List<Invoicing> getListFromService() {
        try
        {
            return invoicingService.getMaterialArchiveList();
        }
        catch (AccessDeniedException e)
        {
            e.printStackTrace();
            return new ArrayList<Invoicing>();
        }
    }
}
