Java Code Examples for ims.assessment.vo.AssessmentRoleVo.getAppRoleIsNotNull()

The following are Jave code examples for showing how to use getAppRoleIsNotNull() of the ims.assessment.vo.AssessmentRoleVo class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
public int compare(Object ob1, Object ob2) 
{
	String name1 = null;
	String name2 = null;
	if(ob1 instanceof AssessmentRoleVo )
	{
		AssessmentRoleVo ps1 = (AssessmentRoleVo)ob1;
		name1 = ps1.getAppRoleIsNotNull() ? ps1.getAppRole().getName() : null;
	}
	if(ob2 instanceof AssessmentRoleVo)
	{
		AssessmentRoleVo ps2 = (AssessmentRoleVo)ob2;
		name2 = ps2.getAppRoleIsNotNull() ? ps2.getAppRole().getName():null;
	}
	if(name1 != null )
		return  name1.toUpperCase().compareTo(name2.toUpperCase())*direction;
	if(name2 != null)
		return (-1)*direction;
	
	return 0;
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
private boolean checkUserRole(UserAssessmentVo data)
{
	boolean userCanAnswerToAllQuestion = true;
	
	if(data.getAssessmentRolesIsNotNull())
	{
		for(AssessmentRoleVo role : data.getAssessmentRoles())
		{
			if(role == null)
				continue;
			
			if(role.getAppRoleIsNotNull() && role.getAppRole().getID_AppRole().equals(engine.getLoggedInRole().getId()))
			{
				userCanAnswerToAllQuestion = role.getAnswerAllIsNotNull() && role.getAnswerAll();
			}
		}			
	}
	
	return userCanAnswerToAllQuestion;
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
private boolean checkUserRole(User_AssessmentVo data)
{
	boolean userCanAnswerToAllQuestion = true;
	
	if(data.getAssessmentRolesIsNotNull())
	{
		for(AssessmentRoleVo role : data.getAssessmentRoles())
		{
			if(role == null)
				continue;
			
			if(role.getAppRoleIsNotNull() && role.getAppRole().getID_AppRole().equals(engine.getLoggedInRole().getId()))
			{
				userCanAnswerToAllQuestion = role.getAnswerAllIsNotNull() && role.getAnswerAll();
			}
		}			
	}
	
	return userCanAnswerToAllQuestion;
}
 
Example 4
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 6 votes
public int compare(Object ob1, Object ob2) 
{
	String name1 = null;
	String name2 = null;
	if(ob1 instanceof AssessmentRoleVo )
	{
		AssessmentRoleVo ps1 = (AssessmentRoleVo)ob1;
		name1 = ps1.getAppRoleIsNotNull() ? ps1.getAppRole().getName() : null;
	}
	if(ob2 instanceof AssessmentRoleVo)
	{
		AssessmentRoleVo ps2 = (AssessmentRoleVo)ob2;
		name2 = ps2.getAppRoleIsNotNull() ? ps2.getAppRole().getName():null;
	}
	if(name1 != null )
		return  name1.toUpperCase().compareTo(name2.toUpperCase())*direction;
	if(name2 != null)
		return (-1)*direction;
	
	return 0;
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 6 votes
private boolean checkUserRole(UserAssessmentVo data)
{
	boolean userCanAnswerToAllQuestion = true;
	
	if(data.getAssessmentRolesIsNotNull())
	{
		for(AssessmentRoleVo role : data.getAssessmentRoles())
		{
			if(role == null)
				continue;
			
			if(role.getAppRoleIsNotNull() && role.getAppRole().getID_AppRole().equals(engine.getLoggedInRole().getId()))
			{
				userCanAnswerToAllQuestion = role.getAnswerAllIsNotNull() && role.getAnswerAll();
			}
		}			
	}
	
	return userCanAnswerToAllQuestion;
}
 
Example 6
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 6 votes
private boolean checkUserRole(User_AssessmentVo data)
{
	boolean userCanAnswerToAllQuestion = true;
	
	if(data.getAssessmentRolesIsNotNull())
	{
		for(AssessmentRoleVo role : data.getAssessmentRoles())
		{
			if(role == null)
				continue;
			
			if(role.getAppRoleIsNotNull() && role.getAppRole().getID_AppRole().equals(engine.getLoggedInRole().getId()))
			{
				userCanAnswerToAllQuestion = role.getAnswerAllIsNotNull() && role.getAnswerAll();
			}
		}			
	}
	
	return userCanAnswerToAllQuestion;
}
 
Example 7
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 6 votes
public int compare(Object ob1, Object ob2) 
{
	String name1 = null;
	String name2 = null;
	if(ob1 instanceof AssessmentRoleVo )
	{
		AssessmentRoleVo ps1 = (AssessmentRoleVo)ob1;
		name1 = ps1.getAppRoleIsNotNull() ? ps1.getAppRole().getName() : null;
	}
	if(ob2 instanceof AssessmentRoleVo)
	{
		AssessmentRoleVo ps2 = (AssessmentRoleVo)ob2;
		name2 = ps2.getAppRoleIsNotNull() ? ps2.getAppRole().getName():null;
	}
	if(name1 != null )
		return  name1.toUpperCase().compareTo(name2.toUpperCase())*direction;
	if(name2 != null)
		return (-1)*direction;
	
	return 0;
}
 
Example 8
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 6 votes
private boolean checkUserRole(UserAssessmentVo data)
{
	boolean userCanAnswerToAllQuestion = true;
	
	if(data.getAssessmentRolesIsNotNull())
	{
		for(AssessmentRoleVo role : data.getAssessmentRoles())
		{
			if(role == null)
				continue;
			
			if(role.getAppRoleIsNotNull() && role.getAppRole().getID_AppRole().equals(engine.getLoggedInRole().getId()))
			{
				userCanAnswerToAllQuestion = role.getAnswerAllIsNotNull() && role.getAnswerAll();
			}
		}			
	}
	
	return userCanAnswerToAllQuestion;
}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 6 votes
private boolean checkUserRole(User_AssessmentVo data)
{
	boolean userCanAnswerToAllQuestion = true;
	
	if(data.getAssessmentRolesIsNotNull())
	{
		for(AssessmentRoleVo role : data.getAssessmentRoles())
		{
			if(role == null)
				continue;
			
			if(role.getAppRoleIsNotNull() && role.getAppRole().getID_AppRole().equals(engine.getLoggedInRole().getId()))
			{
				userCanAnswerToAllQuestion = role.getAnswerAllIsNotNull() && role.getAnswerAll();
			}
		}			
	}
	
	return userCanAnswerToAllQuestion;
}
 
Example 10
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 6 votes
public int compare(Object ob1, Object ob2) 
{
	String name1 = null;
	String name2 = null;
	if(ob1 instanceof AssessmentRoleVo )
	{
		AssessmentRoleVo ps1 = (AssessmentRoleVo)ob1;
		name1 = ps1.getAppRoleIsNotNull() ? ps1.getAppRole().getName() : null;
	}
	if(ob2 instanceof AssessmentRoleVo)
	{
		AssessmentRoleVo ps2 = (AssessmentRoleVo)ob2;
		name2 = ps2.getAppRoleIsNotNull() ? ps2.getAppRole().getName():null;
	}
	if(name1 != null )
		return  name1.toUpperCase().compareTo(name2.toUpperCase())*direction;
	if(name2 != null)
		return (-1)*direction;
	
	return 0;
}
 
Example 11
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 6 votes
private boolean checkUserRole(UserAssessmentVo data)
{
	boolean userCanAnswerToAllQuestion = true;
	
	if(data.getAssessmentRolesIsNotNull())
	{
		for(AssessmentRoleVo role : data.getAssessmentRoles())
		{
			if(role == null)
				continue;
			
			if(role.getAppRoleIsNotNull() && role.getAppRole().getID_AppRole().equals(engine.getLoggedInRole().getId()))
			{
				userCanAnswerToAllQuestion = role.getAnswerAllIsNotNull() && role.getAnswerAll();
			}
		}			
	}
	
	return userCanAnswerToAllQuestion;
}
 
Example 12
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 6 votes
private boolean checkUserRole(User_AssessmentVo data)
{
	boolean userCanAnswerToAllQuestion = true;
	
	if(data.getAssessmentRolesIsNotNull())
	{
		for(AssessmentRoleVo role : data.getAssessmentRoles())
		{
			if(role == null)
				continue;
			
			if(role.getAppRoleIsNotNull() && role.getAppRole().getID_AppRole().equals(engine.getLoggedInRole().getId()))
			{
				userCanAnswerToAllQuestion = role.getAnswerAllIsNotNull() && role.getAnswerAll();
			}
		}			
	}
	
	return userCanAnswerToAllQuestion;
}
 
Example 13
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
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 14
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
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 15
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
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 16
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 5 votes
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;
}