Java Code Examples for ims.admin.vo.AppRoleShortVo

The following are top voted examples for showing how to use ims.admin.vo.AppRoleShortVo. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
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);
			}
		}
	}
}
 
Example 2
Project: AvoinApotti   File: ProfilesImpl.java   Source Code and License 6 votes vote down vote up
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;
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
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());
	}
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
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());
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
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;
		}
	}
	
}
 
Example 6
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
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);
			}
		}
	}
}
 
Example 7
Project: openMAXIMS   File: ProfilesImpl.java   Source Code and License 6 votes vote down vote up
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;
}
 
Example 8
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
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());
	}
}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
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;
		}
	}
	
}
 
Example 10
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
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);
			}
		}
	}
}
 
Example 11
Project: openMAXIMS   File: ProfilesImpl.java   Source Code and License 6 votes vote down vote up
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;
}
 
Example 12
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
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());
	}
}
 
Example 13
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
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());
}
 
Example 14
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
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;
		}
	}
	
}
 
Example 15
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
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);
			}
		}
	}
}
 
Example 16
Project: openmaxims-linux   File: ProfilesImpl.java   Source Code and License 6 votes vote down vote up
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;
}
 
Example 17
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
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());
	}
}
 
Example 18
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
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());
}
 
Example 19
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
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;
		}
	}
	
}
 
Example 20
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean userHasRoleAssociated(AppRoleShortVo voAppRole, Integer roleId)
{
	if(voAppRole == null || roleId == null)
		return false;

	return roleId.equals(voAppRole.getID_AppRole());
}
 
Example 21
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 22
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 23
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
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();
}
 
Example 24
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
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);
}
 
Example 25
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 26
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 27
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
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);
		}
	}		
}
 
Example 28
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean userHasRoleAssociated(AppRoleShortVo voAppRole, Integer roleId)
{
	if(voAppRole == null || roleId == null)
		return false;

	return roleId.equals(voAppRole.getID_AppRole());
}
 
Example 29
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 30
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 31
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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);
	}
}
 
Example 32
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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();
}
 
Example 33
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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);
}
 
Example 34
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 35
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 36
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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);
		}
	}		
}
 
Example 37
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean userHasRoleAssociated(AppRoleShortVo voAppRole, Integer roleId)
{
	if(voAppRole == null || roleId == null)
		return false;

	return roleId.equals(voAppRole.getID_AppRole());
}
 
Example 38
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 39
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 40
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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();
}
 
Example 41
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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);
}
 
Example 42
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 43
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 44
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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);
		}
	}		
}
 
Example 45
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean userHasRoleAssociated(AppRoleShortVo voAppRole, Integer roleId)
{
	if(voAppRole == null || roleId == null)
		return false;

	return roleId.equals(voAppRole.getID_AppRole());
}
 
Example 46
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 47
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 48
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
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();
}
 
Example 49
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
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);
}
 
Example 50
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 51
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 52
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
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);
		}
	}		
}
 
Example 53
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private boolean isRoleAssigned(AppRoleShortVo role, AppRoleShortVoCollection appRoles)
{
	if (appRoles == null)
		return false;
	return (appRoles.indexOf(role) != -1);
}
 
Example 54
Project: AvoinApotti   File: ApplicationRolesImpl.java   Source Code and License 4 votes vote down vote up
public AppRoleVo getRole(AppRoleShortVo roleVo)
{
	DomainFactory factory = getDomainFactory();
	return AppRoleVoAssembler.create((AppRole)factory.getDomainObject(AppRole.class, roleVo.getID_AppRole()));
}
 
Example 55
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private boolean isRoleAssigned(AppRoleShortVo role, AppRoleShortVoCollection appRoles)
{
	if (appRoles == null)
		return false;
	return (appRoles.indexOf(role) != -1);
}
 
Example 56
Project: openMAXIMS   File: ApplicationRolesImpl.java   Source Code and License 4 votes vote down vote up
public AppRoleVo getRole(AppRoleShortVo roleVo)
{
	DomainFactory factory = getDomainFactory();
	return AppRoleVoAssembler.create((AppRole)factory.getDomainObject(AppRole.class, roleVo.getID_AppRole()));
}
 
Example 57
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private boolean isRoleAssigned(AppRoleShortVo role, AppRoleShortVoCollection appRoles)
{
	if (appRoles == null)
		return false;
	return (appRoles.indexOf(role) != -1);
}
 
Example 58
Project: openMAXIMS   File: ApplicationRolesImpl.java   Source Code and License 4 votes vote down vote up
public AppRoleVo getRole(AppRoleShortVo roleVo)
{
	DomainFactory factory = getDomainFactory();
	return AppRoleVoAssembler.create((AppRole)factory.getDomainObject(AppRole.class, roleVo.getID_AppRole()));
}
 
Example 59
Project: openmaxims-linux   File: Logic.java   Source Code and License 4 votes vote down vote up
private boolean isRoleAssigned(AppRoleShortVo role, AppRoleShortVoCollection appRoles)
{
	if (appRoles == null)
		return false;
	return (appRoles.indexOf(role) != -1);
}
 
Example 60
Project: openmaxims-linux   File: ApplicationRolesImpl.java   Source Code and License 4 votes vote down vote up
public AppRoleVo getRole(AppRoleShortVo roleVo)
{
	DomainFactory factory = getDomainFactory();
	return AppRoleVoAssembler.create((AppRole)factory.getDomainObject(AppRole.class, roleVo.getID_AppRole()));
}