Java Code Examples for ims.scheduling.vo.SessionVo

The following are top voted examples for showing how to use ims.scheduling.vo.SessionVo. 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   View source code 6 votes vote down vote up
private boolean isAppInSession(SessionVo session)
{
	if (session==null || (session.getSessionSlots()==null && session.getTheatreSlots()==null))
		return false;
		
	for (int i=0;i<session.getSessionSlots().size();i++)
	{
		if (session.getSessionSlots().get(i).getAppointmentIsNotNull())
			return true;
	}
	
	for (int i=0;i<session.getTheatreSlots().size();i++)
	{
		if (session.getTheatreSlots().get(i).getAppointmentIsNotNull())
			return true;
	}
	return false;
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private boolean isAppInSession(SessionVo session)
{
	if (session==null || (session.getSessionSlots()==null && session.getTheatreSlots()==null) || (!Boolean.TRUE.equals(session.getIsFixed()) && session.getRemainingTime() != null && session.getRemainingTime().equals(session.getDuration())))
		return false;
	
	if (!Boolean.TRUE.equals(session.getIsFixed()) && session.getRemainingTime() != null && session.getRemainingTime().compareTo(session.getDuration()) < 0) //WDEV-19046
		return true;
	
	for (int i=0;i<session.getSessionSlots().size();i++)
	{
		if (session.getSessionSlots().get(i).getAppointmentIsNotNull())
			return true;
	}
	
	for (int i=0;i<session.getTheatreSlots().size();i++)
	{
		if (session.getTheatreSlots().get(i).getAppointmentIsNotNull())
			return true;
	}
	return false;
}
 
Example 3
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private boolean isAppInSession(SessionVo session)
{
	if (session == null || (session.getParentChildSlots() == null && session.getTheatreSlots() == null))
		return false;
	
	for (int i=0;i<session.getParentChildSlots().size();i++)
	{
		if (session.getParentChildSlots().get(i).getAppointmentIsNotNull())
			return true;
	}
	
	for (int i=0;i<session.getTheatreSlots().size();i++)
	{
		if (session.getTheatreSlots().get(i).getAppointmentIsNotNull())
			return true;
	}
	
	return false;
}
 
Example 4
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private boolean chooseAndBookAppInSession(SessionShortVo session)
{
	if (ConfigFlag.DOM.ALLOW_BLOCK_SESSION_WITH_CAB_APPTS.getValue())
		return false;
	
	SessionVo sessionVo = domain.getSession(session);
	
	if (sessionVo == null || sessionVo.getSessionSlots() == null ||sessionVo.getSessionSlots().size() == 0)
		return false;
	
	for (int i=0;i < sessionVo.getSessionSlots().size();i++)
	{
		if (sessionVo.getSessionSlots().get(i).getAppointment() != null && Boolean.TRUE.equals(sessionVo.getSessionSlots().get(i).getAppointment().getIsCABBooking()) && !Status_Reason.CANCELLED.equals(sessionVo.getSessionSlots().get(i).getAppointment().getApptStatus()))
			return true;
	}
	
	return false;
}
 
Example 5
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateBookingRightsGrid(SessionVo voSession)
	{
		form.lyrSessEdit().tabBookingRights().grdBookRights().getRows().clear();
		
		if (voSession==null || voSession.getSch_Profile()==null || voSession.getSch_Profile().getBookingRights()==null)
			return;
			
		Profile_BookRightsVoCollection collBookingRights = voSession.getSch_Profile().getBookingRights();
		
		
		for (int i = 0; i < collBookingRights.size(); i++)
		{
			grdBookRightsRow bRow = form.lyrSessEdit().tabBookingRights().grdBookRights().getRows().newRow();
			loadRolesAndUsersIntoGridColumnCombo(bRow);
			bRow.getcolRole().setValue(collBookingRights.get(i).getRole());
			bRow.setValue(collBookingRights.get(i));
			bRow.setSelectable(false);
		}
}
 
Example 6
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void addTheatreProcedure()
{
	if(ConfigFlag.GEN.THEATRE_PROFILE_PROCEDURES.getValue().equals(SERVICE))
	{
		SessionVo voSession = form.getLocalContext().getSession();
		
		if (voSession == null || voSession.getService() == null)
			return;
		
		engine.open(form.getForms().Admin.ProcedureSpecialtyHotlist, new Object[] {voSession.getService().getSpecialty(),Boolean.FALSE, Boolean.TRUE});
	}
	else if(ConfigFlag.GEN.THEATRE_PROFILE_PROCEDURES.getValue().equals(LIST_OWNER))
	{
		GenForm.lyrSessEditLayer.tabTheatreProceduresContainer.grdTheatreRow taRow = form.lyrSessEdit().tabTheatreProcedures().grdTheatre().getRows().newRow(true);
		TheatreProcedureLiteVo voTheatreProc = new TheatreProcedureLiteVo();
		taRow.setValue(voTheatreProc);
		taRow.setReadOnly(false);
	}
	
}
 
Example 7
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void setLocation()
{
	LocShortVo voLocShort = form.getGlobalContext().Admin.getProfileLocation();
	//WDEV-19518
	SessionVo voSession = form.getLocalContext().getSession();
	voSession.setSchLocation(voLocShort);

	boolean isSelectedLocationCaseNoteLoc = voLocShort != null && Boolean.TRUE.equals(voLocShort.getCaseNoteFolderLocation());
	if (!Boolean.TRUE.equals(voSession.getCaseNoteFolderNotRequired()))
	{
		voSession.setCaseNoteFolderLocation( isSelectedLocationCaseNoteLoc ? voLocShort : null);
		form.lyrSessEdit().tabGeneral().txtCaseNoteLocation().setValue(isSelectedLocationCaseNoteLoc ? voLocShort.getName() : null);
	}	
	form.getLocalContext().setSession(voSession);

	form.lyrSessEdit().tabGeneral().txtLocation().setValue(voLocShort.getName());
	
}
 
Example 8
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private boolean isAppInSession(SessionVo session)
{
	if (session==null || (session.getSessionSlots()==null && session.getTheatreSlots()==null))
		return false;
		
	for (int i=0;i<session.getSessionSlots().size();i++)
	{
		if (session.getSessionSlots().get(i).getAppointmentIsNotNull())
			return true;
	}
	
	for (int i=0;i<session.getTheatreSlots().size();i++)
	{
		if (session.getTheatreSlots().get(i).getAppointmentIsNotNull())
			return true;
	}
	return false;
}
 
Example 9
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private boolean isAppInSession(SessionVo session)
{
	if (session==null || (session.getSessionSlots()==null && session.getTheatreSlots()==null) || (!Boolean.TRUE.equals(session.getIsFixed()) && session.getRemainingTime() != null && session.getRemainingTime().equals(session.getDuration())))
		return false;
	
	if (!Boolean.TRUE.equals(session.getIsFixed()) && session.getRemainingTime() != null && session.getRemainingTime().compareTo(session.getDuration()) < 0) //WDEV-19046
		return true;
	
	for (int i=0;i<session.getSessionSlots().size();i++)
	{
		if (session.getSessionSlots().get(i).getAppointmentIsNotNull())
			return true;
	}
	
	for (int i=0;i<session.getTheatreSlots().size();i++)
	{
		if (session.getTheatreSlots().get(i).getAppointmentIsNotNull())
			return true;
	}
	return false;
}
 
Example 10
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private boolean isAppInSession(SessionVo session)
{
	if (session==null || (session.getSessionSlots()==null && session.getTheatreSlots()==null))
		return false;
		
	for (int i=0;i<session.getSessionSlots().size();i++)
	{
		if (session.getSessionSlots().get(i).getAppointmentIsNotNull())
			return true;
	}
	
	for (int i=0;i<session.getTheatreSlots().size();i++)
	{
		if (session.getTheatreSlots().get(i).getAppointmentIsNotNull())
			return true;
	}
	return false;
}
 
Example 11
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private boolean isAppInSession(SessionVo session)
{
	if (session==null || (session.getSessionSlots()==null && session.getTheatreSlots()==null) || (!Boolean.TRUE.equals(session.getIsFixed()) && session.getRemainingTime() != null && session.getRemainingTime().equals(session.getDuration())))
		return false;
	
	if (!Boolean.TRUE.equals(session.getIsFixed()) && session.getRemainingTime() != null && session.getRemainingTime().compareTo(session.getDuration()) < 0) //WDEV-19046
		return true;
	
	for (int i=0;i<session.getSessionSlots().size();i++)
	{
		if (session.getSessionSlots().get(i).getAppointmentIsNotNull())
			return true;
	}
	
	for (int i=0;i<session.getTheatreSlots().size();i++)
	{
		if (session.getTheatreSlots().get(i).getAppointmentIsNotNull())
			return true;
	}
	return false;
}
 
Example 12
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
/**
 * 
 */
private void save()
{
	SessionVo voSession = form.getLocalContext().getSession();
	voSession = populateDataFromScreen(voSession);
	if (voSession == null)
		return;

	String[] arrErrors = voSession.validate(getUIValidationRules(voSession));
	if (arrErrors != null)
	{
		engine.showErrors(arrErrors);
		return;
	}

	try
	{
		voSession = domain.saveSession(voSession, true);
	}
	catch (StaleObjectException e)
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
	}

	search();
	form.setMode(FormMode.VIEW);
}
 
Example 13
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void setLocation()
{
	LocShortVo voLocShort = form.getGlobalContext().Admin.getProfileLocation();

	SessionVo voSession = form.getLocalContext().getSession();
	voSession.setSchLocation(voLocShort);
	form.getLocalContext().setSession(voSession);

	form.lyrSessEdit().tabGeneral().txtLocation().setValue(voLocShort.getName());
}
 
Example 14
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
@Override
protected void onMessageBoxClosed(int messageBoxId, DialogResult result) throws PresentationLogicException
{
	if(result.equals(DialogResult.YES))
	{
		SessionVo voSession = form.getLocalContext().getSession();
		if(voSession != null)
		{
			if(voSession.getSessionSlotsIsNotNull())
			{
				for(SessionSlotVo voSlot : voSession.getSessionSlots())
				{
					if(voSlot.getActualDirectoryOfService() == null)
					{
						removeDos(voSlot.getDirectoryOfServices());
					}	
					else
					{
						if(!voSlot.getActualDirectoryOfService().equals(form.getLocalContext().getSelectedDos()))
						{
							removeDos(voSlot.getDirectoryOfServices());
						}
					}
				}
			}
		}
	}
	else if(result.equals(DialogResult.NO))
	{
		form.getLocalContext().setSelectedDos(null);
	}
}
 
Example 15
Project: AvoinApotti   File: SessionManagementImpl.java   View source code 5 votes vote down vote up
public SessionVo getSessionVo(Sch_SessionRefVo sessionRef)
{
	if (sessionRef == null || sessionRef.getID_Sch_Session() == null)
		return null;

	return SessionVoAssembler.create((Sch_Session) getDomainFactory().getDomainObject(Sch_Session.class, sessionRef.getID_Sch_Session()));
}
 
Example 16
Project: AvoinApotti   File: SessionAdminImpl.java   View source code 5 votes vote down vote up
public SessionVo getSession(SessionShortVo sessionShort)
{
	DomainFactory factory = getDomainFactory();

	Sch_Session doSession = (Sch_Session) factory.getDomainObject(Sch_Session.class, sessionShort.getID_Sch_Session());
	SessionVo voSession = SessionVoAssembler.create(doSession);

	return voSession;
}
 
Example 17
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private boolean isAppInSessionMarkedAsDoNotMove(SessionVo session)  //Only for Outpatient Appointments
{
	if (session==null || session.getSessionSlots()==null)
		return false;
	
	for (int i=0;i<session.getSessionSlots().size();i++)
	{
		if (session.getSessionSlots().get(i).getAppointmentIsNotNull() && Boolean.TRUE.equals(session.getSessionSlots().get(i).getAppointment().getDoNotMove()))
			return true;
	}
	
	return false;
}
 
Example 18
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private boolean hasApptLinkedAppointments(SessionVo session)
{
	if (session==null || session.getSessionSlots()==null)
		return false;
	
	for (int i=0;i<session.getSessionSlots().size();i++)
	{
		if (session.getSessionSlots().get(i).getAppointmentIsNotNull() && session.getSessionSlots().get(i).getAppointment().getLinkedAppointmentsIsNotNull() && session.getSessionSlots().get(i).getAppointment().getLinkedAppointments().size()>0)
			return true;
	}
	
	return false;
}
 
Example 19
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private boolean isAppInSessionMarkedAsDoNotMove(SessionVo session)  //Only for Outpatient Appointments
{
	if (session==null || session.getSessionSlots()==null)
		return false;
	
	for (int i=0;i<session.getSessionSlots().size();i++)
	{
		if (session.getSessionSlots().get(i).getAppointmentIsNotNull() && Boolean.TRUE.equals(session.getSessionSlots().get(i).getAppointment().getDoNotMove()))
			return true;
	}
	
	return false;
}
 
Example 20
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private boolean isAppInSession(SessionVo session)
{
	if (session == null || (session.getSessionSlots() == null && session.getTheatreSlots() == null && session.getParentChildSlots() == null) || (!Boolean.TRUE.equals(session.getIsFixed()) && session.getRemainingTime() != null && session.getRemainingTime().equals(session.getDuration())))
		return false;
	
	if (!Boolean.TRUE.equals(session.getIsFixed()) && session.getRemainingTime() != null && session.getRemainingTime().compareTo(session.getDuration()) < 0) //WDEV-19046
		return true;
	
	for (int i=0;i<session.getSessionSlots().size();i++)
	{
		if (session.getSessionSlots().get(i).getAppointmentIsNotNull())
			return true;
	}
	
	for (int i=0;i<session.getTheatreSlots().size();i++)
	{
		if (session.getTheatreSlots().get(i).getAppointmentIsNotNull())
			return true;
	}
	
	for (int i=0;i<session.getParentChildSlots().size();i++)
	{
		if (session.getParentChildSlots().get(i).getAppointmentIsNotNull())
			return true;
	}
	
	return false;
}
 
Example 21
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private boolean canRemoveListOwner(Session_ListOwnerVo listOwner)
{
	SessionVo session = form.getLocalContext().getSession();
	
	if (listOwner == null)
		return true;
	
	if (session == null || form.getLocalContext().getSession().getID_Sch_Session() == null)
		return true;
	
	if (session.getSessionSlots() != null)
	{
		for (SessionSlotVo slot : session.getSessionSlots())
		{
			if (listOwner.equals(slot.getSlotResp()))
			{
				if (slot.getAppointment() != null)
					return false;
			}
		}
	}

	if (session.getParentChildSlots() != null)
	{
		for (SessionParentChildSlotVo parentChildSlot : session.getParentChildSlots())
		{
			if (listOwner.equals(parentChildSlot.getSlotResp()))
			{
				if (parentChildSlot.getAppointment() != null)
					return false;
			}
		}
	}
	
	return true;
}
 
Example 22
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private void updateSlotStatus(Status_Reason statusReason)
{
	GenForm.lyrSessEditLayer.tabSlotDetailsContainer.grdSlotsRow selectedRow = form.lyrSessEdit().tabSlotDetails().grdSlots().getSelectedRow();
	
	if (selectedRow.getValue() != null)
	{			
		selectedRow.getValue().setStatus(statusReason);
		selectedRow.setcolImage(getImage(statusReason));
		
		if (form.getGlobalContext().Scheduling.getCancelBlockReasonForSessionManagement() != null)
		{
			selectedRow.getValue().setCancelBlockReason(form.getGlobalContext().Scheduling.getCancelBlockReasonForSessionManagement().getReason());
			selectedRow.getValue().setCancelBlockComment(form.getGlobalContext().Scheduling.getCancelBlockReasonForSessionManagement().getComment());
		}
	}
	
	//wdev-12580
	SessionVo voSession = form.getLocalContext().getSession();
	
	if(voSession != null)
	{
		int remainingSlots = voSession.getRemainingSlots();
		remainingSlots -= 1;
		
		if(remainingSlots < 0)
			remainingSlots = 0;
		
		voSession.setRemainingSlots(remainingSlots);
		form.getLocalContext().setSession(voSession);
	}
}
 
Example 23
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private void setCaseNoteFolderLocation(LocShortVo sessionCaseNoteFoldersLocation)
{
	if (sessionCaseNoteFoldersLocation == null)
		return;
	SessionVo voSession = form.getLocalContext().getSession();
	voSession.setCaseNoteFolderLocation(sessionCaseNoteFoldersLocation);
	form.getLocalContext().setSession(voSession);
	form.lyrSessEdit().tabGeneral().txtCaseNoteLocation().setValue(Boolean.TRUE.equals(sessionCaseNoteFoldersLocation.getCaseNoteFolderLocation()) ? sessionCaseNoteFoldersLocation.getName() : null);
}
 
Example 24
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
@Override
protected void onChkCaseNotesNotRequiredValueChanged()	throws PresentationLogicException
{
	form.lyrSessEdit().tabGeneral().txtCaseNoteLocation().setValue(null);
	
	SessionVo selectedSession = form.getLocalContext().getSession();
	selectedSession.setCaseNoteFolderNotRequired(form.lyrSessEdit().tabGeneral().chkCaseNotesNotRequired().getValue());
	if (form.lyrSessEdit().tabGeneral().chkCaseNotesNotRequired().getValue())
			selectedSession.setCaseNoteFolderLocation(null);
	form.getLocalContext().setSession(selectedSession);
	
	updateControlState();		
}
 
Example 25
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private boolean isAppInSessionMarkedAsDoNotMove(SessionVo session)  //Only for Outpatient Appointments
{
	if (session==null || session.getSessionSlots()==null)
		return false;
	
	for (int i=0;i<session.getSessionSlots().size();i++)
	{
		if (session.getSessionSlots().get(i).getAppointmentIsNotNull() && Boolean.TRUE.equals(session.getSessionSlots().get(i).getAppointment().getDoNotMove()))
			return true;
	}
	
	return false;
}
 
Example 26
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private boolean hasApptLinkedAppointments(SessionVo session)
{
	if (session==null || session.getSessionSlots()==null)
		return false;
	
	for (int i=0;i<session.getSessionSlots().size();i++)
	{
		if (session.getSessionSlots().get(i).getAppointmentIsNotNull() && session.getSessionSlots().get(i).getAppointment().getLinkedAppointmentsIsNotNull() && session.getSessionSlots().get(i).getAppointment().getLinkedAppointments().size()>0)
			return true;
	}
	
	return false;
}
 
Example 27
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private boolean isAppInSession(SessionVo session)
{
	if (session==null || (session.getSessionSlots() == null && session.getTheatreSlots() == null && session.getParentChildSlots() == null) || (!Boolean.TRUE.equals(session.getIsFixed()) && session.getRemainingTime() != null && session.getRemainingTime().equals(session.getDuration())))
		return false;
	
	if (!Boolean.TRUE.equals(session.getIsFixed()) && session.getRemainingTime() != null && session.getRemainingTime().compareTo(session.getDuration()) < 0) //WDEV-19046
		return true;
	
	for (int i=0;i<session.getSessionSlots().size();i++)
	{
		if (session.getSessionSlots().get(i).getAppointmentIsNotNull())
			return true;
	}
	
	for (int i=0;i<session.getTheatreSlots().size();i++)
	{
		if (session.getTheatreSlots().get(i).getAppointmentIsNotNull())
			return true;
	}
	
	//flexible session with fixed slots
	for (int i=0;i<session.getParentChildSlots().size();i++)
	{
		if (session.getParentChildSlots().get(i).getAppointmentIsNotNull())
			return true;
	}
	return false;
}
 
Example 28
Project: openMAXIMS   File: SessionManagementImpl.java   View source code 5 votes vote down vote up
public SessionVo getSessionVo(Sch_SessionRefVo sessionRef)
{
	if (sessionRef == null || sessionRef.getID_Sch_Session() == null)
		return null;

	return SessionVoAssembler.create((Sch_Session) getDomainFactory().getDomainObject(Sch_Session.class, sessionRef.getID_Sch_Session()));
}
 
Example 29
Project: openMAXIMS   File: TheatreSessionManagementImpl.java   View source code 5 votes vote down vote up
public SessionVo getSessionVo(Sch_SessionRefVo sessionRef)
{
	if (sessionRef == null || sessionRef.getID_Sch_Session() == null)
		return null;

	return SessionVoAssembler.create((Sch_Session) getDomainFactory().getDomainObject(Sch_Session.class, sessionRef.getID_Sch_Session()));
}
 
Example 30
Project: openMAXIMS   File: TheatreSessionManagementImpl.java   View source code 5 votes vote down vote up
public Boolean hasSlotConflictWithSessionSlots(Sch_SessionRefVo session, SessionParentChildSlotVo slot)
{
	if (session == null)
		return false;
	
	SessionVo voSession = getSessionVo(session);
	Boolean slotsOverlapping = false;
	
	Time startTime1 = slot.getStartTime().copy();
	startTime1.addMinutes(slot.getDuration());
	Time endTime1 = startTime1;
	
	for (SessionParentChildSlotVo voSlot : voSession.getParentChildSlots())
	{
		Time startTime2 = voSlot.getStartTime().copy();
		startTime2.addMinutes(voSlot.getDuration());
		Time endTime2 = startTime2;
		
		if (slot.getStartTime().isLessThan(endTime2) && voSlot.getStartTime().isLessThan(endTime1))
		{
			slotsOverlapping = true;
			break;
		}
	}
	
	return slotsOverlapping;
}
 
Example 31
Project: openMAXIMS   File: SessionAdminImpl.java   View source code 5 votes vote down vote up
public SessionVo getSession(SessionShortVo sessionShort)
{
	DomainFactory factory = getDomainFactory();

	Sch_Session doSession = (Sch_Session) factory.getDomainObject(Sch_Session.class, sessionShort.getID_Sch_Session());
	SessionVo voSession = SessionVoAssembler.create(doSession);

	return voSession;
}
 
Example 32
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
/**
 * 
 */
private void save()
{
	SessionVo voSession = form.getLocalContext().getSession();
	voSession = populateDataFromScreen(voSession);
	if (voSession == null)
		return;

	String[] arrErrors = voSession.validate(getUIValidationRules(voSession));
	if (arrErrors != null)
	{
		engine.showErrors(arrErrors);
		return;
	}

	try
	{
		voSession = domain.saveSession(voSession, true);
	}
	catch (StaleObjectException e)
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
	}

	search();
	form.setMode(FormMode.VIEW);
}
 
Example 33
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private void setLocation()
{
	LocShortVo voLocShort = form.getGlobalContext().Admin.getProfileLocation();

	SessionVo voSession = form.getLocalContext().getSession();
	voSession.setSchLocation(voLocShort);
	form.getLocalContext().setSession(voSession);

	form.lyrSessEdit().tabGeneral().txtLocation().setValue(voLocShort.getName());
}
 
Example 34
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
@Override
protected void onMessageBoxClosed(int messageBoxId, DialogResult result) throws PresentationLogicException
{
	if(result.equals(DialogResult.YES))
	{
		SessionVo voSession = form.getLocalContext().getSession();
		if(voSession != null)
		{
			if(voSession.getSessionSlotsIsNotNull())
			{
				for(SessionSlotVo voSlot : voSession.getSessionSlots())
				{
					if(voSlot.getActualDirectoryOfService() == null)
					{
						removeDos(voSlot.getDirectoryOfServices());
					}	
					else
					{
						if(!voSlot.getActualDirectoryOfService().equals(form.getLocalContext().getSelectedDos()))
						{
							removeDos(voSlot.getDirectoryOfServices());
						}
					}
				}
			}
		}
	}
	else if(result.equals(DialogResult.NO))
	{
		form.getLocalContext().setSelectedDos(null);
	}
}
 
Example 35
Project: openMAXIMS   File: SessionManagementImpl.java   View source code 5 votes vote down vote up
public SessionVo getSessionVo(Sch_SessionRefVo sessionRef)
{
	if (sessionRef == null || sessionRef.getID_Sch_Session() == null)
		return null;

	return SessionVoAssembler.create((Sch_Session) getDomainFactory().getDomainObject(Sch_Session.class, sessionRef.getID_Sch_Session()));
}
 
Example 36
Project: openMAXIMS   File: SessionAdminImpl.java   View source code 5 votes vote down vote up
public SessionVo getSession(SessionShortVo sessionShort)
{
	DomainFactory factory = getDomainFactory();

	Sch_Session doSession = (Sch_Session) factory.getDomainObject(Sch_Session.class, sessionShort.getID_Sch_Session());
	SessionVo voSession = SessionVoAssembler.create(doSession);

	return voSession;
}
 
Example 37
Project: openmaxims-linux   File: Logic.java   View source code 5 votes vote down vote up
/**
 * 
 */
private void save()
{
	SessionVo voSession = form.getLocalContext().getSession();
	voSession = populateDataFromScreen(voSession);
	if (voSession == null)
		return;

	String[] arrErrors = voSession.validate(getUIValidationRules(voSession));
	if (arrErrors != null)
	{
		engine.showErrors(arrErrors);
		return;
	}

	try
	{
		voSession = domain.saveSession(voSession, true);
	}
	catch (StaleObjectException e)
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
	}

	search();
	form.setMode(FormMode.VIEW);
}
 
Example 38
Project: openmaxims-linux   File: Logic.java   View source code 5 votes vote down vote up
private void setLocation()
{
	LocShortVo voLocShort = form.getGlobalContext().Admin.getProfileLocation();

	SessionVo voSession = form.getLocalContext().getSession();
	voSession.setSchLocation(voLocShort);
	form.getLocalContext().setSession(voSession);

	form.lyrSessEdit().tabGeneral().txtLocation().setValue(voLocShort.getName());
}
 
Example 39
Project: openmaxims-linux   File: Logic.java   View source code 5 votes vote down vote up
@Override
protected void onMessageBoxClosed(int messageBoxId, DialogResult result) throws PresentationLogicException
{
	if(result.equals(DialogResult.YES))
	{
		SessionVo voSession = form.getLocalContext().getSession();
		if(voSession != null)
		{
			if(voSession.getSessionSlotsIsNotNull())
			{
				for(SessionSlotVo voSlot : voSession.getSessionSlots())
				{
					if(voSlot.getActualDirectoryOfService() == null)
					{
						removeDos(voSlot.getDirectoryOfServices());
					}	
					else
					{
						if(!voSlot.getActualDirectoryOfService().equals(form.getLocalContext().getSelectedDos()))
						{
							removeDos(voSlot.getDirectoryOfServices());
						}
					}
				}
			}
		}
	}
	else if(result.equals(DialogResult.NO))
	{
		form.getLocalContext().setSelectedDos(null);
	}
}
 
Example 40
Project: openmaxims-linux   File: SessionManagementImpl.java   View source code 5 votes vote down vote up
public SessionVo getSessionVo(Sch_SessionRefVo sessionRef)
{
	if (sessionRef == null || sessionRef.getID_Sch_Session() == null)
		return null;

	return SessionVoAssembler.create((Sch_Session) getDomainFactory().getDomainObject(Sch_Session.class, sessionRef.getID_Sch_Session()));
}