package com.acme.vcutil.supplier;

import com.acme.model.domain.ad.entity.Contact;
import com.acme.structure.util.ConversionUtil;
import com.acme.structure.util.datalist.SimpleStaticListSupplier;
import com.acme.structure.util.datalist.StaticData;
import com.acme.util.ui.UIHelper;

public class ContactTypeSupplier extends SimpleStaticListSupplier
{
    public void loadList()
    {
        clearList();
        list.add(new StaticData(Contact.TYPE_TELEPHONE, UIHelper.getStringResourceItem("AD", "contacttypesupplier_telephone")));
        list.add(new StaticData(Contact.TYPE_EMAIL, UIHelper.getStringResourceItem("AD", "contacttypesupplier_email")));
        list.add(new StaticData(Contact.TYPE_FAX, UIHelper.getStringResourceItem("AD", "contacttypesupplier_fax")));
        list.add(new StaticData(Contact.TYPE_WEB, UIHelper.getStringResourceItem("AD", "contacttypesupplier_web")));        
        itemList.addAll(ConversionUtil.getConvertedToSelectItemListWithStaticData(list, false));
    }

    public String getListName()
    {
        return "contacttypes";
    }

}
