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

项目:AvoinApotti    文件:ProfilesImpl.java   
public AppRoleShortVoCollection listRoles() 
{
    // Make a call to the Admin ApplicationRoles list
    ApplicationRoles roleAdmin = (ApplicationRoles)getDomainImpl(ApplicationRolesImpl.class);
    AppRoleShortVoCollection coll = roleAdmin.listRoles();
    AppRoleShortVoCollection filteredColl = new AppRoleShortVoCollection();
    // Remove inactive roles
    for (int i=0; i<coll.size(); i++)
    {
        AppRoleShortVo vo = coll.get(i);
        if (vo.getIsActiveIsNotNull() && vo.getIsActive().booleanValue())
            filteredColl.add(vo);
    }

    return filteredColl;
}
项目:AvoinApotti    文件:Logic.java   
private void listRoles() 
{
    AppRoleShortVo selectedRole = form.getLocalContext().getRoleSelected();

    AppRoleShortVoCollection roles = domain.listRoles();        
    form.grdRoles().getRows().clear();
    GenForm.grdRolesRow row;
    for (int i = 0; i < roles.size(); i++)
    {
        AppRoleShortVo voRole = roles.get(i);
        if (selectedRole != null && selectedRole.getID_AppRoleIsNotNull() && selectedRole.getID_AppRole().equals(voRole.getID_AppRole()))
            row = form.grdRoles().getRows().newRow(true);
        else
            row = form.grdRoles().getRows().newRow();
        row.setValue(voRole);
        row.setcolRoleName(voRole.getName());   
    }

    // If the local context has a value set, set the grid value too
    if (form.getLocalContext().getRoleSelectedIsNotNull())
    {
        form.grdRoles().setValue(form.getLocalContext().getRoleSelected());
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException
{
    if (result.equals(DialogResult.OK)
        && formName.equals(form.getForms().Admin.ElectronicPrescribingConfigDialog))
    {
        save();
    }
    else if(formName.equals(form.getForms().Admin.RoleSelect)
        && result.equals(DialogResult.OK))
    {
        AppRoleShortVoCollection voRoles = form.getGlobalContext().Admin.getSelectedRoles();
        ((ElectronicPrescribingConfigVo)form.grdDetails().getValue()).setButtonDeniedRoleAccess(new AppRoleShortVoCollection());
        for (int i = 0; voRoles != null  && i < voRoles.size(); i++)
        {
            if(form.grdDetails().getValue() instanceof ElectronicPrescribingConfigVo)
                ((ElectronicPrescribingConfigVo)form.grdDetails().getValue()).getButtonDeniedRoleAccess().add(voRoles.get(i));
        }
        form.getGlobalContext().Admin.setElectronicPrescribingConfigVo(((ElectronicPrescribingConfigVo)form.grdDetails().getValue()));
        save();
    }

    open();
}
项目:AvoinApotti    文件:Logic.java   
protected void onFormOpen() throws FormOpenException
{
    if(!ConfigFlag.DOM.HEARTS_REPLICATE_PATIENTS.getValue())
        form.imbHeartsUser().setVisible(false);     

    form.btnUpdate().setEnabled(false);
    form.getContextMenus().getGenericGridUpdateItem().setVisible(false);
    AppRoleShortVoCollection roles = domain.listRoles();
    GenForm.grdRolesRow row;

    for (int i = 0; i < roles.size(); i++)
    {
        AppRoleShortVo role = roles.get(i);
        row = form.grdRoles().getRows().newRow();
        row.setValue(role);
        row.setRoleName(role.getName());
        row.setAssigned(false);
    }
    form.txtSrhUserName().setFocus();
    form.qmbMos().setRequired(!ConfigFlag.GEN.ALLOW_NON_MOS_USERS.getValue());
}
项目:openMAXIMS    文件:ProfilesImpl.java   
public AppRoleShortVoCollection listRoles() 
{
    // Make a call to the Admin ApplicationRoles list
    ApplicationRoles roleAdmin = (ApplicationRoles)getDomainImpl(ApplicationRolesImpl.class);
    AppRoleShortVoCollection coll = roleAdmin.listRoles();
    AppRoleShortVoCollection filteredColl = new AppRoleShortVoCollection();
    // Remove inactive roles
    for (int i=0; i<coll.size(); i++)
    {
        AppRoleShortVo vo = coll.get(i);
        if (vo.getIsActiveIsNotNull() && vo.getIsActive().booleanValue())
            filteredColl.add(vo);
    }

    return filteredColl;
}
项目:openMAXIMS    文件:Logic.java   
private void listRoles() 
{
    AppRoleShortVo selectedRole = form.getLocalContext().getRoleSelected();

    AppRoleShortVoCollection roles = domain.listRoles();        
    form.grdRoles().getRows().clear();
    GenForm.grdRolesRow row;
    for (int i = 0; i < roles.size(); i++)
    {
        AppRoleShortVo voRole = roles.get(i);
        if (selectedRole != null && selectedRole.getID_AppRoleIsNotNull() && selectedRole.getID_AppRole().equals(voRole.getID_AppRole()))
            row = form.grdRoles().getRows().newRow(true);
        else
            row = form.grdRoles().getRows().newRow();
        row.setValue(voRole);
        row.setcolRoleName(voRole.getName());   
    }

    // If the local context has a value set, set the grid value too
    if (form.getLocalContext().getRoleSelectedIsNotNull())
    {
        form.grdRoles().setValue(form.getLocalContext().getRoleSelected());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateRoleCombo()
{
    form.lyrED().tabTriageTabConfig().cmbRole().clear();

    AppRoleShortVoCollection roles = domain.getAppRoles();

    if (roles == null || roles.size() == 0)
        return;

    for (int i = 0; i < roles.size(); i++)
    {

        if (Boolean.FALSE.equals(roles.get(i).getIsActive()))
        {
            form.lyrED().tabTriageTabConfig().cmbRole().newRow(roles.get(i), roles.get(i).getName(), Color.Red);

        }
        else
            form.lyrED().tabTriageTabConfig().cmbRole().newRow(roles.get(i), roles.get(i).getName());

    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException
{
    if (result.equals(DialogResult.OK)
        && formName.equals(form.getForms().Admin.ElectronicPrescribingConfigDialog))
    {
        save();
    }
    else if(formName.equals(form.getForms().Admin.RoleSelect)
        && result.equals(DialogResult.OK))
    {
        AppRoleShortVoCollection voRoles = form.getGlobalContext().Admin.getSelectedRoles();
        ((ElectronicPrescribingConfigVo)form.grdDetails().getValue()).setButtonDeniedRoleAccess(new AppRoleShortVoCollection());
        for (int i = 0; voRoles != null  && i < voRoles.size(); i++)
        {
            if(form.grdDetails().getValue() instanceof ElectronicPrescribingConfigVo)
                ((ElectronicPrescribingConfigVo)form.grdDetails().getValue()).getButtonDeniedRoleAccess().add(voRoles.get(i));
        }
        form.getGlobalContext().Admin.setElectronicPrescribingConfigVo(((ElectronicPrescribingConfigVo)form.grdDetails().getValue()));
        save();
    }

    open();
}
项目:openMAXIMS    文件:ProfilesImpl.java   
public AppRoleShortVoCollection listRoles() 
{
    // Make a call to the Admin ApplicationRoles list
    ApplicationRoles roleAdmin = (ApplicationRoles)getDomainImpl(ApplicationRolesImpl.class);
    AppRoleShortVoCollection coll = roleAdmin.listRoles();
    AppRoleShortVoCollection filteredColl = new AppRoleShortVoCollection();
    // Remove inactive roles
    for (int i=0; i<coll.size(); i++)
    {
        AppRoleShortVo vo = coll.get(i);
        if (vo.getIsActiveIsNotNull() && vo.getIsActive().booleanValue())
            filteredColl.add(vo);
    }

    return filteredColl;
}
项目:openMAXIMS    文件:Logic.java   
private void listRoles() 
{
    AppRoleShortVo selectedRole = form.getLocalContext().getRoleSelected();

    AppRoleShortVoCollection roles = domain.listRoles();        
    form.grdRoles().getRows().clear();
    GenForm.grdRolesRow row;
    for (int i = 0; i < roles.size(); i++)
    {
        AppRoleShortVo voRole = roles.get(i);
        if (selectedRole != null && selectedRole.getID_AppRoleIsNotNull() && selectedRole.getID_AppRole().equals(voRole.getID_AppRole()))
            row = form.grdRoles().getRows().newRow(true);
        else
            row = form.grdRoles().getRows().newRow();
        row.setValue(voRole);
        row.setcolRoleName(voRole.getName());   
    }

    // If the local context has a value set, set the grid value too
    if (form.getLocalContext().getRoleSelectedIsNotNull())
    {
        form.grdRoles().setValue(form.getLocalContext().getRoleSelected());
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException
{
    if (result.equals(DialogResult.OK)
        && formName.equals(form.getForms().Admin.ElectronicPrescribingConfigDialog))
    {
        save();
    }
    else if(formName.equals(form.getForms().Admin.RoleSelect)
        && result.equals(DialogResult.OK))
    {
        AppRoleShortVoCollection voRoles = form.getGlobalContext().Admin.getSelectedRoles();
        ((ElectronicPrescribingConfigVo)form.grdDetails().getValue()).setButtonDeniedRoleAccess(new AppRoleShortVoCollection());
        for (int i = 0; voRoles != null  && i < voRoles.size(); i++)
        {
            if(form.grdDetails().getValue() instanceof ElectronicPrescribingConfigVo)
                ((ElectronicPrescribingConfigVo)form.grdDetails().getValue()).getButtonDeniedRoleAccess().add(voRoles.get(i));
        }
        form.getGlobalContext().Admin.setElectronicPrescribingConfigVo(((ElectronicPrescribingConfigVo)form.grdDetails().getValue()));
        save();
    }

    open();
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormOpen() throws FormOpenException
{
    if(!ConfigFlag.DOM.HEARTS_REPLICATE_PATIENTS.getValue())
        form.imbHeartsUser().setVisible(false);     

    form.btnUpdate().setEnabled(false);
    form.getContextMenus().getGenericGridUpdateItem().setVisible(false);
    AppRoleShortVoCollection roles = domain.listRoles();
    GenForm.grdRolesRow row;

    for (int i = 0; i < roles.size(); i++)
    {
        AppRoleShortVo role = roles.get(i);
        row = form.grdRoles().getRows().newRow();
        row.setValue(role);
        row.setRoleName(role.getName());
        row.setAssigned(false);
    }
    form.txtSrhUserName().setFocus();
    form.qmbMos().setRequired(!ConfigFlag.GEN.ALLOW_NON_MOS_USERS.getValue());
}
项目:openmaxims-linux    文件:ProfilesImpl.java   
public AppRoleShortVoCollection listRoles() 
{
    // Make a call to the Admin ApplicationRoles list
    ApplicationRoles roleAdmin = (ApplicationRoles)getDomainImpl(ApplicationRolesImpl.class);
    AppRoleShortVoCollection coll = roleAdmin.listRoles();
    AppRoleShortVoCollection filteredColl = new AppRoleShortVoCollection();
    // Remove inactive roles
    for (int i=0; i<coll.size(); i++)
    {
        AppRoleShortVo vo = coll.get(i);
        if (vo.getIsActiveIsNotNull() && vo.getIsActive().booleanValue())
            filteredColl.add(vo);
    }

    return filteredColl;
}
项目:openmaxims-linux    文件:Logic.java   
private void listRoles() 
{
    AppRoleShortVo selectedRole = form.getLocalContext().getRoleSelected();

    AppRoleShortVoCollection roles = domain.listRoles();        
    form.grdRoles().getRows().clear();
    GenForm.grdRolesRow row;
    for (int i = 0; i < roles.size(); i++)
    {
        AppRoleShortVo voRole = roles.get(i);
        if (selectedRole != null && selectedRole.getID_AppRoleIsNotNull() && selectedRole.getID_AppRole().equals(voRole.getID_AppRole()))
            row = form.grdRoles().getRows().newRow(true);
        else
            row = form.grdRoles().getRows().newRow();
        row.setValue(voRole);
        row.setcolRoleName(voRole.getName());   
    }

    // If the local context has a value set, set the grid value too
    if (form.getLocalContext().getRoleSelectedIsNotNull())
    {
        form.grdRoles().setValue(form.getLocalContext().getRoleSelected());
    }
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException
{
    if (result.equals(DialogResult.OK)
        && formName.equals(form.getForms().Admin.ElectronicPrescribingConfigDialog))
    {
        save();
    }
    else if(formName.equals(form.getForms().Admin.RoleSelect)
        && result.equals(DialogResult.OK))
    {
        AppRoleShortVoCollection voRoles = form.getGlobalContext().Admin.getSelectedRoles();
        ((ElectronicPrescribingConfigVo)form.grdDetails().getValue()).setButtonDeniedRoleAccess(new AppRoleShortVoCollection());
        for (int i = 0; voRoles != null  && i < voRoles.size(); i++)
        {
            if(form.grdDetails().getValue() instanceof ElectronicPrescribingConfigVo)
                ((ElectronicPrescribingConfigVo)form.grdDetails().getValue()).getButtonDeniedRoleAccess().add(voRoles.get(i));
        }
        form.getGlobalContext().Admin.setElectronicPrescribingConfigVo(((ElectronicPrescribingConfigVo)form.grdDetails().getValue()));
        save();
    }

    open();
}
项目:openmaxims-linux    文件:Logic.java   
protected void onFormOpen() throws FormOpenException
{
    if(!ConfigFlag.DOM.HEARTS_REPLICATE_PATIENTS.getValue())
        form.imbHeartsUser().setVisible(false);     

    form.btnUpdate().setEnabled(false);
    form.getContextMenus().getGenericGridUpdateItem().setVisible(false);
    AppRoleShortVoCollection roles = domain.listRoles();
    GenForm.grdRolesRow row;

    for (int i = 0; i < roles.size(); i++)
    {
        AppRoleShortVo role = roles.get(i);
        row = form.grdRoles().getRows().newRow();
        row.setValue(role);
        row.setRoleName(role.getName());
        row.setAssigned(false);
    }
    form.txtSrhUserName().setFocus();
    form.qmbMos().setRequired(!ConfigFlag.GEN.ALLOW_NON_MOS_USERS.getValue());
}
项目:AvoinApotti    文件:UserAssessmentNewImpl.java   
public AppRoleShortVoCollection listRoles()
{
    ApplicationRoles impl = (ApplicationRoles)getDomainImpl(ApplicationRolesImpl.class);
    if(impl != null)
        return impl.listRoles();
    return null;
}
项目:AvoinApotti    文件:UserAssessmentPreviewImpl.java   
public AppRoleShortVoCollection listRoles()
{
    ApplicationRoles impl = (ApplicationRoles)getDomainImpl(ApplicationRolesImpl.class);
    if(impl != null)
        return impl.listRoles();
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void loadRolesUsersIntoGridColumnCombo(grdBookingRightsRow row)
{
    AppRoleShortVoCollection voCollRole = form.getLocalContext().getRoleList();
    if (voCollRole == null)
        return;

    for (int i = 0; i < voCollRole.size(); i++)
        row.getcolRole().newRow(voCollRole.get(i), voCollRole.get(i).getName());
}
项目:AvoinApotti    文件:Logic.java   
private void loadRolesAndUsersIntoGridColumnCombo(grdBookRightsRow row)
{
    AppRoleShortVoCollection voCollRole = form.getLocalContext().getRoleList();
    if (voCollRole == null)
        return;

    for (int i = 0; i < voCollRole.size(); i++)
        row.getcolRole().newRow(voCollRole.get(i), voCollRole.get(i).getName());
}
项目:AvoinApotti    文件:Logic.java   
private String createRolesText(AppRoleShortVoCollection buttonDeniedRoleAccess)
{
    StringBuffer sb = new StringBuffer();
    for (int i = 0 ; i < buttonDeniedRoleAccess.size() ; i++)
    {
        sb.append(buttonDeniedRoleAccess.get(i).getName());
        if (i+1 < buttonDeniedRoleAccess.size())
            sb.append(", ");
    }
    return sb.toString();
}
项目:AvoinApotti    文件:Logic.java   
private void populateRolesFromGrid()
{
    AppRoleShortVoCollection voRoles = new AppRoleShortVoCollection();
    for (int i = 0; i < form.grdRoles().getRows().size(); i++)
    {
        if (form.grdRoles().getRows().get(i).getcolSelect())
            voRoles.add(form.grdRoles().getRows().get(i).getValue());
    }
    form.getGlobalContext().Admin.setSelectedRoles(voRoles);
}
项目:AvoinApotti    文件:Logic.java   
private void open()
{
    AppRoleShortVoCollection voColl = domain.listRoles();
    form.grdRoles().getRows().clear();
    for (int i = 0; i < voColl.size(); i++)
    {
        AppRoleShortVo voAppRole = voColl.get(i);
        if(voAppRole.getIsActiveIsNotNull() && voAppRole.getIsActive().booleanValue())
        {
            GenForm.grdRolesRow row = form.grdRoles().getRows().newRow();
            row.setcolImage(form.getImages().OCRR.Role);
            row.setcolRole(voAppRole.getName());
            row.setValue(voAppRole);

            if (form.getGlobalContext().Admin.getSelectedRolesIsNotNull())
            {
                for (int j = 0 ; j < form.getGlobalContext().Admin.getSelectedRoles().size() ; j++)
                {
                    if (voAppRole.getID_AppRoleIsNotNull()
                        && form.getGlobalContext().Admin.getSelectedRoles().get(j).getID_AppRoleIsNotNull()
                        && voAppRole.getID_AppRole().equals(form.getGlobalContext().Admin.getSelectedRoles().get(j).getID_AppRole()))
                        row.setcolSelect(true);
                }

            }

        }
    }

    enableOkButton();
}
项目:AvoinApotti    文件:ApplicationUsersImpl.java   
public AppRoleShortVoCollection listRoles() 
{
    StringBuilder hql = new StringBuilder();
    hql.append(" from AppRole appR where appR.isActive = 1");

    return AppRoleShortVoAssembler.createAppRoleShortVoCollectionFromAppRole(getDomainFactory().find(hql.toString())).sort();
}
项目:AvoinApotti    文件:Logic.java   
private void loadRoles()
{
    AppRoleShortVoCollection roles = domain.listRolesShort();
    form.lyrDetails().tabRoles().grdRoles().getRows().clear();
    if(roles == null)
        return;

    roles.sort();
    for(int i = 0; i < roles.size(); i++)
    {
        addRole(roles.get(i));
    }

}
项目:AvoinApotti    文件:Logic.java   
private void populateRolesGrid(EventVo event) 
{
    form.lyrTargets().tabActioningRoles().grdRoles().getRows().clear();

    AppRoleShortVoCollection voColl = domain.listRoles();
    if (voColl == null)
        return;

    form.lyrTargets().tabActioningRoles().grdRoles().getRows().clear();
    for (int i = 0; i < voColl.size(); i++)
    {
        AppRoleShortVo voAppRole = voColl.get(i);
        if(voAppRole.getIsActiveIsNotNull() && voAppRole.getIsActive().booleanValue())
        {
            grdRolesRow row = form.lyrTargets().tabActioningRoles().grdRoles().getRows().newRow();
            row.setColImage(form.getImages().OCRR.Role);
            row.setColRole(voAppRole.getName());
            if (event != null &&
                    event.getActioningRolesIsNotNull())
            {
                for (int j = 0; j < event.getActioningRoles().size(); j++) 
                {
                    if (voAppRole.getName().equals(event.getActioningRoles().get(j).getName()))
                    {
                        row.setColSelect(true);
                    }
                }
            }

            row.setValue(voAppRole);
        }
    }       
}
项目:AvoinApotti    文件:Logic.java   
private AppRoleShortVoCollection populateRolesFromRolesGrid()
{
    AppRoleShortVoCollection voRoles = new AppRoleShortVoCollection();
    for (int i = 0; i < form.lyrTargets().tabActioningRoles().grdRoles().getRows().size(); i++)
    {
        if (form.lyrTargets().tabActioningRoles().grdRoles().getRows().get(i).getColSelect())
            voRoles.add(form.lyrTargets().tabActioningRoles().grdRoles().getRows().get(i).getValue());
    }

    return voRoles;
}
项目:AvoinApotti    文件:Logic.java   
private boolean checkRole(AppRoleShortVoCollection buttonDeniedRoleAccess)
{
    if (buttonDeniedRoleAccess == null)
        return true;

    AppRoleRefVo voRef = ((AppRoleRefVo)engine.getLoggedInRole());
    for (int i = 0 ; i < buttonDeniedRoleAccess.size() ; i++)
    {
        if(buttonDeniedRoleAccess.get(i).getID_AppRole().equals(voRef.getID_AppRole()))
            return false;
    }
    return true;
}
项目:openMAXIMS    文件:UserAssessmentNewImpl.java   
public AppRoleShortVoCollection listRoles()
{
    ApplicationRoles impl = (ApplicationRoles)getDomainImpl(ApplicationRolesImpl.class);
    if(impl != null)
        return impl.listRoles();
    return null;
}
项目:openMAXIMS    文件:UserAssessmentPreviewImpl.java   
public AppRoleShortVoCollection listRoles()
{
    ApplicationRoles impl = (ApplicationRoles)getDomainImpl(ApplicationRolesImpl.class);
    if(impl != null)
        return impl.listRoles();
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void loadRolesUsersIntoGridColumnCombo(grdBookingRightsRow row)
{
    AppRoleShortVoCollection voCollRole = form.getLocalContext().getRoleList();
    if (voCollRole == null)
        return;

    for (int i = 0; i < voCollRole.size(); i++)
        row.getcolRole().newRow(voCollRole.get(i), voCollRole.get(i).getName());
}
项目:openMAXIMS    文件:Logic.java   
private void loadRolesAndUsersIntoGridColumnCombo(grdBookRightsRow row)
{
    AppRoleShortVoCollection voCollRole = form.getLocalContext().getRoleList();
    if (voCollRole == null)
        return;

    for (int i = 0; i < voCollRole.size(); i++)
        row.getcolRole().newRow(voCollRole.get(i), voCollRole.get(i).getName());
}
项目:openMAXIMS    文件:Logic.java   
private String createRolesText(AppRoleShortVoCollection buttonDeniedRoleAccess)
{
    StringBuffer sb = new StringBuffer();
    for (int i = 0 ; i < buttonDeniedRoleAccess.size() ; i++)
    {
        sb.append(buttonDeniedRoleAccess.get(i).getName());
        if (i+1 < buttonDeniedRoleAccess.size())
            sb.append(", ");
    }
    return sb.toString();
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormOpen() throws FormOpenException
{
    if(!ConfigFlag.DOM.DTO_REPLICATE_APPUSERS.getValue())
        form.imbHeartsUser().setVisible(false);     

    form.btnUpdate().setVisible(false);
    form.getContextMenus().getGenericGridUpdateItem().setVisible(false);
    form.getContextMenus().getGenericGridReplaceItem().setVisible(false);

    form.btnAttachSpineUserID().setPostbackRequirePdsAuthentication(true);

    AppRoleShortVoCollection roles = domain.listRoles();
    GenForm.grdRolesRow row;

    for (int i = 0; i < roles.size(); i++)
    {
        AppRoleShortVo role = roles.get(i);
        row = form.grdRoles().getRows().newRow();
        row.setValue(role);
        row.setRoleName(role.getName());
        row.setAssigned(false);
    }
    form.txtSrhUserName().setFocus();
    form.qmbMos().setRequired(!ConfigFlag.GEN.ALLOW_NON_MOS_USERS.getValue());

    //WDEV-21296
    //TODO add PDS_SMARTCARD_ADMIN_RIGHT and change to this
    if (engine.hasRight(AppRight.PDS_SYNCHRONISE_INTERACTIVE))
    {
        form.btnAttachSpineUserID().setPostbackRequirePdsAuthentication(true);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateRolesFromGrid()
{
    AppRoleShortVoCollection voRoles = new AppRoleShortVoCollection();
    for (int i = 0; i < form.grdRoles().getRows().size(); i++)
    {
        if (form.grdRoles().getRows().get(i).getcolSelect())
            voRoles.add(form.grdRoles().getRows().get(i).getValue());
    }
    form.getGlobalContext().Admin.setSelectedRoles(voRoles);
}
项目:openMAXIMS    文件:Logic.java   
private void open()
{
    AppRoleShortVoCollection voColl = domain.listRoles();
    form.grdRoles().getRows().clear();
    for (int i = 0; i < voColl.size(); i++)
    {
        AppRoleShortVo voAppRole = voColl.get(i);
        if(voAppRole.getIsActiveIsNotNull() && voAppRole.getIsActive().booleanValue())
        {
            GenForm.grdRolesRow row = form.grdRoles().getRows().newRow();
            row.setcolImage(form.getImages().OCRR.Role);
            row.setcolRole(voAppRole.getName());
            row.setValue(voAppRole);

            if (form.getGlobalContext().Admin.getSelectedRolesIsNotNull())
            {
                for (int j = 0 ; j < form.getGlobalContext().Admin.getSelectedRoles().size() ; j++)
                {
                    if (voAppRole.getID_AppRoleIsNotNull()
                        && form.getGlobalContext().Admin.getSelectedRoles().get(j).getID_AppRoleIsNotNull()
                        && voAppRole.getID_AppRole().equals(form.getGlobalContext().Admin.getSelectedRoles().get(j).getID_AppRole()))
                        row.setcolSelect(true);
                }

            }

        }
    }

    enableOkButton();
}
项目:openMAXIMS    文件:ApplicationUsersImpl.java   
public AppRoleShortVoCollection listRoles() 
{
    StringBuilder hql = new StringBuilder();
    hql.append(" from AppRole appR where appR.isActive = 1");

    return AppRoleShortVoAssembler.createAppRoleShortVoCollectionFromAppRole(getDomainFactory().find(hql.toString())).sort();
}
项目:openMAXIMS    文件:Logic.java   
private void loadRoles()
{
    AppRoleShortVoCollection roles = domain.listRolesShort();
    form.lyrDetails().tabRoles().grdRoles().getRows().clear();
    if(roles == null)
        return;

    roles.sort();
    for(int i = 0; i < roles.size(); i++)
    {
        addRole(roles.get(i));
    }

}
项目:openMAXIMS    文件:Logic.java   
private void populateRolesGrid(EventVo event) 
{
    form.lyrTargets().tabActioningRoles().grdRoles().getRows().clear();

    AppRoleShortVoCollection voColl = domain.listRoles();
    if (voColl == null)
        return;

    form.lyrTargets().tabActioningRoles().grdRoles().getRows().clear();
    for (int i = 0; i < voColl.size(); i++)
    {
        AppRoleShortVo voAppRole = voColl.get(i);
        if(voAppRole.getIsActiveIsNotNull() && voAppRole.getIsActive().booleanValue())
        {
            grdRolesRow row = form.lyrTargets().tabActioningRoles().grdRoles().getRows().newRow();
            row.setColImage(form.getImages().OCRR.Role);
            row.setColRole(voAppRole.getName());
            if (event != null &&
                    event.getActioningRolesIsNotNull())
            {
                for (int j = 0; j < event.getActioningRoles().size(); j++) 
                {
                    if (voAppRole.getName().equals(event.getActioningRoles().get(j).getName()))
                    {
                        row.setColSelect(true);
                    }
                }
            }

            row.setValue(voAppRole);
        }
    }       
}
项目:openMAXIMS    文件:Logic.java   
private AppRoleShortVoCollection populateRolesFromRolesGrid()
{
    AppRoleShortVoCollection voRoles = new AppRoleShortVoCollection();
    for (int i = 0; i < form.lyrTargets().tabActioningRoles().grdRoles().getRows().size(); i++)
    {
        if (form.lyrTargets().tabActioningRoles().grdRoles().getRows().get(i).getColSelect())
            voRoles.add(form.lyrTargets().tabActioningRoles().grdRoles().getRows().get(i).getValue());
    }

    return voRoles;
}