Java Code Examples for ims.admin.vo.AppRoleShortVoCollection

The following are top voted examples for showing how to use ims.admin.vo.AppRoleShortVoCollection. 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: 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 2
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 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
@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();
}
 
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: 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 6
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 7
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
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());
			
	}
}
 
Example 8
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
@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();
}
 
Example 9
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 10
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 11
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
@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();
}
 
Example 12
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 13
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 14
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 15
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
@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();
}
 
Example 16
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 17
Project: AvoinApotti   File: UserAssessmentNewImpl.java   Source Code and License 5 votes vote down vote up
public AppRoleShortVoCollection listRoles()
{
	ApplicationRoles impl = (ApplicationRoles)getDomainImpl(ApplicationRolesImpl.class);
	if(impl != null)
		return impl.listRoles();
	return null;
}
 
Example 18
Project: AvoinApotti   File: UserAssessmentPreviewImpl.java   Source Code and License 5 votes vote down vote up
public AppRoleShortVoCollection listRoles()
{
	ApplicationRoles impl = (ApplicationRoles)getDomainImpl(ApplicationRolesImpl.class);
	if(impl != null)
		return impl.listRoles();
	return null;
}
 
Example 19
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
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());
}
 
Example 20
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
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());
}
 
Example 21
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
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();
}
 
Example 22
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
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);
}
 
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: ApplicationUsersImpl.java   Source Code and License 5 votes vote down vote up
public AppRoleShortVoCollection listRoles() 
{
	StringBuilder hql = new StringBuilder();
	hql.append(" from AppRole appR where appR.isActive = 1");
	
	return AppRoleShortVoAssembler.createAppRoleShortVoCollectionFromAppRole(getDomainFactory().find(hql.toString())).sort();
}
 
Example 25
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
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));
	}
	
}
 
Example 26
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 27
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 28
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 29
Project: openMAXIMS   File: UserAssessmentNewImpl.java   Source Code and License 5 votes vote down vote up
public AppRoleShortVoCollection listRoles()
{
	ApplicationRoles impl = (ApplicationRoles)getDomainImpl(ApplicationRolesImpl.class);
	if(impl != null)
		return impl.listRoles();
	return null;
}
 
Example 30
Project: openMAXIMS   File: UserAssessmentPreviewImpl.java   Source Code and License 5 votes vote down vote up
public AppRoleShortVoCollection listRoles()
{
	ApplicationRoles impl = (ApplicationRoles)getDomainImpl(ApplicationRolesImpl.class);
	if(impl != null)
		return impl.listRoles();
	return null;
}
 
Example 31
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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());
}
 
Example 32
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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());
}
 
Example 33
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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();
}
 
Example 34
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 35
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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);
}
 
Example 36
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 37
Project: openMAXIMS   File: ApplicationUsersImpl.java   Source Code and License 5 votes vote down vote up
public AppRoleShortVoCollection listRoles() 
{
	StringBuilder hql = new StringBuilder();
	hql.append(" from AppRole appR where appR.isActive = 1");
	
	return AppRoleShortVoAssembler.createAppRoleShortVoCollectionFromAppRole(getDomainFactory().find(hql.toString())).sort();
}
 
Example 38
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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));
	}
	
}
 
Example 39
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 40
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 41
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 42
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 43
Project: openMAXIMS   File: UserAssessmentNewImpl.java   Source Code and License 5 votes vote down vote up
public AppRoleShortVoCollection listRoles()
{
	ApplicationRoles impl = (ApplicationRoles)getDomainImpl(ApplicationRolesImpl.class);
	if(impl != null)
		return impl.listRoles();
	return null;
}
 
Example 44
Project: openMAXIMS   File: UserAssessmentPreviewImpl.java   Source Code and License 5 votes vote down vote up
public AppRoleShortVoCollection listRoles()
{
	ApplicationRoles impl = (ApplicationRoles)getDomainImpl(ApplicationRolesImpl.class);
	if(impl != null)
		return impl.listRoles();
	return null;
}
 
Example 45
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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());
}
 
Example 46
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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());
}
 
Example 47
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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();
}
 
Example 48
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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);
}
 
Example 49
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 50
Project: openMAXIMS   File: ApplicationUsersImpl.java   Source Code and License 5 votes vote down vote up
public AppRoleShortVoCollection listRoles() 
{
	StringBuilder hql = new StringBuilder();
	hql.append(" from AppRole appR where appR.isActive = 1");
	
	return AppRoleShortVoAssembler.createAppRoleShortVoCollectionFromAppRole(getDomainFactory().find(hql.toString())).sort();
}
 
Example 51
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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));
	}
	
}
 
Example 52
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 53
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 54
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 55
Project: openmaxims-linux   File: UserAssessmentNewImpl.java   Source Code and License 5 votes vote down vote up
public AppRoleShortVoCollection listRoles()
{
	ApplicationRoles impl = (ApplicationRoles)getDomainImpl(ApplicationRolesImpl.class);
	if(impl != null)
		return impl.listRoles();
	return null;
}
 
Example 56
Project: openmaxims-linux   File: UserAssessmentPreviewImpl.java   Source Code and License 5 votes vote down vote up
public AppRoleShortVoCollection listRoles()
{
	ApplicationRoles impl = (ApplicationRoles)getDomainImpl(ApplicationRolesImpl.class);
	if(impl != null)
		return impl.listRoles();
	return null;
}
 
Example 57
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
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());
}
 
Example 58
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
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());
}
 
Example 59
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
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();
}
 
Example 60
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
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);
}