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

项目:AvoinApotti    文件:Logic.java   
private void populateRolesDetails(UserAssessmentVo assessment)
{
    form.lyrTabs().tabRoles().grdRoles().getRows().clear();
    form.lyrTabs().tabRoles().dyngrdQuestions().getRows().clear();
    if (assessment == null)
        return;

    if (assessment.getIsMultiRoleIsNotNull() && assessment.getIsMultiRole().booleanValue())
    {
        for (int i = 0; i < assessment.getAssessmentRoles().size(); i++)
        {
            AssessmentRoleVo assessmentRoleVo = assessment.getAssessmentRoles().get(i);
            AppRoleShortVo voRole = assessmentRoleVo.getAppRole();
            if (voRole != null)
            {
                grdRolesRow row = form.lyrTabs().tabRoles().grdRoles().getRows().newRow();
                row.setcolAnswerAll(assessmentRoleVo.getAnswerAllIsNotNull() && assessmentRoleVo.getAnswerAll().booleanValue() ? true : false);
                row.setcolRole(voRole.getName());
                row.setcolImage(form.getImages().OCRR.Role);
                row.setValue(assessmentRoleVo);
            }
        }
    }
}
项目: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   
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    文件:Logic.java   
private void selectRole(AppRoleShortVo appRoleShortVo)
{
    if(appRoleShortVo == null)
        return;

    for(int i = 0; i < form.lyrDetails().tabRoles().grdRoles().getRows().size(); i++)
    {
        GenForm.lyrDetailsLayer.tabRolesContainer.grdRolesRow row = form.lyrDetails().tabRoles().grdRoles().getRows().get(i);
        if(row.getValue() != null && row.getValue().getAppRoleIsNotNull() && row.getValue().getAppRole().equals(appRoleShortVo))
        {
            row.setcolSelect(true);
            return;
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private void populateRolesDetails(UserAssessmentVo assessment)
{
    form.lyrTabs().tabRoles().grdRoles().getRows().clear();
    form.lyrTabs().tabRoles().dyngrdQuestions().getRows().clear();
    if (assessment == null)
        return;

    if (assessment.getIsMultiRoleIsNotNull() && assessment.getIsMultiRole().booleanValue())
    {
        for (int i = 0; i < assessment.getAssessmentRoles().size(); i++)
        {
            AssessmentRoleVo assessmentRoleVo = assessment.getAssessmentRoles().get(i);
            AppRoleShortVo voRole = assessmentRoleVo.getAppRole();
            if (voRole != null)
            {
                grdRolesRow row = form.lyrTabs().tabRoles().grdRoles().getRows().newRow();
                row.setcolAnswerAll(assessmentRoleVo.getAnswerAllIsNotNull() && assessmentRoleVo.getAnswerAll().booleanValue() ? true : false);
                row.setcolRole(voRole.getName());
                row.setcolImage(form.getImages().OCRR.Role);
                row.setValue(assessmentRoleVo);
            }
        }
    }
}
项目: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 selectRole(AppRoleShortVo appRoleShortVo)
{
    if(appRoleShortVo == null)
        return;

    for(int i = 0; i < form.lyrDetails().tabRoles().grdRoles().getRows().size(); i++)
    {
        GenForm.lyrDetailsLayer.tabRolesContainer.grdRolesRow row = form.lyrDetails().tabRoles().grdRoles().getRows().get(i);
        if(row.getValue() != null && row.getValue().getAppRoleIsNotNull() && row.getValue().getAppRole().equals(appRoleShortVo))
        {
            row.setcolSelect(true);
            return;
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private void populateRolesDetails(UserAssessmentVo assessment)
{
    form.lyrTabs().tabRoles().grdRoles().getRows().clear();
    form.lyrTabs().tabRoles().dyngrdQuestions().getRows().clear();
    if (assessment == null)
        return;

    if (assessment.getIsMultiRoleIsNotNull() && assessment.getIsMultiRole().booleanValue())
    {
        for (int i = 0; i < assessment.getAssessmentRoles().size(); i++)
        {
            AssessmentRoleVo assessmentRoleVo = assessment.getAssessmentRoles().get(i);
            AppRoleShortVo voRole = assessmentRoleVo.getAppRole();
            if (voRole != null)
            {
                grdRolesRow row = form.lyrTabs().tabRoles().grdRoles().getRows().newRow();
                row.setcolAnswerAll(assessmentRoleVo.getAnswerAllIsNotNull() && assessmentRoleVo.getAnswerAll().booleanValue() ? true : false);
                row.setcolRole(voRole.getName());
                row.setcolImage(form.getImages().OCRR.Role);
                row.setValue(assessmentRoleVo);
            }
        }
    }
}
项目: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   
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    文件:Logic.java   
private void selectRole(AppRoleShortVo appRoleShortVo)
{
    if(appRoleShortVo == null)
        return;

    for(int i = 0; i < form.lyrDetails().tabRoles().grdRoles().getRows().size(); i++)
    {
        GenForm.lyrDetailsLayer.tabRolesContainer.grdRolesRow row = form.lyrDetails().tabRoles().grdRoles().getRows().get(i);
        if(row.getValue() != null && row.getValue().getAppRoleIsNotNull() && row.getValue().getAppRole().equals(appRoleShortVo))
        {
            row.setcolSelect(true);
            return;
        }
    }

}
项目:openmaxims-linux    文件:Logic.java   
private void populateRolesDetails(UserAssessmentVo assessment)
{
    form.lyrTabs().tabRoles().grdRoles().getRows().clear();
    form.lyrTabs().tabRoles().dyngrdQuestions().getRows().clear();
    if (assessment == null)
        return;

    if (assessment.getIsMultiRoleIsNotNull() && assessment.getIsMultiRole().booleanValue())
    {
        for (int i = 0; i < assessment.getAssessmentRoles().size(); i++)
        {
            AssessmentRoleVo assessmentRoleVo = assessment.getAssessmentRoles().get(i);
            AppRoleShortVo voRole = assessmentRoleVo.getAppRole();
            if (voRole != null)
            {
                grdRolesRow row = form.lyrTabs().tabRoles().grdRoles().getRows().newRow();
                row.setcolAnswerAll(assessmentRoleVo.getAnswerAllIsNotNull() && assessmentRoleVo.getAnswerAll().booleanValue() ? true : false);
                row.setcolRole(voRole.getName());
                row.setcolImage(form.getImages().OCRR.Role);
                row.setValue(assessmentRoleVo);
            }
        }
    }
}
项目: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   
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    文件:Logic.java   
private void selectRole(AppRoleShortVo appRoleShortVo)
{
    if(appRoleShortVo == null)
        return;

    for(int i = 0; i < form.lyrDetails().tabRoles().grdRoles().getRows().size(); i++)
    {
        GenForm.lyrDetailsLayer.tabRolesContainer.grdRolesRow row = form.lyrDetails().tabRoles().grdRoles().getRows().get(i);
        if(row.getValue() != null && row.getValue().getAppRoleIsNotNull() && row.getValue().getAppRole().equals(appRoleShortVo))
        {
            row.setcolSelect(true);
            return;
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private boolean userHasRoleAssociated(AppRoleShortVo voAppRole, Integer roleId)
{
    if(voAppRole == null || roleId == null)
        return false;

    return roleId.equals(voAppRole.getID_AppRole());
}
项目:AvoinApotti    文件:Logic.java   
private boolean isRoleAdded(AssessmentRoleVo voAssessmentRole, AssessmentQuestionVo assessmentQuestionVo)
{
    if(voAssessmentRole == null || assessmentQuestionVo == null)
        return false;

    for (int k = 0; k < assessmentQuestionVo.getAssessmentAnswerRole().size(); k++)
    {
        AppRoleShortVo appRoleVo = assessmentQuestionVo.getAssessmentAnswerRole().get(k).getAppRole();
        if(appRoleVo != null && appRoleVo.equals(voAssessmentRole.getAppRole()))
        {
            return true;
        }
    }
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private boolean isVoAdded(AppRoleShortVo voAppRole)
{
    for (int j = 0; j < form.lyrTabs().tabRoles().grdRoles().getRows().size(); j++)
    {
        AssessmentRoleVo voAssessment = form.lyrTabs().tabRoles().grdRoles().getRows().get(j).getValue();
        if(voAssessment != null && voAssessment.getAppRoleIsNotNull())
        {
            if(voAssessment.getAppRole().equals(voAppRole))
                return true;
        }
    }

    return false;
}
项目: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    文件:Logic.java   
private void addRole(AppRoleShortVo role)
{
    if(role == null)
        return;

    GenForm.lyrDetailsLayer.tabRolesContainer.grdRolesRow row = form.lyrDetails().tabRoles().grdRoles().getRows().newRow();
    TemplateRoleShortVo voTemplateRole = new TemplateRoleShortVo();
    voTemplateRole.setIsActive(Boolean.TRUE);
    voTemplateRole.setAppRole(role);
    row.setcolImage(form.getImages().OCRR.Role);
    row.setcolRole(role.getName());
    row.setValue(voTemplateRole);
}
项目:AvoinApotti    文件:Logic.java   
private boolean isRoleSelected(AppRoleShortVo appRoleVo)
{
    if(appRoleVo == null)
        return false;

    for(int i = 0; i < form.lyrDetails().tabRoles().grdRoles().getRows().size(); i++)
    {
        GenForm.lyrDetailsLayer.tabRolesContainer.grdRolesRow row = form.lyrDetails().tabRoles().grdRoles().getRows().get(i);
        if(row.getValue() != null && row.getValue().getAppRoleIsNotNull() && row.getValue().getAppRole().equals(appRoleVo))
            return row.getcolSelect();
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private boolean roleExists(TemplateRoleShortVoCollection roles, AppRoleShortVo appRoleVo)
{
    if(roles == null || appRoleVo == null)
        return false;

    for(int i = 0; i < roles.size(); i++)
    {
        TemplateRoleShortVo voTemplateRoleShort = roles.get(i);
        if(voTemplateRoleShort != null && voTemplateRoleShort.getAppRoleIsNotNull() && voTemplateRoleShort.getAppRole().equals(appRoleVo))
            return true;
    }
    return false;
}
项目: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);
        }
    }       
}
项目:openMAXIMS    文件:Logic.java   
private boolean userHasRoleAssociated(AppRoleShortVo voAppRole, Integer roleId)
{
    if(voAppRole == null || roleId == null)
        return false;

    return roleId.equals(voAppRole.getID_AppRole());
}
项目:openMAXIMS    文件:Logic.java   
private boolean isRoleAdded(AssessmentRoleVo voAssessmentRole, AssessmentQuestionVo assessmentQuestionVo)
{
    if(voAssessmentRole == null || assessmentQuestionVo == null)
        return false;

    for (int k = 0; k < assessmentQuestionVo.getAssessmentAnswerRole().size(); k++)
    {
        AppRoleShortVo appRoleVo = assessmentQuestionVo.getAssessmentAnswerRole().get(k).getAppRole();
        if(appRoleVo != null && appRoleVo.equals(voAssessmentRole.getAppRole()))
        {
            return true;
        }
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isVoAdded(AppRoleShortVo voAppRole)
{
    for (int j = 0; j < form.lyrTabs().tabRoles().grdRoles().getRows().size(); j++)
    {
        AssessmentRoleVo voAssessment = form.lyrTabs().tabRoles().grdRoles().getRows().get(j).getValue();
        if(voAssessment != null && voAssessment.getAppRoleIsNotNull())
        {
            if(voAssessment.getAppRole().equals(voAppRole))
                return true;
        }
    }

    return false;
}
项目: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 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    文件:Logic.java   
private void addRole(AppRoleShortVo role)
{
    if(role == null)
        return;

    GenForm.lyrDetailsLayer.tabRolesContainer.grdRolesRow row = form.lyrDetails().tabRoles().grdRoles().getRows().newRow();
    TemplateRoleShortVo voTemplateRole = new TemplateRoleShortVo();
    voTemplateRole.setIsActive(Boolean.TRUE);
    voTemplateRole.setAppRole(role);
    row.setcolImage(form.getImages().OCRR.Role);
    row.setcolRole(role.getName());
    row.setValue(voTemplateRole);
}
项目:openMAXIMS    文件:Logic.java   
private boolean isRoleSelected(AppRoleShortVo appRoleVo)
{
    if(appRoleVo == null)
        return false;

    for(int i = 0; i < form.lyrDetails().tabRoles().grdRoles().getRows().size(); i++)
    {
        GenForm.lyrDetailsLayer.tabRolesContainer.grdRolesRow row = form.lyrDetails().tabRoles().grdRoles().getRows().get(i);
        if(row.getValue() != null && row.getValue().getAppRoleIsNotNull() && row.getValue().getAppRole().equals(appRoleVo))
            return row.getcolSelect();
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private boolean roleExists(TemplateRoleShortVoCollection roles, AppRoleShortVo appRoleVo)
{
    if(roles == null || appRoleVo == null)
        return false;

    for(int i = 0; i < roles.size(); i++)
    {
        TemplateRoleShortVo voTemplateRoleShort = roles.get(i);
        if(voTemplateRoleShort != null && voTemplateRoleShort.getAppRoleIsNotNull() && voTemplateRoleShort.getAppRole().equals(appRoleVo))
            return true;
    }
    return false;
}
项目: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 boolean userHasRoleAssociated(AppRoleShortVo voAppRole, Integer roleId)
{
    if(voAppRole == null || roleId == null)
        return false;

    return roleId.equals(voAppRole.getID_AppRole());
}
项目:openMAXIMS    文件:Logic.java   
private boolean isRoleAdded(AssessmentRoleVo voAssessmentRole, AssessmentQuestionVo assessmentQuestionVo)
{
    if(voAssessmentRole == null || assessmentQuestionVo == null)
        return false;

    for (int k = 0; k < assessmentQuestionVo.getAssessmentAnswerRole().size(); k++)
    {
        AppRoleShortVo appRoleVo = assessmentQuestionVo.getAssessmentAnswerRole().get(k).getAppRole();
        if(appRoleVo != null && appRoleVo.equals(voAssessmentRole.getAppRole()))
        {
            return true;
        }
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isVoAdded(AppRoleShortVo voAppRole)
{
    for (int j = 0; j < form.lyrTabs().tabRoles().grdRoles().getRows().size(); j++)
    {
        AssessmentRoleVo voAssessment = form.lyrTabs().tabRoles().grdRoles().getRows().get(j).getValue();
        if(voAssessment != null && voAssessment.getAppRoleIsNotNull())
        {
            if(voAssessment.getAppRole().equals(voAppRole))
                return true;
        }
    }

    return false;
}
项目: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();
}