Search in sources :

Example 1 with WebOfRegistries

use of org.jbei.ice.lib.dto.web.WebOfRegistries in project ice by JBEI.

the class WoRController method getRegistryPartners.

public WebOfRegistries getRegistryPartners(boolean approvedOnly) {
    WebOfRegistries webOfRegistries = new WebOfRegistries();
    webOfRegistries.setWebEnabled(isWebEnabled());
    // retrieve actual partners
    List<RemotePartner> partners = dao.getRegistryPartners();
    ArrayList<RegistryPartner> registryPartners = new ArrayList<>();
    for (RemotePartner partner : partners) {
        if (approvedOnly && partner.getPartnerStatus() != RemotePartnerStatus.APPROVED)
            continue;
        registryPartners.add(partner.toDataTransferObject());
    }
    webOfRegistries.setPartners(registryPartners);
    return webOfRegistries;
}
Also used : RemotePartner(org.jbei.ice.storage.model.RemotePartner) RegistryPartner(org.jbei.ice.lib.dto.web.RegistryPartner) WebOfRegistries(org.jbei.ice.lib.dto.web.WebOfRegistries) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 RegistryPartner (org.jbei.ice.lib.dto.web.RegistryPartner)1 WebOfRegistries (org.jbei.ice.lib.dto.web.WebOfRegistries)1 RemotePartner (org.jbei.ice.storage.model.RemotePartner)1