Java 类ims.core.vo.OrgLiteVoCollection 实例源码

项目:AvoinApotti    文件:Logic.java   
private void loadOrganisations() 
{

    form.lyrDetails().tabGenDetails().cmbRepOrganisation().clear();
    form.lyrDetails().tabGenDetails().cmbRequestingOrg().clear();

    OrgLiteVoCollection voColl = null;
    if (form.getLocalContext().getLoadedOrganisationsIsNotNull())
        voColl = form.getLocalContext().getLoadedOrganisations();
    else
    {
        voColl = domain.listOrganisationsLite(new OrgShortVo());
        form.getLocalContext().setLoadedOrganisations(voColl);
    }

    for (int i = 0 ; voColl != null && i < voColl.size() ; i++)
    {
        if (voColl.get(i).getIsActiveIsNotNull() && voColl.get(i).getIsActive().booleanValue())
        {
            form.lyrDetails().tabGenDetails().cmbRepOrganisation().newRow(voColl.get(i), voColl.get(i).getName(), null, null);
            form.lyrDetails().tabGenDetails().cmbRequestingOrg().newRow(voColl.get(i), voColl.get(i).getName(), null, null);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void loadData(TreeNode parentNode, OrgLiteVo organization)
{
    if (parentNode == null || organization == null)
        return;

    OrgLiteVoCollection organizations = domain.listOrganizationsByOrganization(organization);
    if (organization != null)
    {
        for (int x = 0; x < organizations.size(); x++)
        {
            add(parentNode, organizations.get(x));
        }
    }

    LocSiteLiteVoCollection locationSites = domain.listLocationSites(organization);
    if (locationSites != null)
    {
        for (int x = 0; x < locationSites.size(); x++)
        {
            // ----------------------------------------
            if (locationSites.get(x).getIsActive() == true)
                // ----------------------------------------
                add(parentNode, locationSites.get(x));
        }
    }
}
项目:AvoinApotti    文件:NewOnwardReferralImpl.java   
public OrgLiteVoCollection listAllSuppliers() 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation org ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " org.type.id = " + OrganisationType.SUPPLIER.getID());
    andStr = " and ";

    condStr.append(andStr + "org.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);   

    hql += " where ";
    hql += condStr.toString();

    List locations = factory.find(hql, markers, values, 1000);

    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(locations).sort();
}
项目:openMAXIMS    文件:Logic.java   
private void loadOrganisations() 
{

    form.lyrDetails().tabGenDetails().cmbRepOrganisation().clear();
    form.lyrDetails().tabGenDetails().cmbRequestingOrg().clear();

    OrgLiteVoCollection voColl = null;
    if (form.getLocalContext().getLoadedOrganisationsIsNotNull())
        voColl = form.getLocalContext().getLoadedOrganisations();
    else
    {
        voColl = domain.listOrganisationsLite(new OrgShortVo());
        form.getLocalContext().setLoadedOrganisations(voColl);
    }

    for (int i = 0 ; voColl != null && i < voColl.size() ; i++)
    {
        if (voColl.get(i).getIsActiveIsNotNull() && voColl.get(i).getIsActive().booleanValue())
        {
            form.lyrDetails().tabGenDetails().cmbRepOrganisation().newRow(voColl.get(i), voColl.get(i).getName(), null, null);
            form.lyrDetails().tabGenDetails().cmbRequestingOrg().newRow(voColl.get(i), voColl.get(i).getName(), null, null);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadData(TreeNode parentNode, OrgLiteVo organization)
{
    if (parentNode == null || organization == null)
        return;

    OrgLiteVoCollection organizations = domain.listOrganizationsByOrganization(organization);
    if (organization != null)
    {
        for (int x = 0; x < organizations.size(); x++)
        {
            add(parentNode, organizations.get(x));
        }
    }

    LocSiteLiteVoCollection locationSites = domain.listLocationSites(organization);
    if (locationSites != null)
    {
        for (int x = 0; x < locationSites.size(); x++)
        {
            // ----------------------------------------
            if (locationSites.get(x).getIsActive() == true)
                // ----------------------------------------
                add(parentNode, locationSites.get(x));
        }
    }
}
项目:openMAXIMS    文件:NewOnwardReferralImpl.java   
public OrgLiteVoCollection listAllSuppliers() 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation org ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " org.type.id = " + OrganisationType.SUPPLIER.getID());
    andStr = " and ";

    condStr.append(andStr + "org.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);   

    hql += " where ";
    hql += condStr.toString();

    List locations = factory.find(hql, markers, values, 1000);

    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(locations).sort();
}
项目:openMAXIMS    文件:Logic.java   
private void populateLHO() throws FormOpenException  
{
    OrgLiteVoCollection orgColl = null;

    orgColl = domain.listLHOs();

    if(orgColl == null || (orgColl != null && orgColl.size() == 0))
        throw new FormOpenException("Please set up LHO before open form.");

    form.cmbLHO().clear();
    for (int i = 0; i < orgColl.size(); i++)
    {
        OrgLiteVo vo = orgColl.get(i);
        form.cmbLHO().newRow(vo, vo.getName());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadOrganisations() 
{

    form.lyrDetails().tabGenDetails().cmbRepOrganisation().clear();
    form.lyrDetails().tabGenDetails().cmbRequestingOrg().clear();

    OrgLiteVoCollection voColl = null;
    if (form.getLocalContext().getLoadedOrganisationsIsNotNull())
        voColl = form.getLocalContext().getLoadedOrganisations();
    else
    {
        voColl = domain.listOrganisationsLite(new OrgShortVo());
        form.getLocalContext().setLoadedOrganisations(voColl);
    }

    for (int i = 0 ; voColl != null && i < voColl.size() ; i++)
    {
        if (voColl.get(i).getIsActiveIsNotNull() && voColl.get(i).getIsActive().booleanValue())
        {
            form.lyrDetails().tabGenDetails().cmbRepOrganisation().newRow(voColl.get(i), voColl.get(i).getName(), null, null);
            form.lyrDetails().tabGenDetails().cmbRequestingOrg().newRow(voColl.get(i), voColl.get(i).getName(), null, null);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadData(TreeNode parentNode, OrgLiteVo organization)
{
    if (parentNode == null || organization == null)
        return;

    OrgLiteVoCollection organizations = domain.listOrganizationsByOrganization(organization);
    if (organization != null)
    {
        for (int x = 0; x < organizations.size(); x++)
        {
            add(parentNode, organizations.get(x));
        }
    }

    LocSiteLiteVoCollection locationSites = domain.listLocationSites(organization);
    if (locationSites != null)
    {
        for (int x = 0; x < locationSites.size(); x++)
        {
            // ----------------------------------------
            if (locationSites.get(x).getIsActive() == true)
                // ----------------------------------------
                add(parentNode, locationSites.get(x));
        }
    }
}
项目:openMAXIMS    文件:NewOnwardReferralImpl.java   
public OrgLiteVoCollection listAllSuppliers() 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation org ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " org.type.id = " + OrganisationType.SUPPLIER.getID());
    andStr = " and ";

    condStr.append(andStr + "org.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);   

    hql += " where ";
    hql += condStr.toString();

    List locations = factory.find(hql, markers, values, 1000);

    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(locations).sort();
}
项目:openmaxims-linux    文件:Logic.java   
private void loadOrganisations() 
{

    form.lyrDetails().tabGenDetails().cmbRepOrganisation().clear();
    form.lyrDetails().tabGenDetails().cmbRequestingOrg().clear();

    OrgLiteVoCollection voColl = null;
    if (form.getLocalContext().getLoadedOrganisationsIsNotNull())
        voColl = form.getLocalContext().getLoadedOrganisations();
    else
    {
        voColl = domain.listOrganisationsLite(new OrgShortVo());
        form.getLocalContext().setLoadedOrganisations(voColl);
    }

    for (int i = 0 ; voColl != null && i < voColl.size() ; i++)
    {
        if (voColl.get(i).getIsActiveIsNotNull() && voColl.get(i).getIsActive().booleanValue())
        {
            form.lyrDetails().tabGenDetails().cmbRepOrganisation().newRow(voColl.get(i), voColl.get(i).getName(), null, null);
            form.lyrDetails().tabGenDetails().cmbRequestingOrg().newRow(voColl.get(i), voColl.get(i).getName(), null, null);
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void loadData(TreeNode parentNode, OrgLiteVo organization)
{
    if (parentNode == null || organization == null)
        return;

    OrgLiteVoCollection organizations = domain.listOrganizationsByOrganization(organization);
    if (organization != null)
    {
        for (int x = 0; x < organizations.size(); x++)
        {
            add(parentNode, organizations.get(x));
        }
    }

    LocSiteLiteVoCollection locationSites = domain.listLocationSites(organization);
    if (locationSites != null)
    {
        for (int x = 0; x < locationSites.size(); x++)
        {
            // ----------------------------------------
            if (locationSites.get(x).getIsActive() == true)
                // ----------------------------------------
                add(parentNode, locationSites.get(x));
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateRootOrganizations(OrgLiteVoCollection rootOrganizations)
{
    form.treeLocation().getNodes().clear();

    if (rootOrganizations == null)
        return;

    for (int x = 0; x < rootOrganizations.size(); x++)
    {
        add(rootOrganizations.get(x));
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean hasAllowedLocations(OrgLiteVo organization, IAppUser user)
{
    OrgLiteVoCollection organizationList = domain.listOrganizationsByOrganization(organization);
    LocSiteLiteVoCollection locationList = domain.listLocationSites(organization);

    ILocationProvider locationProvider = engine.getLocationProvider();

    if (locationProvider != null && !locationProvider.shouldSelectLocation(user))
        return true;

    // Test locations
    if (locationList != null)
    {
        for (int i = 0; i < locationList.size(); i++)
        {
            if (locationProvider != null && locationProvider.locationIsAllowed(locationList.get(i), user))
                return true;

            if (hasAllowedLocations(locationList.get(i), user))
                return true;
        }
    }

    // Test organizations
    if (organizationList != null)
    {
        for (int i = 0; i < organizationList.size(); i++)
        {
            if (hasAllowedLocations(organizationList.get(i), user))
                return true;
        }
    }

    return false;
}
项目:AvoinApotti    文件:OrganisationAndLocationImpl.java   
public OrgLiteVoCollection listOrganisationsLite(OrgShortVo filter)
{
    List orgs = listDomOrganisation(filter);

    OrgLiteVoCollection voCollOrg = OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(orgs);
    voCollOrg.sort();
    return voCollOrg;
}
项目:AvoinApotti    文件:Logic.java   
private void initialiseOnwardTab()
{
    form.setMode(FormMode.VIEW);

    //load SecondaryCareProviders 
    OrgLiteVoCollection voCollOrg = domain.listAllSuppliers();

    form.lyrDetail().tabOnwardReferral().cmbSecondaryCareProvider().clear();
    for(OrgLiteVo voOrg: voCollOrg)
        form.lyrDetail().tabOnwardReferral().cmbSecondaryCareProvider().newRow(voOrg, voOrg.getName());

    form.lyrDetail().tabOnwardReferral().btnRemove().setVisible(false);

    form.lyrDetail().tabOnwardReferral().cmbReferredInto().setRequired(true);
}
项目:AvoinApotti    文件:Logic.java   
private boolean populateSuppliers() 
{
    OrgLiteVoCollection voColl = domain.listAllSuppliers();

    for (int i = 0 ; voColl != null && i <voColl.size() ; i++)
    {
        form.cmbOnwardReferralOrganisation().newRow(voColl.get(i), voColl.get(i).getName());
    }

    return (voColl != null && voColl.size() > 0) ? true : false;
}
项目:AvoinApotti    文件:Logic.java   
private void loadSuppliers()
{
    OrgLiteVoCollection voColl = domain.listAllSuppliers();
    for (int i = 0 ; voColl != null && i <voColl.size() ; i++)
        form.lyr1().tabDischargePatient().cmbSecondaryOrganisation().newRow(voColl.get(i), voColl.get(i).getName());

    form.getLocalContext().setAllSuppliers(voColl);
}
项目:AvoinApotti    文件:Logic.java   
private void loadSuppliers()
{
    OrgLiteVoCollection voColl = domain.listAllSuppliers();
    for (int i = 0 ; voColl != null && i <voColl.size() ; i++)
        form.lyr1().tabTLT().lyrTLT().tabPageTLTOutcome().cmbTLTOrganisation().newRow(voColl.get(i), voColl.get(i).getName());

    form.getLocalContext().setAllSuppliers(voColl);
}
项目:AvoinApotti    文件:ReferralOutcomeComponentImpl.java   
@SuppressWarnings("unchecked")
public OrgLiteVoCollection listAllSuppliers() 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation org ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " org.type.id = " + OrganisationType.SUPPLIER.getID());
    andStr = " and ";

    condStr.append(andStr + "org.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);   

    hql += " where ";
    hql += condStr.toString();

    List locations = factory.find(hql, markers, values, 1000);

    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(locations).sort();

}
项目:openMAXIMS    文件:Logic.java   
private void populateRootOrganizations(OrgLiteVoCollection rootOrganizations)
{
    form.treeLocation().getNodes().clear();

    if (rootOrganizations == null)
        return;

    for (int x = 0; x < rootOrganizations.size(); x++)
    {
        add(rootOrganizations.get(x));
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean hasAllowedLocations(OrgLiteVo organization, IAppUser user)
{
    OrgLiteVoCollection organizationList = domain.listOrganizationsByOrganization(organization);
    LocSiteLiteVoCollection locationList = domain.listLocationSites(organization);

    ILocationProvider locationProvider = engine.getLocationProvider();

    if (locationProvider != null && !locationProvider.shouldSelectLocation(user))
        return true;

    // Test locations
    if (locationList != null)
    {
        for (int i = 0; i < locationList.size(); i++)
        {
            if (locationProvider != null && locationProvider.locationIsAllowed(locationList.get(i), user))
                return true;

            if (hasAllowedLocations(locationList.get(i), user))
                return true;
        }
    }

    // Test organizations
    if (organizationList != null)
    {
        for (int i = 0; i < organizationList.size(); i++)
        {
            if (hasAllowedLocations(organizationList.get(i), user))
                return true;
        }
    }

    return false;
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public OrgLiteVoCollection listOrganisationsLite(OrgShortVo filter)
{
    List orgs = listDomOrganisation(filter);

    OrgLiteVoCollection voCollOrg = OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(orgs);
    voCollOrg.sort();
    return voCollOrg;
}
项目:openMAXIMS    文件:Logic.java   
private void initialiseOnwardTab()
{
    form.setMode(FormMode.VIEW);

    //load SecondaryCareProviders 
    OrgLiteVoCollection voCollOrg = domain.listAllSuppliers();

    form.lyrDetail().tabOnwardReferral().cmbSecondaryCareProvider().clear();
    for(OrgLiteVo voOrg: voCollOrg)
        form.lyrDetail().tabOnwardReferral().cmbSecondaryCareProvider().newRow(voOrg, voOrg.getName());

    form.lyrDetail().tabOnwardReferral().btnRemove().setVisible(false);

    form.lyrDetail().tabOnwardReferral().cmbReferredInto().setRequired(true);
}
项目:openMAXIMS    文件:Logic.java   
private boolean populateSuppliers() 
{
    OrgLiteVoCollection voColl = domain.listAllSuppliers();

    for (int i = 0 ; voColl != null && i <voColl.size() ; i++)
    {
        form.cmbOnwardReferralOrganisation().newRow(voColl.get(i), voColl.get(i).getName());
    }

    return (voColl != null && voColl.size() > 0) ? true : false;
}
项目:openMAXIMS    文件:Logic.java   
private void loadSuppliers()
{
    OrgLiteVoCollection voColl = domain.listAllSuppliers();
    for (int i = 0 ; voColl != null && i <voColl.size() ; i++)
        form.lyr1().tabDischargePatient().cmbSecondaryOrganisation().newRow(voColl.get(i), voColl.get(i).getName());

    form.getLocalContext().setAllSuppliers(voColl);
}
项目:openMAXIMS    文件:Logic.java   
private void loadSuppliers()
{
    OrgLiteVoCollection voColl = domain.listAllSuppliers();
    for (int i = 0 ; voColl != null && i <voColl.size() ; i++)
        form.lyr1().tabTLT().lyrTLT().tabPageTLTOutcome().cmbTLTOrganisation().newRow(voColl.get(i), voColl.get(i).getName());

    form.getLocalContext().setAllSuppliers(voColl);
}
项目:openMAXIMS    文件:ReferralOutcomeComponentImpl.java   
@SuppressWarnings("unchecked")
public OrgLiteVoCollection listAllSuppliers() 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation org ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " org.type.id = " + OrganisationType.SUPPLIER.getID());
    andStr = " and ";

    condStr.append(andStr + "org.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);   

    hql += " where ";
    hql += condStr.toString();

    List locations = factory.find(hql, markers, values, 1000);

    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(locations).sort();

}
项目:openMAXIMS    文件:ClientAddressImpl.java   
public OrgLiteVoCollection listLHOs()
{
    StringBuffer hql = new StringBuffer();
    hql.append(" from Organisation o");
    hql.append(" where");
    hql.append(" o.type.id = :lho and o.isActive = 1 order by o.name asc");

    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(getDomainFactory().find(hql.toString(), new String[] { "lho" }, new Object[] { OrganisationType.LHO.getID() }));
}
项目:openMAXIMS    文件:Logic.java   
private void populateRootOrganizations(OrgLiteVoCollection rootOrganizations)
{
    form.treeLocation().getNodes().clear();

    if (rootOrganizations == null)
        return;

    for (int x = 0; x < rootOrganizations.size(); x++)
    {
        add(rootOrganizations.get(x));
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean hasAllowedLocations(OrgLiteVo organization, IAppUser user)
{
    OrgLiteVoCollection organizationList = domain.listOrganizationsByOrganization(organization);
    LocSiteLiteVoCollection locationList = domain.listLocationSites(organization);

    ILocationProvider locationProvider = engine.getLocationProvider();

    if (locationProvider != null && !locationProvider.shouldSelectLocation(user))
        return true;

    // Test locations
    if (locationList != null)
    {
        for (int i = 0; i < locationList.size(); i++)
        {
            if (locationProvider != null && locationProvider.locationIsAllowed(locationList.get(i), user))
                return true;

            if (hasAllowedLocations(locationList.get(i), user))
                return true;
        }
    }

    // Test organizations
    if (organizationList != null)
    {
        for (int i = 0; i < organizationList.size(); i++)
        {
            if (hasAllowedLocations(organizationList.get(i), user))
                return true;
        }
    }

    return false;
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public OrgLiteVoCollection listOrganisationsLite(OrgShortVo filter)
{
    List orgs = listDomOrganisation(filter);

    OrgLiteVoCollection voCollOrg = OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(orgs);
    voCollOrg.sort();
    return voCollOrg;
}
项目:openMAXIMS    文件:Logic.java   
private void initialiseOnwardTab()
{
    form.setMode(FormMode.VIEW);

    //load SecondaryCareProviders 
    OrgLiteVoCollection voCollOrg = domain.listAllSuppliers();

    form.lyrDetail().tabOnwardReferral().cmbSecondaryCareProvider().clear();
    for(OrgLiteVo voOrg: voCollOrg)
        form.lyrDetail().tabOnwardReferral().cmbSecondaryCareProvider().newRow(voOrg, voOrg.getName());

    form.lyrDetail().tabOnwardReferral().btnRemove().setVisible(false);

    form.lyrDetail().tabOnwardReferral().cmbReferredInto().setRequired(true);
}
项目:openMAXIMS    文件:Logic.java   
private boolean populateSuppliers() 
{
    OrgLiteVoCollection voColl = domain.listAllSuppliers();

    for (int i = 0 ; voColl != null && i <voColl.size() ; i++)
    {
        form.cmbOnwardReferralOrganisation().newRow(voColl.get(i), voColl.get(i).getName());
    }

    return (voColl != null && voColl.size() > 0) ? true : false;
}
项目:openMAXIMS    文件:Logic.java   
private void loadSuppliers()
{
    OrgLiteVoCollection voColl = domain.listAllSuppliers();
    for (int i = 0 ; voColl != null && i <voColl.size() ; i++)
        form.lyr1().tabDischargePatient().cmbSecondaryOrganisation().newRow(voColl.get(i), voColl.get(i).getName());

    form.getLocalContext().setAllSuppliers(voColl);
}
项目:openMAXIMS    文件:Logic.java   
private void loadSuppliers()
{
    OrgLiteVoCollection voColl = domain.listAllSuppliers();
    for (int i = 0 ; voColl != null && i <voColl.size() ; i++)
        form.lyr1().tabTLT().lyrTLT().tabPageTLTOutcome().cmbTLTOrganisation().newRow(voColl.get(i), voColl.get(i).getName());

    form.getLocalContext().setAllSuppliers(voColl);
}
项目:openMAXIMS    文件:ReferralOutcomeComponentImpl.java   
@SuppressWarnings("unchecked")
public OrgLiteVoCollection listAllSuppliers() 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation org ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " org.type.id = " + OrganisationType.SUPPLIER.getID());
    andStr = " and ";

    condStr.append(andStr + "org.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);   

    hql += " where ";
    hql += condStr.toString();

    List locations = factory.find(hql, markers, values, 1000);

    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(locations).sort();

}
项目:openmaxims-linux    文件:Logic.java   
private void populateRootOrganizations(OrgLiteVoCollection rootOrganizations)
{
    form.treeLocation().getNodes().clear();

    if (rootOrganizations == null)
        return;

    for (int x = 0; x < rootOrganizations.size(); x++)
    {
        add(rootOrganizations.get(x));
    }
}
项目:openmaxims-linux    文件:Logic.java   
private boolean hasAllowedLocations(OrgLiteVo organization, IAppUser user)
{
    OrgLiteVoCollection organizationList = domain.listOrganizationsByOrganization(organization);
    LocSiteLiteVoCollection locationList = domain.listLocationSites(organization);

    ILocationProvider locationProvider = engine.getLocationProvider();

    if (locationProvider != null && !locationProvider.shouldSelectLocation(user))
        return true;

    // Test locations
    if (locationList != null)
    {
        for (int i = 0; i < locationList.size(); i++)
        {
            if (locationProvider != null && locationProvider.locationIsAllowed(locationList.get(i), user))
                return true;

            if (hasAllowedLocations(locationList.get(i), user))
                return true;
        }
    }

    // Test organizations
    if (organizationList != null)
    {
        for (int i = 0; i < organizationList.size(); i++)
        {
            if (hasAllowedLocations(organizationList.get(i), user))
                return true;
        }
    }

    return false;
}
项目:openmaxims-linux    文件:OrganisationAndLocationImpl.java   
public OrgLiteVoCollection listOrganisationsLite(OrgShortVo filter)
{
    List orgs = listDomOrganisation(filter);

    OrgLiteVoCollection voCollOrg = OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(orgs);
    voCollOrg.sort();
    return voCollOrg;
}