Java 类ims.admin.vo.AppUserShortVoCollection 实例源码

项目:AvoinApotti    文件:Logic.java   
private void searchAppUser()
{
    if (form.txtUserName().getValue() == "")
        engine.showMessage("Please enter a user name or part to search");
    else
    {
        form.grdUsers().getRows().clear();                                  
        AppUserShortVo voFilter = new AppUserShortVo();
        voFilter.setUsername(form.txtUserName().getValue());
        AppUserShortVoCollection voCollAppusers = domain.listAppUsers(voFilter);

        if ((voCollAppusers != null) && (voCollAppusers.size()>0))
        {
            for (int i=0;i<voCollAppusers.size();i++)
            {       
                GenForm.grdUsersRow userRow = form.grdUsers().getRows().newRow();
                userRow.setValue(voCollAppusers.get(i));
                userRow.setcolUserName(voCollAppusers.get(i).getUsername());
                userRow.setcolRealName(voCollAppusers.get(i).getUserRealName());
            }
        }
        else
            engine.showMessage("No users found for : " + form.txtUserName().getValue());
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onQmbUserTextSubmited(String username) throws PresentationLogicException 
{   
    form.qmbUser().clear();

    AppUserShortVoCollection coll = domain.getAppUsers(username +"%");  
    coll.sort(new UserComparator(SortOrder.ASCENDING));//WDEV-17275

    if(coll != null && coll.size() > 0)
    {
        for(AppUserShortVo item : coll)
        {
            form.qmbUser().newRow(item, item.getUsername());
        }

        if(coll.size() == 1)
        {
            form.qmbUser().setValue(coll.get(0));
        }
        else
        {
            form.qmbUser().showOpened();
        }
    }
}
项目:AvoinApotti    文件:AuditListImpl.java   
/**
* List all app users for the combo
*/
public AppUserShortVoCollection listAppUsers(java.lang.String name)
{
    StringBuilder query = new StringBuilder();
    query.append("from AppUser as user where user.username != 'imsadmin' ");

    if (name != null)
    {
        query.append(" and (UPPER(user.username) LIKE :NAME)");

        ArrayList<String> paramNames = new ArrayList<String>();
        paramNames.add("NAME");
        ArrayList<Object> paramValues = new ArrayList<Object>();
        paramValues.add("%" + name.toUpperCase() + "%");

        query.append(" order by user.username");

        return AppUserShortVoAssembler.createAppUserShortVoCollectionFromAppUser(getDomainFactory().find(query.toString(), paramNames, paramValues));
    }

    return AppUserShortVoAssembler.createAppUserShortVoCollectionFromAppUser(getDomainFactory().find(query.toString()));
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onDyngrdActionsCellTextSubmited(DynamicGridCell cell)
{
    cell.getItems().clear();
    AppUserShortVo appUserFilter = new AppUserShortVo();
    appUserFilter.setUsername(cell.getTypedText());
    AppUserShortVoCollection users = domain.listAppUsers(appUserFilter);
    if (users != null && users.size() > 0)
    {
        for (int i = 0; i < users.size(); i++)
        {
            DynamicGridCellItem item = cell.getItems().newItem(users.get(i).getUserRealName() + " (" + users.get(i).getUsername() + ")");
            item.setIdentifier(users.get(i));
        }
        if (users.size() == 1)
        {
            cell.setValue(users.get(0).getUserRealName() + " (" + users.get(0).getUsername() + ")");
            cell.setIdentifier(users.get(0));
        }
        else if (users.size() > 1)
            cell.showOpened();

        cell.getRow().setIdentifier(cell.getIdentifier());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void searchAppUser()
{
    if (form.txtUserName().getValue() == "")
        engine.showMessage("Please enter a user name or part to search");
    else
    {
        form.grdUsers().getRows().clear();                                  
        AppUserShortVo voFilter = new AppUserShortVo();
        voFilter.setUsername(form.txtUserName().getValue());
        AppUserShortVoCollection voCollAppusers = domain.listAppUsers(voFilter);

        if ((voCollAppusers != null) && (voCollAppusers.size()>0))
        {
            for (int i=0;i<voCollAppusers.size();i++)
            {       
                GenForm.grdUsersRow userRow = form.grdUsers().getRows().newRow();
                userRow.setValue(voCollAppusers.get(i));
                userRow.setcolUserName(voCollAppusers.get(i).getUsername());
                userRow.setcolRealName(voCollAppusers.get(i).getUserRealName());
            }
        }
        else
            engine.showMessage("No users found for : " + form.txtUserName().getValue());
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onQmbUserTextSubmited(String value) throws PresentationLogicException 
{
    if (value != null)
    {
        AppUserShortVo appuser = new AppUserShortVo();
        appuser.setUsername(value);
        AppUserShortVoCollection voColl = domain.listUsers(appuser);

        form.qmbUser().clear();
        for (AppUserShortVo appUser : voColl)
        {
            form.qmbUser().newRow(appUser, appUser.getUsername().toString());
        }
        if (voColl.size() == 1)
            form.qmbUser().setValue(voColl.get(0));
        else if (voColl.size() > 1)
            form.qmbUser().showOpened();
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onQmbUserTextSubmited(String username) throws PresentationLogicException 
{   
    form.qmbUser().clear();

    AppUserShortVoCollection coll = domain.getAppUsers(username +"%");  
    coll.sort(new UserComparator(SortOrder.ASCENDING));//WDEV-17275

    if(coll != null && coll.size() > 0)
    {
        for(AppUserShortVo item : coll)
        {
            form.qmbUser().newRow(item, item.getUsername());
        }

        if(coll.size() == 1)
        {
            form.qmbUser().setValue(coll.get(0));
        }
        else
        {
            form.qmbUser().showOpened();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onQmbPDSBackofficeNotificationUserTextSubmited(String value) throws PresentationLogicException 
{
    if (value != null)
    {
        AppUserShortVo appuser = new AppUserShortVo();
        appuser.setUsername(value);
        AppUserShortVoCollection voColl = domain.listUsers(appuser);

        form.qmbPDSBackofficeNotificationUser().clear();
        for (AppUserShortVo appUser : voColl)
        {
            form.qmbPDSBackofficeNotificationUser().newRow(appUser, appUser.getUsername().toString());
        }
        if (voColl.size() == 1)
            form.qmbPDSBackofficeNotificationUser().setValue(voColl.get(0));
        else if (voColl.size() > 1)
            form.qmbPDSBackofficeNotificationUser().showOpened();
    }
}
项目:openMAXIMS    文件:AuditListImpl.java   
/**
* List all app users for the combo
*/
public AppUserShortVoCollection listAppUsers(java.lang.String name)
{
    StringBuilder query = new StringBuilder();
    query.append("from AppUser as user where user.username != 'xxxxx' ");

    if (name != null)
    {
        query.append(" and (UPPER(user.username) LIKE :NAME)");

        ArrayList<String> paramNames = new ArrayList<String>();
        paramNames.add("NAME");
        ArrayList<Object> paramValues = new ArrayList<Object>();
        paramValues.add("%" + name.toUpperCase() + "%");

        query.append(" order by user.username");

        return AppUserShortVoAssembler.createAppUserShortVoCollectionFromAppUser(getDomainFactory().find(query.toString(), paramNames, paramValues));
    }

    return AppUserShortVoAssembler.createAppUserShortVoCollectionFromAppUser(getDomainFactory().find(query.toString()));
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onDyngrdActionsCellTextSubmited(DynamicGridCell cell)
{
    cell.getItems().clear();
    AppUserShortVo appUserFilter = new AppUserShortVo();
    appUserFilter.setUsername(cell.getTypedText());
    AppUserShortVoCollection users = domain.listAppUsers(appUserFilter);
    if (users != null && users.size() > 0)
    {
        for (int i = 0; i < users.size(); i++)
        {
            DynamicGridCellItem item = cell.getItems().newItem(users.get(i).getUserRealName() + " (" + users.get(i).getUsername() + ")");
            item.setIdentifier(users.get(i));
        }
        if (users.size() == 1)
        {
            cell.setValue(users.get(0).getUserRealName() + " (" + users.get(0).getUsername() + ")");
            cell.setIdentifier(users.get(0));
        }
        else if (users.size() > 1)
            cell.showOpened();

        cell.getRow().setIdentifier(cell.getIdentifier());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void searchAppUser()
{
    if (form.txtUserName().getValue() == "")
        engine.showMessage("Please enter a user name or part to search");
    else
    {
        form.grdUsers().getRows().clear();                                  
        AppUserShortVo voFilter = new AppUserShortVo();
        voFilter.setUsername(form.txtUserName().getValue());
        AppUserShortVoCollection voCollAppusers = domain.listAppUsers(voFilter);

        if ((voCollAppusers != null) && (voCollAppusers.size()>0))
        {
            for (int i=0;i<voCollAppusers.size();i++)
            {       
                GenForm.grdUsersRow userRow = form.grdUsers().getRows().newRow();
                userRow.setValue(voCollAppusers.get(i));
                userRow.setcolUserName(voCollAppusers.get(i).getUsername());
                userRow.setcolRealName(voCollAppusers.get(i).getUserRealName());
            }
        }
        else
            engine.showMessage("No users found for : " + form.txtUserName().getValue());
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onQmbUserTextSubmited(String username) throws PresentationLogicException 
{   
    form.qmbUser().clear();

    AppUserShortVoCollection coll = domain.getAppUsers(username +"%");  
    coll.sort(new UserComparator(SortOrder.ASCENDING));//WDEV-17275

    if(coll != null && coll.size() > 0)
    {
        for(AppUserShortVo item : coll)
        {
            form.qmbUser().newRow(item, item.getUsername());
        }

        if(coll.size() == 1)
        {
            form.qmbUser().setValue(coll.get(0));
        }
        else
        {
            form.qmbUser().showOpened();
        }
    }
}
项目:openMAXIMS    文件:AuditListImpl.java   
/**
* List all app users for the combo
*/
public AppUserShortVoCollection listAppUsers(java.lang.String name)
{
    StringBuilder query = new StringBuilder();
    query.append("from AppUser as user where user.username != 'imsadmin' ");

    if (name != null)
    {
        query.append(" and (UPPER(user.username) LIKE :NAME)");

        ArrayList<String> paramNames = new ArrayList<String>();
        paramNames.add("NAME");
        ArrayList<Object> paramValues = new ArrayList<Object>();
        paramValues.add("%" + name.toUpperCase() + "%");

        query.append(" order by user.username");

        return AppUserShortVoAssembler.createAppUserShortVoCollectionFromAppUser(getDomainFactory().find(query.toString(), paramNames, paramValues));
    }

    return AppUserShortVoAssembler.createAppUserShortVoCollectionFromAppUser(getDomainFactory().find(query.toString()));
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onDyngrdActionsCellTextSubmited(DynamicGridCell cell)
{
    cell.getItems().clear();
    AppUserShortVo appUserFilter = new AppUserShortVo();
    appUserFilter.setUsername(cell.getTypedText());
    AppUserShortVoCollection users = domain.listAppUsers(appUserFilter);
    if (users != null && users.size() > 0)
    {
        for (int i = 0; i < users.size(); i++)
        {
            DynamicGridCellItem item = cell.getItems().newItem(users.get(i).getUserRealName() + " (" + users.get(i).getUsername() + ")");
            item.setIdentifier(users.get(i));
        }
        if (users.size() == 1)
        {
            cell.setValue(users.get(0).getUserRealName() + " (" + users.get(0).getUsername() + ")");
            cell.setIdentifier(users.get(0));
        }
        else if (users.size() > 1)
            cell.showOpened();

        cell.getRow().setIdentifier(cell.getIdentifier());
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void searchAppUser()
{
    if (form.txtUserName().getValue() == "")
        engine.showMessage("Please enter a user name or part to search");
    else
    {
        form.grdUsers().getRows().clear();                                  
        AppUserShortVo voFilter = new AppUserShortVo();
        voFilter.setUsername(form.txtUserName().getValue());
        AppUserShortVoCollection voCollAppusers = domain.listAppUsers(voFilter);

        if ((voCollAppusers != null) && (voCollAppusers.size()>0))
        {
            for (int i=0;i<voCollAppusers.size();i++)
            {       
                GenForm.grdUsersRow userRow = form.grdUsers().getRows().newRow();
                userRow.setValue(voCollAppusers.get(i));
                userRow.setcolUserName(voCollAppusers.get(i).getUsername());
                userRow.setcolRealName(voCollAppusers.get(i).getUserRealName());
            }
        }
        else
            engine.showMessage("No users found for : " + form.txtUserName().getValue());
    }
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onQmbUserTextSubmited(String username) throws PresentationLogicException 
{   
    form.qmbUser().clear();

    AppUserShortVoCollection coll = domain.getAppUsers(username +"%");  
    coll.sort(new UserComparator(SortOrder.ASCENDING));//WDEV-17275

    if(coll != null && coll.size() > 0)
    {
        for(AppUserShortVo item : coll)
        {
            form.qmbUser().newRow(item, item.getUsername());
        }

        if(coll.size() == 1)
        {
            form.qmbUser().setValue(coll.get(0));
        }
        else
        {
            form.qmbUser().showOpened();
        }
    }
}
项目:openmaxims-linux    文件:AuditListImpl.java   
/**
* List all app users for the combo
*/
public AppUserShortVoCollection listAppUsers(java.lang.String name)
{
    StringBuilder query = new StringBuilder();
    query.append("from AppUser as user where user.username != 'imsadmin' ");

    if (name != null)
    {
        query.append(" and (UPPER(user.username) LIKE :NAME)");

        ArrayList<String> paramNames = new ArrayList<String>();
        paramNames.add("NAME");
        ArrayList<Object> paramValues = new ArrayList<Object>();
        paramValues.add("%" + name.toUpperCase() + "%");

        query.append(" order by user.username");

        return AppUserShortVoAssembler.createAppUserShortVoCollectionFromAppUser(getDomainFactory().find(query.toString(), paramNames, paramValues));
    }

    return AppUserShortVoAssembler.createAppUserShortVoCollectionFromAppUser(getDomainFactory().find(query.toString()));
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onDyngrdActionsCellTextSubmited(DynamicGridCell cell)
{
    cell.getItems().clear();
    AppUserShortVo appUserFilter = new AppUserShortVo();
    appUserFilter.setUsername(cell.getTypedText());
    AppUserShortVoCollection users = domain.listAppUsers(appUserFilter);
    if (users != null && users.size() > 0)
    {
        for (int i = 0; i < users.size(); i++)
        {
            DynamicGridCellItem item = cell.getItems().newItem(users.get(i).getUserRealName() + " (" + users.get(i).getUsername() + ")");
            item.setIdentifier(users.get(i));
        }
        if (users.size() == 1)
        {
            cell.setValue(users.get(0).getUserRealName() + " (" + users.get(0).getUsername() + ")");
            cell.setIdentifier(users.get(0));
        }
        else if (users.size() > 1)
            cell.showOpened();

        cell.getRow().setIdentifier(cell.getIdentifier());
    }
}
项目:AvoinApotti    文件:SessionAdminImpl.java   
public AppUserShortVoCollection listUsers()
{
    AppUserShortVo filter = new AppUserShortVo();
    filter.setIsActive(new Boolean(true));
    ApplicationUsers userAdmin = (ApplicationUsers) getDomainImpl(ApplicationUsersImpl.class);
    return userAdmin.listAppUsers(filter);
}
项目:AvoinApotti    文件:ProfilesImpl.java   
public AppUserShortVoCollection listUsers() 
{
    // Make a call to the Admin ApplicationUser list
    // Active only
    AppUserVo filter = new AppUserVo();
    filter.setIsActive(new Boolean(true));
    ApplicationUsers userAdmin = (ApplicationUsers)getDomainImpl(ApplicationUsersImpl.class);
    return userAdmin.listAppUsers(filter);
}
项目:AvoinApotti    文件:Logic.java   
private void populateUsers(AppUserShortVoCollection users)
{
    // Clear combobox
    form.qmbUsers().clear();

    // Terminate function if collection is null
    if (users == null || users.size() == 0)
    {
        form.qmbUsers().showOpened();
        return;
    }

    for (int i = 0; i < users.size(); i ++)
    {
        AppUserShortVo user = users.get(i);

        // Skip null users
        if (user == null)
            continue;

        form.qmbUsers().newRow(user, user.getUsername());
    }

    if (users.size() == 1)
        form.qmbUsers().setValue(users.get(0));
    else
        form.qmbUsers().showOpened();
}
项目:AvoinApotti    文件:Logic.java   
private void populateUsers(AppUserShortVoCollection users)
{
    // Clear combobox
    form.qmbUsers().clear();

    // Terminate function if collection is null
    if (users == null)
    {
        form.qmbUsers().showOpened();
        return;
    }

    for (int i = 0; i < users.size(); i ++)
    {
        AppUserShortVo user = users.get(i);

        // Skip null users
        if (user == null)
            continue;

        form.qmbUsers().newRow(user, user.getUsername());
    }

    if (users.size() == 1)
    {
        form.qmbUsers().setValue(users.get(0));
    }
    else if (users.size() > 1)
    {
        form.qmbUsers().showOpened();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateAppUserGrid(AppUserShortVoCollection coll)
{
    form.grdAppUsers().getRows().clear();
    form.getGlobalContext().Admin.ApplicationUsers.setSelectedUser(null);
    form.grdAppUsers().setValue(null);
    clearScreen();
    GenForm.grdAppUsersRow row = null;
    for (int i = 0; i < coll.size(); i++)
    {
        row = form.grdAppUsers().getRows().newRow();
        row.setValue(coll.get(i));
        row.setUserName(coll.get(i).getUsername());
        row.setRealName(coll.get(i).getUserRealName());
    }
}
项目:AvoinApotti    文件:SystemJobNotificationDialogImpl.java   
public AppUserShortVoCollection getAppUsers(String username)
{
    DomainFactory factory = getDomainFactory();
    String hqlString = "from AppUser appUser where appUser.isActive = :ACTIVE and appUser.username like :USERNAME";
    List appUsers = factory.find(hqlString, new String[] {"ACTIVE", "USERNAME"}, new Object[] {Boolean.TRUE, username});
    return AppUserShortVoAssembler.createAppUserShortVoCollectionFromAppUser(appUsers);
}
项目:openMAXIMS    文件:SessionAdminImpl.java   
public AppUserShortVoCollection listUsers()
{
    AppUserShortVo filter = new AppUserShortVo();
    filter.setIsActive(new Boolean(true));
    ApplicationUsers userAdmin = (ApplicationUsers) getDomainImpl(ApplicationUsersImpl.class);
    return userAdmin.listAppUsers(filter);
}
项目:openMAXIMS    文件:ProfilesImpl.java   
public AppUserShortVoCollection listUsers() 
{
    // Make a call to the Admin ApplicationUser list
    // Active only
    AppUserVo filter = new AppUserVo();
    filter.setIsActive(new Boolean(true));
    ApplicationUsers userAdmin = (ApplicationUsers)getDomainImpl(ApplicationUsersImpl.class);
    return userAdmin.listAppUsers(filter);
}
项目:openMAXIMS    文件:Logic.java   
private void populateUsers(AppUserShortVoCollection users)
{
    // Clear combobox
    form.qmbUsers().clear();

    // Terminate function if collection is null
    if (users == null || users.size() == 0)
    {
        form.qmbUsers().showOpened();
        return;
    }

    for (int i = 0; i < users.size(); i ++)
    {
        AppUserShortVo user = users.get(i);

        // Skip null users
        if (user == null)
            continue;

        form.qmbUsers().newRow(user, user.getUsername());
    }

    if (users.size() == 1)
        form.qmbUsers().setValue(users.get(0));
    else
        form.qmbUsers().showOpened();
}
项目:openMAXIMS    文件:Logic.java   
private void populateUsers(AppUserShortVoCollection users)
{
    // Clear combobox
    form.qmbUsers().clear();

    // Terminate function if collection is null
    if (users == null)
    {
        form.qmbUsers().showOpened();
        return;
    }

    for (int i = 0; i < users.size(); i ++)
    {
        AppUserShortVo user = users.get(i);

        // Skip null users
        if (user == null)
            continue;

        form.qmbUsers().newRow(user, user.getUsername());
    }

    if (users.size() == 1)
    {
        form.qmbUsers().setValue(users.get(0));
    }
    else if (users.size() > 1)
    {
        form.qmbUsers().showOpened();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void checkForDefaultDictionary()
{       
    AppUserVo appuser = new AppUserVo();
    AppUserShortVo currentUser = new AppUserShortVo();
    HcpLiteVo hcpUser = (HcpLiteVo)domain.getHcpLiteUser();     
    if (hcpUser != null)
    {
        appuser.setUsername(hcpUser.getIHcpName());
        AppUserShortVoCollection coll = domain.listAppUsers(appuser);
        if(coll != null &&
                coll.size() > 0)
        {
            currentUser = coll.get(0);

            UserDictionaryVoCollection dictionaryColl = domain.listUserDictionary(currentUser);
            UserDictionaryVo dictionary = null;
            if (dictionaryColl != null &&
                    dictionaryColl.size() > 0)
            {
                dictionary = dictionaryColl.get(0);

                GlobalDictionaryVoCollection globalsColl = domain.listGlobalDictionary(currentUser);            
                renderDictionaryDynamicGrid(dictionary,globalsColl);
            }
        }
    }               
    else
    {
        engine.showMessage("Current loggin user don't have setup an user dictionary\nDo you want to setup an User Dictionary now?","Confirmation", MessageButtons.YESNO, MessageIcon.QUESTION);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateAppUserGrid(AppUserShortVoCollection coll)
{
    form.grdAppUsers().getRows().clear();
    form.getGlobalContext().Admin.ApplicationUsers.setSelectedUser(null);
    form.grdAppUsers().setValue(null);
    clearScreen();
    GenForm.grdAppUsersRow row = null;
    for (int i = 0; i < coll.size(); i++)
    {
        row = form.grdAppUsers().getRows().newRow();
        row.setValue(coll.get(i));
        row.setUserName(coll.get(i).getUsername());
        row.setRealName(coll.get(i).getUserRealName());
    }
}
项目:openMAXIMS    文件:SystemJobNotificationDialogImpl.java   
public AppUserShortVoCollection getAppUsers(String username)
{
    DomainFactory factory = getDomainFactory();
    String hqlString = "from AppUser appUser where appUser.isActive = :ACTIVE and appUser.username like :USERNAME";
    List appUsers = factory.find(hqlString, new String[] {"ACTIVE", "USERNAME"}, new Object[] {Boolean.TRUE, username});
    return AppUserShortVoAssembler.createAppUserShortVoCollectionFromAppUser(appUsers);
}
项目:openMAXIMS    文件:SessionAdminImpl.java   
public AppUserShortVoCollection listUsers()
{
    AppUserShortVo filter = new AppUserShortVo();
    filter.setIsActive(new Boolean(true));
    ApplicationUsers userAdmin = (ApplicationUsers) getDomainImpl(ApplicationUsersImpl.class);
    return userAdmin.listAppUsers(filter);
}
项目:openMAXIMS    文件:ProfilesImpl.java   
public AppUserShortVoCollection listUsers() 
{
    // Make a call to the Admin ApplicationUser list
    // Active only
    AppUserVo filter = new AppUserVo();
    filter.setIsActive(new Boolean(true));
    ApplicationUsers userAdmin = (ApplicationUsers)getDomainImpl(ApplicationUsersImpl.class);
    return userAdmin.listAppUsers(filter);
}
项目:openMAXIMS    文件:Logic.java   
private void populateUsers(AppUserShortVoCollection users)
{
    // Clear combobox
    form.qmbUsers().clear();

    // Terminate function if collection is null
    if (users == null || users.size() == 0)
    {
        form.qmbUsers().showOpened();
        return;
    }

    for (int i = 0; i < users.size(); i ++)
    {
        AppUserShortVo user = users.get(i);

        // Skip null users
        if (user == null)
            continue;

        form.qmbUsers().newRow(user, user.getUsername());
    }

    if (users.size() == 1)
        form.qmbUsers().setValue(users.get(0));
    else
        form.qmbUsers().showOpened();
}
项目:openMAXIMS    文件:Logic.java   
private void populateUsers(AppUserShortVoCollection users)
{
    // Clear combobox
    form.qmbUsers().clear();

    // Terminate function if collection is null
    if (users == null)
    {
        form.qmbUsers().showOpened();
        return;
    }

    for (int i = 0; i < users.size(); i ++)
    {
        AppUserShortVo user = users.get(i);

        // Skip null users
        if (user == null)
            continue;

        form.qmbUsers().newRow(user, user.getUsername());
    }

    if (users.size() == 1)
    {
        form.qmbUsers().setValue(users.get(0));
    }
    else if (users.size() > 1)
    {
        form.qmbUsers().showOpened();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateAppUserGrid(AppUserShortVoCollection coll)
{
    form.grdAppUsers().getRows().clear();
    form.getGlobalContext().Admin.ApplicationUsers.setSelectedUser(null);
    form.grdAppUsers().setValue(null);
    clearScreen();
    GenForm.grdAppUsersRow row = null;
    for (int i = 0; i < coll.size(); i++)
    {
        row = form.grdAppUsers().getRows().newRow();
        row.setValue(coll.get(i));
        row.setUserName(coll.get(i).getUsername());
        row.setRealName(coll.get(i).getUserRealName());
    }
}
项目:openMAXIMS    文件:SystemJobNotificationDialogImpl.java   
public AppUserShortVoCollection getAppUsers(String username)
{
    DomainFactory factory = getDomainFactory();
    String hqlString = "from AppUser appUser where appUser.isActive = :ACTIVE and appUser.username like :USERNAME";
    List appUsers = factory.find(hqlString, new String[] {"ACTIVE", "USERNAME"}, new Object[] {Boolean.TRUE, username});
    return AppUserShortVoAssembler.createAppUserShortVoCollectionFromAppUser(appUsers);
}
项目:openmaxims-linux    文件:SessionAdminImpl.java   
public AppUserShortVoCollection listUsers()
{
    AppUserShortVo filter = new AppUserShortVo();
    filter.setIsActive(new Boolean(true));
    ApplicationUsers userAdmin = (ApplicationUsers) getDomainImpl(ApplicationUsersImpl.class);
    return userAdmin.listAppUsers(filter);
}
项目:openmaxims-linux    文件:ProfilesImpl.java   
public AppUserShortVoCollection listUsers() 
{
    // Make a call to the Admin ApplicationUser list
    // Active only
    AppUserVo filter = new AppUserVo();
    filter.setIsActive(new Boolean(true));
    ApplicationUsers userAdmin = (ApplicationUsers)getDomainImpl(ApplicationUsersImpl.class);
    return userAdmin.listAppUsers(filter);
}
项目:openmaxims-linux    文件:Logic.java   
private void populateUsers(AppUserShortVoCollection users)
{
    // Clear combobox
    form.qmbUsers().clear();

    // Terminate function if collection is null
    if (users == null || users.size() == 0)
    {
        form.qmbUsers().showOpened();
        return;
    }

    for (int i = 0; i < users.size(); i ++)
    {
        AppUserShortVo user = users.get(i);

        // Skip null users
        if (user == null)
            continue;

        form.qmbUsers().newRow(user, user.getUsername());
    }

    if (users.size() == 1)
        form.qmbUsers().setValue(users.get(0));
    else
        form.qmbUsers().showOpened();
}